Retrieval-augmented generation (RAG) retrieves material relevant to a question and uses it to generate an answer. For each question employees frequently ask, record the account permissions, as-of date, expected conclusion, and location of the supporting text. Record a failure if the system uses a document the user cannot access, even when the answer is correct.
Record when each document applies and who can view it
- The responsible department verifies the document ID, version, approval status, effective date, and end date. Distinguish upcoming revisions from versions currently in effect.
- Decide whether to support questions about policies as of a past date. If you support historical questions, retain the versions in effect at the time. Otherwise, tell users to avoid applying current policies to past situations.
- For scanned documents, compare the OCR output with the original. For tables, verify that retrieval returns the row heading, column heading, and footnotes along with the corresponding value.
- If the main document and its attachment have different permissions, register them separately. Verify that each document passage used for retrieval is linked to the source material’s permissions and version.
Test the same question with different accounts and as-of dates
The examples below use a fictional internal policy for testing. In the last column, the reviewer records the actual answer, the location cited, and whether the test passed or failed. A reviewer with access to the restricted material manages any checklist that contains expected answers from that material.
| Test question | Account and conditions | Expected result | Actual result and verdict |
|---|---|---|---|
| Who approves business travel? | Employee · as of the day before the revision takes effect | Cite the clause requiring team lead approval in the version then in effect | Enter result |
| Who approves business travel? | Employee · as of the revision’s effective date | Cite the clause requiring division head approval in the revised version | Enter result |
| How is executive compensation calculated? | Compensation specialist | Cite the calculation clause in the test policy the account can access | Enter result |
| How is executive compensation calculated? | Employee · no publicly available supporting source | State that no supporting source can be verified and withhold the restricted document’s name and contents | Enter result |
| Does the company cover the cost of purchasing a membership? | Employee · no relevant policy registered | Leave coverage undetermined | Enter result |
Open the source link and verify what supports the conclusion
Open the source link with the account that asked the question and verify the document version and the relevant clause. For an answer drawn from a table, also check the row, column, and footnotes. If the question concerns international travel, an answer that correctly names the approver for routine travel still fails if it omits a separate approval exception.
When a test fails, an authorized reviewer checks the retrieved passages. If retrieval missed the correct clause, check document extraction and retrieval criteria. If it returned the clause but the conclusion was wrong, check answer generation and how citations are linked.
Distinguish missing evidence from an ambiguous question
If a policy does not mention a purchase expense, answering “The company does not cover it” incorrectly treats missing evidence as a prohibition. Tell the user when no supporting source can be verified, and define when to refer the question to the responsible department. If the answer depends on the application date or the user’s department, check that the system asks for the missing detail before presenting the applicable clause.
Test immediately after access revocation, document revision, or deletion
Revoke access for a test account that viewed restricted material, then ask the same question again. Check the new search results, answer, citation preview, and existing source link separately. Record a failure if the system reuses a cached answer and returns restricted content in response to the new request.
Record when the document was revised or deleted and when the change appeared in search results. After a revision, the answer must cite the version applicable to the as-of date. After deletion, new answers must no longer rely on passages from the deleted document. Agree separately on the acceptable delay for document updates and when access revocation takes effect.
AEND’s RAG system supports automatic reindexing and permission-based search and provides source links and clause numbers. It only returns answers backed by a source.
For your free technical consultation, prepare sample documents you can share, representative questions, and the answers you expect.