Skip to main content
Modern RAG is no longer “retrieve once, then answer.” The frontier is a reasoning loop that decides when to retrieve, at what granularity, how much, and whether the evidence is good enough — then retrieves again. RCP keeps the core retrieve stateless but exposes the handful of primitives those loops need, all optional and capability-gated (absent ⇒ classic behaviour, no wire break).

The primitives

Sessions

An opaque sessionId threads many retrieves in one trajectory so the server can dedup already-seen hits and cache frontier/plan state. Gated by session. See retrieve §sessions.

Confidence

A normalised [0,1] Hit.confidence — comparable across calls — that corrective and adaptive systems threshold on. Gated by retrieve.confidence.

Granularity & level

unit (chunk · document · node · triplet · path · subgraph · community · tree-node · page) and level (RAPTOR depth, Leiden level) select what and how abstract a hit is.

Token budget

tokenBudget packs top hits until they fill N tokens instead of a fixed k — long-context readers and the chunk-explosion problem.

Provenance

Hit.provenance carries graph/tree lineage (path · nodes · edges · leaves) for auditable, path-level citation.

Feedback & memory

feedback flows reward/used/poison signals back; memory builds a global memory that emits retrieval clues.

Mapping SOTA systems to RCP

The canonical loop

Every one of these is a client policy over standard RCP methods — RCP supplies the efficient state handle, not the agent:
RCP deliberately does not prescribe an agent policy — when to stop, how to route, what reward to assign. It exposes only the primitives (sessions, confidence, granularity, budget, provenance, feedback, memory) that make an agentic loop efficient and auditable. The reasoning stays in the client.
See Appendix B of the specification for the full technique-to-surface mapping.