System Design Atlas

Knowledge assistant with source references

05 / 10Worked example

Data and states

How can an answer be traced back to its source status at that time?

Originals, search representations and answers have different tasks. The draft records the original, document version, pipeline version and position anchor, so that an index can be rebuilt and a response can later be returned to its source status.

Starting point The contract refers to references; now the original, version, passage and response are permanently linked.

Assumptions for the example case

Example design: one operator's internal knowledge, a bounded document collection and existing authentication. Numbers and targets are assumptions. The assistant reads knowledge; tool actions and open-web research are outside scope.

Trace document D-17 to the passage used

D-17, DV-17, P-17, Q-17 and A-17 form an evidence trace

Authoritative · document and version

Document D-17Domain identity, title and source
11..nOwned
Document version DV-17Immutable version, approval and permissions
0..n Access rules
Permission R-*Role, purpose and validity
DV-17 1 : 0..1 OriginalDV-17 references secured original status

Original base · Secured if necessary

OriginalContent or referenceable origin with hash

When the original is backed up, DV-17 keeps the detectable connection. Protection and deletion periods follow the business rule.

DV-17 1 : n P-17DV-17 delivers the pipeline input

Projection · Search index

Passage P-17DV-17, position anchor and pipeline version
Full text and vector
Search indexPassage, search characteristics and rank
P-17 n : m A-17P-17 supports claims in A-17

Use · answer trace

Question Q-17Person, Role and Time
10..1leads to:
Response A-17Status, text and evidence references
Evidence traceP-17 · DV-17 · Pipeline version · Position anchors
  • Authoritative metadata and original reference
  • Search index from version and position
  • Answer and evidence trace

A historical document identity can only be reproduced if a secured original status, pipeline version and position anchor are available. The presentation does not promise a storage period for sensitive content.

Originals remain protected, versions are traceable and the search index can be rebuilt from them.

Document version states

StateSignificancePermitted next step
discoveredSource version recognizedprocessing or targeted blocking
processingText and passages are preparedready after full check; failed in case of error
readyFully prepared and releasedActivate as current version; retired or revoked upon change
failedProcessing incompleteClear errors and repeat the same import in a controlled manner
retired/revokedReplaced or no longer releasedRemove from current search; lock output by release check

discovered

Significance
Source version recognized
Permitted next step
processing or targeted blocking

processing

Significance
Text and passages are prepared
Permitted next step
ready after full check; failed in case of error

ready

Significance
Fully prepared and released
Permitted next step
Activate as current version; retired or revoked upon change

failed

Significance
Processing incomplete
Permitted next step
Clear errors and repeat the same import in a controlled manner

retired/revoked

Significance
Replaced or no longer released
Permitted next step
Remove from current search; lock output by release check

The main consistency rules

Atomic version change
Only when all required passages are ready, the active document version is changed. Mixed subsets do not appear as a complete document.
Permissions and revocation
Current approval status immediately excludes a blocked document. Index cleanup and deletion of derived data follow through a traceable process. Permission metadata in chunks alone is insufficient.
Minimal answer trace
Document ID, document version, pipeline version and position anchor support historical verification. Rebuilding the index must preserve these references: before activation, verify that every stored anchor resolves to the original. Store complete questions and answers only with agreed need, protection and retention.

Terms in this step

chunk
A bounded document passage that can be retrieved individually and cited as evidence.

Try it yourself

Draw D-17, DV-17, passages and A-17. Mark authoritative facts, rebuildable derivatives and approval.

A hint for your attempt

Original repository, SQL metadata and search index have different tasks. The index is derived and does not replace a current rights check.

Compare with a possible solution
Authoritative
DV-17 holds version, release status and rights; the original remains protected. Test: A response with DV-17, pipeline version and position anchor opens exactly the passage used; if the anchor is missing, it is held back.
Derivatives
Passages and search features can be rebuilt from approved versions. After rebuilding the index, the test set must resolve the same source anchors; an unresolvable anchor is a negative case and cannot silently appear as a valid source. The previous version stays active until all new-version data is verified; change approval and the active-version pointer together.
Relationships and cardinalities
A document D-17 has multiple versions, each version DV-17 has multiple passages, and A-17 references one or more passages used; each passage belongs to exactly one document version. Test: Version with 0 passages remains in `processing`/`failed`, a passage without DV-17 is rejected, and any valid reference opens its position anchor.

Apply to your project

Which data is authoritative in your system, and which can be rebuilt without loss?

Step 6 distributes the data model across ingestion and answering.