By · Updated

AI-generated photograph: folders, documents and laptop on a desk
Practical method

Prepare a document corpus for a RAG assistant

A document corpus is the set of documents an assistant may use. Usefulness depends on relevance, versions and access rather than just imported file count.

01

Start with questions to answer

Prepare authorised real questions or representative fictional cases. Identify documents that should support each answer and cases where the answer must remain unknown.

Fictional example: a support assistant retrieves a current procedure and an archived version. The corpus must distinguish their roles instead of mixing instructions.

02

Inventory versions and owners

Retain title, identifier, owner, version, validity date and original location. Distinguish file date from content applicability. Specify how corrections propagate.

A recent procedure may cite an older appendix that remains valid. Selection should not merely prefer whichever document has the latest date.

03

Define authorised documents

Determine who may read each document and whether system use is authorised. Separate public, internal and restricted material. The assistant must not bypass restrictions through answers or citations.

Prepare a case where a person must not see information. Use fictional documents initially without transferring sensitive data to an unapproved tool.

04

Evaluate retrieval and answers

For each case, check whether correct passages are retrieved and answers remain grounded in them. Record retrieval errors separately from answer errors. A displayed reference may not support a claim.

Retain passage, version and review conclusion. Test cases lacking suitable documents to ensure the system signals limits instead of inventing answers.

05

Preserve passage context

Test chunking on a table, a stepwise procedure and a text with exceptions. An isolated passage may lose the unit, date, column heading or condition required for a correct answer. Keep the information needed to interpret the retrieved passage.

For a trial question, open the cited location and check whether it actually supports the answer. Similar wording is insufficient. When an answer needs several passages, inspect their versions and scope for compatibility before combining them.

06

Test permission and document removal

In a test environment, remove a user’s access to a previously available document. Repeat a question that used it and inspect previews, citations and cached answers. Deleting the original file does not establish that every derived copy has disappeared.

Assign responsibility for propagating removal into the index and checking completion. Distinguish revoking access, correcting a document and archiving it: they may require different handling. Keep test evidence without copying sensitive content into the log.

Worked decision

Contradictory documents do not establish a reliable answer

Fictional teaching example, not a client result or a market benchmark.

A document assistant searches a 2023 internal guide and an approved 2026 procedure. One question asks about the current process; another comes from a person without access to internal documents.

On a small screen, scroll horizontally to read every column. You can focus the table area and use the left and right arrow keys.

Prepare difficult cases before indexing
Document or questionExpected handlingCheck
Old guide still accessibleIdentify its date and obsolete statusNo current answer based solely on that guide
Approved 2026 procedureRetain version, owner and source passageAnswer linked to the relevant passage
Question outside the corpusState that the answer is not establishedNo invented procedure
User without internal accessExclude unauthorised passagesNo disclosure, including in citations

Passage splitting must retain useful context: title, version, scope and restrictions. A correct passage separated from an exception can produce a misleading answer.

Prepare known-answer questions, contradictions and cases requiring abstention. Test permissions before passage retrieval, then check the answer and citations for each relevant user profile.

What to record before deciding

Keep the inventory, version status, access rules, test questions, expected answers and document withdrawal procedure.

A record to keep with the decision

Minimum evidence for a review
ItemEvidence
QuestionsCovered cases and expected or unknown answers.
DocumentsIdentifier, version, owner and validity.
AccessAuthorised audience and tested restrictions.
EvaluationRetrieved passage, answer and review evidence.

Frequently asked questions

Should every document be imported?

Select documents useful to permitted questions with context and versions. A larger corpus does not prove better answers.

Does a citation guarantee the answer?

No. Check that the passage actually supports the answer and applies to the case.

Reference material

DGE · Guide RAG

The practical checklist is an editorial synthesis to adapt to your service. It does not constitute a certification or an audit result.

Continue with a related decision