Retrieval Completeness
Stop an AI agent from answering before it has searched. Retrieval Completeness denies the model call when no retrieval happened, or when too few chunks came back.
Real-Time(Preventive)Checked before the call runs, so it can stop it
An answer agent should search before it replies. Retrieval Completeness checks that a search actually happened in this trace, and optionally that it returned enough chunks. If not, the model call is denied.
Runs On
The SDK only
You Set
Require A Retrieval Span, and optionally a Minimum Chunk Count.
Your Agent Sends
Retrieval attributes on the search span
What Happens
| Evidence on this trace | With Block on |
|---|---|
| A retrieval span is present, and you left the count blank | The model call runs. |
| No retrieval span, and one is required | The model call is denied. |
| A span is present, but the chunk count is below your minimum | The model call is denied. |
| You set a minimum, but the span has no chunk count | That check is skipped and the call runs. The match is recorded as a warning. A missing count is never treated as zero. |
Traccia does not judge whether the chunks were the right ones, and it does not call a model to grade the answer.
Set It Up
- In the app, open Policies and click Create Policy.
- Choose Retrieval Completeness.
- Turn on Require A Retrieval Span. Set Minimum Chunk Count only if you want a number checked.
- Set the mode to Block, then click Activate Policy.
What Your Agent Sends
Set traccia.retrieval.present and, if you count them, traccia.retrieval.chunk_count on the search span, before the model call in the same trace. Leave the count off when you did not count chunks. See the code.
Good To Know
- This policy does not apply on the Gateway.
Next Steps
© 2026 Traccia.