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 traceWith Block on
A retrieval span is present, and you left the count blankThe model call runs.
No retrieval span, and one is requiredThe model call is denied.
A span is present, but the chunk count is below your minimumThe model call is denied.
You set a minimum, but the span has no chunk countThat 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

  1. In the app, open Policies and click Create Policy.
  2. Choose Retrieval Completeness.
  3. Turn on Require A Retrieval Span. Set Minimum Chunk Count only if you want a number checked.
  4. 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.