Skip to content

Context delivered and omissions

ctxflow answers, per turn: which chunks were delivered to the model? A chunk is delivered when a retrieval of the turn returned it. ctxflow states what the model was given, never what it did with it: it does not say whether the answer used, ignored or overlapped a chunk.

  • The items of a turn are the documents returned by its retrieval spans: retrieval.documents.N.document.* (OpenInference) or gen_ai.retrieval.documents (OTel GenAI), see Retrieval. Chunks come only from retrieval spans: the text a tool returns is not read as chunks, so a tool that searches a vector store needs a retrieval span (a manual retrieval span).
  • A chunk counts once per turn, however many searches returned it. The count is of identified items of any kind (a chunk, or a record), not of searches.
  • The figure needs ids, not text: it also works with Store text off.

Where you see it: Chunks delivered on Usage, Chunks per turn on Health, Context delivered on Turn detail, and the delivered counts per document on Documents.

Older SDKs and collectors still send a ctxflow.usage span with an overlap score. ctxflow accepts it and ignores it: it never changes a figure (changes in 0.2.2). The score itself is gone from the product: a word overlap check gave false “unused” for paraphrases, summaries and answers in another language.

Every metric is a numerator over a denominator. The ratio is a convenience and is null when the denominator is 0.

Id What it counts Unit
M3 Retrieval calls that returned at least one item with an id / all retrieval calls retrieval calls
M4 Tool calls seen by the server whose turn names a conversation and a user / all of them tool calls
M5 Turns whose remote client tool calls all have a server twin and whose context items are all resolved / all agent turns. Calls to MCP servers count when the client side is traced (mcp 2.x client spans) turns
C6 Retrieved items whose source was deleted or had another hash when retrieved / items with a known source state retrieved items

M4 counts tool calls the server saw only (a client and server pair counts once; a tool that returns retrieved items is a tool call): a tool that runs inside the agent and has no server span is not in M4. How a client call and a server call become one call: Tool calls.

An omission is something a turn shows it lacks. Each comes with a reason code and the ids of its evidence.

Kind In the app Definition Needs
no_retrieval Missing retrieval An agent turn with no retrieval call, of an agent that makes retrieval calls in the environment, and no remote client call without a server twin (that call could have been the retrieval). Reason no_retrieval_call. Confidence: if the turn made a tool call (one definition) but no retrieval, it may be an action that needs no documents, so it is low: it is listed marked “Low confidence” (reason code no_retrieval_tools_only, text “The turn used tools but no retrieval”) and not counted in summaries, conversation counts, the Usage page or Health. A turn with no tool call at all is high and counted. S1, S3, retrieval calls in the environment
tool_failed Failed tool A tool call (client or server side) with status error. A tool that returns retrieved items (a native or MCP search tool) is a tool call. A call seen from both sides counts once. Reason tool_error. S3
retrieval_failed Failed retrieval A retrieval call that is no tool call (the generic retrieval span of a framework or SDK, or a rerank) with status error. One per call: a call is either a failed tool or a failed retrieval. S1, and retrieval calls recorded
stale_context Stale context A retrieved item whose C6 state is stale, once per turn and chunk. Reason source_deleted, hash_mismatch or version_mismatch. S4, S10, and at least one item with a known state

A kind whose signals are missing is unavailable, never counted as 0, and its rows are not listed: without retrieval spans, every turn would otherwise look like a missing retrieval.