[ Executable provenance workflow ]
How to Preserve Citations While Reducing LLM Context
An executable passage-level workflow for reducing LLM input while retaining source IDs, hashes, explicit coverage metrics, and honest evidence boundaries.
Published August 8, 2026 · Maha Strategies LLC
Citation traceability
100%
Every selected benchmark passage emitted a source reference
Complete evidence sets
62.8%
95% Wilson interval 56.7–68.6%
Mean evidence recall
67.4%
At 74.4% mean token reduction
Preserve identity before reducing text
Split each document into stable passages before ranking. Carry a source ID, passage ID, and content hash with each passage. Selection may then omit passages, but it must never silently detach retained text from its origin. The downstream prompt should require passage citations and the application should reject citations that do not appear in the returned pack.
Traceability is not the same as completeness. MCRB-1 produced traceable references for every selected passage, while only 62.8% of questions retained every human-annotated evidence span. Both measurements belong in the product boundary.
The four records to keep
- Source record: source ID, title, source hash, and original token estimate.
- Passage record: passage ID, source ID, passage hash, and exact included text.
- Boundary record: budget, reduction, source coverage, warnings, and excluded-passage behavior.
- Pack record: input and output hashes so the received context can be checked for mutation.
Executable TypeScript check
const pack = await maha.compress({
clientRequestId: crypto.randomUUID(),
task: "Identify the release condition and rollback trigger.",
tokenBudget: 1800,
documents,
})
const validIds = new Set(pack.includedPassages.map(p => p.passageId))
const answer = await model({
instruction: "Use only the pack. Cite claims as [source-id:passage].",
context: pack.context,
})
for (const citation of extractCitations(answer)) {
if (!validIds.has(citation)) throw new Error("Untraceable citation")
}The citation parser is application-specific. The invariant is not: every accepted citation must resolve to an included passage, and the UI must expose the original source boundary.
Do not hide retention loss
If a source receives no selected passage, show that fact. If complete evidence retention is not known for the live workload, do not substitute source participation as though it were the same metric. The published benchmark measures both and states that retained evidence does not guarantee correct reasoning.