ARCHIT ROY / TECHNICAL NOTES / 005 / JUL 2026 / 10 MIN
Cipher: evidence before automation
Designing an LLM support system around evidence freshness, auditability and duplicate-safe work.
The job is context assembly
Dispute resolution looks like a text-generation problem only from a distance. The useful evidence is distributed across booking context, calls, chats and transaction events. Cipher first converts those sources into a consistent representation, then asks the model to reason over an explicit evidence bundle.
The output is structured for downstream use: a concise account of what happened, responsibility signals and supporting context. Product rules decide which cases are eligible for automation; the model is not allowed to invent its own jurisdiction.
This is a public-safe account of the work. Internal identifiers, proprietary thresholds, prompts, infrastructure details and operational commands are intentionally omitted.
Freshness-aware reuse
Re-running a model for unchanged evidence wastes latency and money. Cipher records the timestamp of the latest communication evidence and reuses a completed analysis when the evidence boundary has not moved. When new communication arrives, the record enters a processing state and is refreshed.
This makes caching semantic rather than merely time-based. The question is not ‘is the cache young?’ but ‘does it represent the newest evidence we know about?’
The race hidden behind a SELECT
A later host-rating workflow exposed a classic concurrency bug: two requests could both check for an existing row, find nothing and call the model before either inserted. A pre-flight SELECT observed state; it did not reserve the work.
The fix was a database-backed claim before the expensive call. A normalised request identity is protected by a unique constraint. One worker owns a short lease and token; duplicates receive the stored result or a processing response. Expired or failed claims can be recovered without allowing an old worker to overwrite the new owner.
identity = hash(case_id, subject_id, normalise(reason))
claim(identity, owner_token, lease) # unique in database
only_owner_calls_model()What exactly-once does not mean
The claim prevents concurrent duplicate work inside the service and makes retries predictable. It cannot guarantee exactly-once billing if a process dies after an external model accepts the call but before the response is persisted. That remaining window requires idempotency from the downstream provider.
Naming that limit is part of trustworthy engineering. The system achieved strong practical deduplication without pretending a local database could control an external side effect.
Outcome
Across eligible support flows, the broader system reached roughly 51% automated resolution at 94% audited accuracy. The important design choice was not the percentage alone: automation sat behind eligibility, evidence assembly, persistence and review.
Cipher is the project that made ‘LLM application’ feel like the wrong category. It is an evidence and workflow system whose uncertain component happens to be a model.