Concepts

Context Inventory

Searchable normalized decision inputs for prompts, retrieval, memory, state, tools, and settings.

Context inventory is the bridge between raw traces and useful hypotheses. It normalizes captured material into items that can be searched, hashed, targeted by experiments, and cited in reports.

Context Item Kinds

KindExamplesTypical visibility
system_messageSystem promptmodel_visible
developer_messageDeveloper prompt sectionsmodel_visible
user_messageUser requestmodel_visible
assistant_messageAssistant stream or final answermodel_visible
prompt_clauseOne instruction extracted from a promptmodel_visible
tool_argumentTool input payloadtool_visible or model_visible
tool_resultTool output payloadtool_visible or model_visible
retrieval_chunkRAG document, source snippet, ranked resultmodel_visible
memory_itemPersisted memory or scratchpadmodel_visible
state_fieldCheckpoint state path or graph statestate_only
tool_schemaTool name, description, parametersmodel_visible
model_settingTemperature, max steps, provider configmetadata_only or model_visible

Visibility values are model_visible, tool_visible, state_only, and metadata_only.

Hashes And Paths

Every context item has a path and contentHash.

  • Use stable paths such as prompt.system, retrieval.claimPolicy[0], state.claim.status, or tools.lookupClaim.schema.
  • Use contentHash as an expectedBaseHash in experiment specs when you need stale target protection.
  • Use ordinal when item order matters, especially prompt messages, retrieval chunks, and prompt clauses.

Why Inventory Beats Raw Prompt Dumps

A single prompt artifact is difficult to target. Inventory lets you ask better questions:

QuestionInventory query
Did a policy clause mention refunds?kind=prompt_clause, query=refund
Which retrieval chunks were model-visible?kind=retrieval_chunk, visibility filter in metadata or result inspection
Did the model see a tool schema?kind=tool_schema
Was a state field present before a decision?checkpoint inventory for kind=state_field
Which setting could explain nondeterminism?kind=model_setting

Capture Advice

  • Annotate context close to the runtime boundary, not after the fact.
  • Split large prompts into clauses when individual instructions may be causal.
  • Capture retrieval rank and source metadata.
  • Capture memory provenance: persistent memory, session memory, scratchpad, or tool-derived state.
  • Capture tool schemas as context, not only tool call args.
  • Store redacted content artifacts rather than stuffing sensitive text into metadata.

On this page