📦 Moved to new directory. Last updated 12.2.2026. New location: claude-config/library/03-memory-state/deep-dives/state-14-engineering-trade-off-fidelity-vs-capacity.html

Deep dive 14 of 27: The Engineering Trade-off: Fidelity vs. Capacity

Nov 19, 2026 · Michael Chang · Status in NurseOps Now: ✅ built

Show definitions in ( ) · hover a highlighted word for its meaning, click it for details · open with ?defs=1 to show definitions

Part of: Remembering the right things: state management in NurseOps Now, section Compression Strategies: Summarization and Entity Extraction (7.2) · All 27 solutions · ← Vector Compression via RAG · The Hot/Cold State Architecture →

Read in this order

  1. In plain words: what it is, without jargon
  2. The problem it solves: the problem, and the standard approach in my words
  3. How to implement it (ServiceApps): scenario, steps, code and real output
  4. In NurseOps Now: built or not, and where
  5. Trade-offs and Interview answer

In plain words

Every compression trades fidelity (exact detail) for capacity (fitting more). The fix is to split what you remember: exact facts ("hard state (everything the app must remember to continue correctly)": IDs, numbers, error codes) are stored word for word, and only the soft parts (intent, mood, flow) are summarized.

In plain terms: you can summarize how a meeting felt, but you copy the contract number exactly.

The problem it solves

Hallucination drift (details slowly changing as summaries are summarized again): summaries are lossy, and a summary of a summary drifts (quality slowly getting worse over time) like a game of telephone. An error code that becomes "an access error" is useless.

The standard approach (in my words): keep hard state (everything the app must remember to continue correctly) in a lossless format (a SQL row or JSON (a simple text format for structured data) block), summarize only soft state (everything the app must remember to continue correctly), and never summarize code blocks or error logs.

How to implement it (ServiceApps)

Illustrative example: no ServiceApps (a company platform for IT tickets, HR requests and help-center articles) instance is connected, so the scenario and data are made up. The code is a self-contained sketch; it was run on that made-up data on Nov 19, 2026, and the output below is from that run.

The setting. ServiceApps (a company platform for IT tickets, HR requests and help-center articles) Assist, an AI helper inside a company's ServiceApps (a company platform for IT tickets, HR requests and help-center articles) portal. Employees ask it IT and HR questions; it answers from knowledge-base (KB (knowledge base: a library of help articles)) articles, looks up the employee's own tickets (incidents (a ServiceApps ticket for something broken) like INC0012345) and requests, and keeps one conversation per employee and ticket.

The scenario. A ServiceApps (a company platform for IT tickets, HR requests and help-center articles) Assist chat about a failed software install contains an error code, an asset tag and a ticket number.

Steps.

  1. Detect hard values with patterns or extraction (error codes, IDs, numbers, versions).
  2. Store them exactly, as structured fields.
  3. Summarize only the rest (a common way for programs to talk over the web using URLs).
  4. Send both: the exact values, then the summary.

The code (Python):

import re
turns = ["Error code 0x80070005 when installing Teams", "Asset LT-4471, ticket INC0012345",
         "User sounds frustrated, wants a fix before Friday's demo", "Tried: reinstall, reboot, cleared cache"]

def careless_summary(t):                         # what a lossy summary can do to exact values
    return "User had an access error installing Teams on their laptop and is frustrated; a ticket exists."

HARD = re.compile(r"0x[0-9A-Fa-f]+|INC\d+|[A-Z]{2}-\d{4}")
def split_state(turns):
    hard = sorted({m for t in turns for m in HARD.findall(t)})
    soft = "Frustrated; wants a fix before Friday's demo; tried reinstall, reboot and clearing the cache."
    return {"hard": hard, "soft": soft}

s, st = careless_summary(turns), split_state(turns)
print("careless summary keeps:", [v for v in ["0x80070005", "INC0012345", "LT-4471"] if v in s])
print("hard state (exact)    :", st["hard"])
print("soft state (summary)  :", st["soft"])

Output (from running the code above):

careless summary keeps: []
hard state (exact)    : ['0x80070005', 'INC0012345', 'LT-4471']
soft state (summary)  : Frustrated; wants a fix before Friday's demo; tried reinstall, reboot and clearing the cache.

What to watch for.

In plain terms: copy the error code and ticket number exactly into the ticket; it's fine to paraphrase how the user felt.

In NurseOps Now

Built, more strictly: nothing is summarized at all. Case status, decisions, the AI review and audit rows (one line in the log of who did what, when) are SQL records stored as-is, and tool (a function the AI can call, such as policy search) errors are returned raw. See Step 4.

Trade-offs

Interview answer

"Compression always costs fidelity, so I split state (everything the app must remember to continue correctly): hard values like IDs, error codes and decisions are stored exactly in structured fields, and only the soft conversational context is summarized. Code and logs are never paraphrased; they're stored and referenced."

All data in this post is made up. No real people, tickets or patient data.

← Back to all 27 solutions in the state management blog

Key terms

Every highlighted word in this post links here. Click ↩ Back to return to the spot you came from.

audit row
One line in the log of who did what, when.Used in: In NurseOps Now↩ Back to where you were
drift
Quality slowly getting worse over time.Used in: The problem it solves↩ Back to where you were
hallucination drift
Details slowly changing as summaries are summarized again.Used in: The problem it solves↩ Back to where you were
incident
A ServiceApps ticket for something broken.Used in: How to implement it (ServiceApps)↩ Back to where you were
JSON
A simple text format for structured data.Used in: The problem it solves↩ Back to where you were
KB
Knowledge base: a library of help articles.Used in: How to implement it (ServiceApps)↩ Back to where you were
REST
A common way for programs to talk over the web using URLs.Used in: How to implement it (ServiceApps)↩ Back to where you were
ServiceApps
A company platform for IT tickets, HR requests and help-center articles.Used in: How to implement it (ServiceApps)↩ Back to where you were
state
Everything the app must remember to continue correctly.Used in: In plain words, The problem it solves, How to implement it (ServiceApps), Trade-offs, Interview answer↩ Back to where you were
tool
A function the AI can call, such as policy search.Used in: In NurseOps Now↩ Back to where you were