Assumptions
- You already know which repositories, indexes, or connectors a workflow is allowed to query.
- Business authorization decides which documents a user is allowed to retrieve.
- Anthale can evaluate the input and output boundaries around the retrieval flow.
Secure the retrieval flow
1
Inventory sources and trust levels
Separate internal curated material, user-generated content, external web content, and third-party connector data. Do
not label a source as trusted just because it lives in your system.
2
Enforce retrieval eligibility before search
Check user and workflow authorization before the retrieval system runs. Anthale does not replace document or record
entitlement checks.
3
Evaluate retrieved text before prompt assembly
Run Anthale before retrieved snippets are appended to the prompt. This is where prompt injection, unsafe links, and
sensitive data often first enter the model context.
4
Preserve provenance with every chunk
Keep source identifiers, repository names, URLs, or document references attached to retrieved material so you can
explain where a risky snippet came from.
5
Keep instructions separate from retrieved text
Do not merge retrieved text into system instructions or reuse raw chunks as implicit policy. Retrieved content is
context, not authority.
6
Re-check the final response path
Run Anthale again on the model output before it reaches a user or another system. A safe retrieval layer does not
remove the need for output checks.
What this looks like in code
Common failure patterns
- Retrieval happens before authorization, so the model sees data the user should never have accessed.
- Prompt assembly does not preserve the source of each chunk, which makes incidents hard to investigate.
- The model is told to follow instructions that appear inside retrieved text.
- The output path is left unchecked because the team assumes the input path already handled the risk.
Apply this in Anthale
- Create a first policy when you want to test one RAG boundary before rolling Anthale into a larger retrieval stack.
- See the enforcement API when you need the runtime contract for evaluating retrieved chunks or output.
- Request access when you want to review a retrieval workflow that is moving toward production.