Render citations in internal AI answers from records your application retrieved for that request and can still disclose to the reader. Have the model refer to those records by ID. Before you show a citation, resolve its ID, check the document version, and confirm that the reader can see its title, link and excerpt. This release check matters even when retrieval already checked document permissions.
Use retrieved source records
Assign each retrieved chunk a reference scoped to the conversation turn. Record the document ID, version, excerpt and original source. Build links from your source catalog or document system. Keep provider-supplied citations in a distinct field until you validate them and can apply any required provider display rules.
Google Cloud's Agent Search grounding response can include grounding chunks and claim segments that refer to those chunks. It can also omit grounding metadata, for example when the sources have low relevance. If you rely on grounding metadata for internal answers, give missing metadata an explicit outcome. Google Cloud grounding with Agent Search
A retrieved-set check is a useful first test. Microsoft's RAG example describes checking that named citations exist among the retrieved sources. Apply a second check to tell whether you can disclose those sources at rendering time. Treat factual support as a separate review question. A valid reference to a document can point to a passage that does not support the claim. Microsoft grounding validation example
Test the release decision
Suppose your internal procurement assistant uses policy documents in a shared repository. It retrieves a purchasing guide and a restricted contract addendum for a user with access to both. The system needs to handle these hypothetical outcomes.
| Condition when you render | Citation action | Answer action |
|---|---|---|
| A current, permitted guide supports the claim | Render the verified title and link | Release the supported claim |
| The model refers to a source ID absent from the retrieval result | Suppress the reference | Recheck support or withhold the dependent claim |
| The user's access to the addendum changed during generation | Suppress its link, title, and excerpt | Withhold text derived from the restricted source |
| The guide was replaced with a different version | Resolve the exact source version and check its status | Regenerate against the current version if you cannot release the original |
| All links are valid but the claim lacks support | Avoid attaching an unrelated citation | Ask for clarification or defer the answer |
Capture permissions from your authorization service close to release. An authorization error or timeout should follow your missing-evidence rule. If your application streams text, decide which parts can leave the server before the check finishes. For sensitive material, buffer the dependent answer and citation together. Removing a denied link after streaming the title or quoted text leaves the earlier disclosure in place.
Apply the check when answers are reused
A cached answer or a forwarded report can outlive a user's access to the documents it cites. Apply the same check when you show stored answers to another reader, and enforce permissions again when they open the document. If a report export has a different audience, evaluate that audience before including the source or the derived text. Preserve source-version references in the application record for review.
Track missing IDs, denied citations, stale versions and unsupported claims as separate outcomes. A rise in missing IDs may indicate a response format change. More denied citations may point to a stale retrieval index or a mismatch between its authorization snapshot and the source system. Record identifiers and decisions without copying restricted excerpts into logs.
Use document access checks for enterprise RAG to review retrieval. Then map which content your inference gateway inspects and which citation checks your application owns. Alectura's guardrails documentation describes covered content and available actions. The application needs your source catalog and authorization system to release an internal citation.
Source documents (2)
Trace a request through Alectura.
Bring a sample prompt and a customer policy. See what reaches the model and which decisions appear in the request record.