This is a draft, and a thesis. Where v5 shipped the mission kernel and v6 the DevOps operating system around it, v7 formalizes what the planner has quietly been all along and pushes it one level higher - from "which retriever" to "which representation of knowledge should answer this at all." The evidence is already published: the retrieval and reasoning benchmarks, and the property-graph work on real KYC data. Treat forward-looking phases as intent, not as completed guarantees; the implementation-status table separates what exists today from what is planned.
The first generation of AI infrastructure optimized prompts. The second optimized retrieval. Our benchmarks demonstrate there is no universal best retriever, reasoning strategy or language model across workloads: the winner changes with the question, the corpus and the regime. Context Runtime raises the optimization one level. An application describes intent; the runtime selects the knowledge representation, retrieval method, reasoning strategy, verification policy and execution plan that measured outcomes say will answer it best, then learns from the result. v7 states this as a single architectural claim - the AI query planner - and supports it with formal planner interfaces, a property-graph case study on 182,445 real GLEIF entities, benchmark methodology, an implementation-status ledger, and a comparison with the frameworks it is often mistaken for.
v7 starts from measurement, not from architecture. Two benchmark suites, both public and reproducible, converge on the same finding from opposite ends.
Retrieval. Across PopQA, MuSiQue, LongMemEval, TEMPO and a domain corpus, no single retriever wins: reasoning-retrieval (DIVER) leads multi-hop at 0.93 recall@4 while lexical ties it on lookup; a Russian domain corpus flips the ranking and a multilingual encoder wins; temporal-reasoning does not separate at retrieval at all. The routed policy tracks the column winner (CR-auto 0.97 on MuSiQue). The newest slice extends this to five engines on real KYC data: given a plain-English question the planner selects BM25, dense vectors, HippoRAG, SQL or the property graph, routing to the correct representation 94.9% of the time and the correct engine 91.5% of the time.
Reasoning. The reasoning suite shows the mirror image: retrieval is necessary, not sufficient. On TEMPO every retriever ties at 0.59 recall - the evidence is easy to find - yet a learned thinking pass over the full context lifts the answer from 0.79 to 1.00. And, honestly, the same thinking pass hurts multi-hop (0.79 to 0.71): effort is not free and not universally good. It is a per-class decision.
That is a planning statement. If the best access path to an answer depends on the query and the data, then choosing it is a planner's job - and we already have a mature discipline for exactly that shape of problem.
A relational database does not ask the application how to fetch rows. SQL is declarative: the application states what it wants, and a cost-based query planner decides how - sequential scan or index scan, nested-loop or hash join, which index, which join order - by consulting table statistics and a cost model, then picks the cheapest plan that satisfies the query. The application never changes when the planner picks a different path; the path changes as the data changes.
This is precisely the abstraction AI systems are missing. Today an application hard-codes its access path: it is a RAG pipeline, or it is a graph query, or it is a fixed agent loop. Context Runtime makes the access path a planning decision. The application states intent; the planner enumerates candidate ways to answer - representations, retrieval methods, reasoning strategies, verification policies - scores them against a measured cost model, and executes the plan that wins.
ANALYZE; the runtime's cost model is updated by every mission it runs.The analogy is load-bearing, not decorative. It tells us what a mature version of this layer must have: an enumerable space of plans, a cost model grounded in statistics rather than intuition, an optimizer that prunes and selects, an EXPLAIN that makes the choice legible, and a feedback path that keeps the statistics honest. v7 claims each of these for AI, and the rest of the paper builds them out.
The planner is not one decision but a stack of them, each a measured routing choice, each with its own benchmark. From the application down to the knowledge systems:
Applications ↓ Mission planning compose representations · verify · abstain or recommend ↓ Reasoning planning which reasoning strategy · how much effort → /benchmarks/reasoning ↓ Representation planning which knowledge representation answers this → /benchmarks/representation ↓ Retrieval planning which retriever within that representation → /benchmarks/retrieval ↓ Knowledge systems documents · SQL · graphs · temporal · streams
Each layer is now measured. Retrieval planning (which retriever) and reasoning planning (which strategy, how much effort) are the two published suites. Representation planning - the decision above both, which this paper introduces - is measured by RepresentationBench: 300 curated enterprise questions across analytical, document, graph, temporal, code and multimodal, routed by the real planner at 92.7% representation-choice accuracy and 92.8% within-representation method routing, each decision sub-millisecond and legible. Mission planning - composing several representations into one verified decision - is the top of the stack; its benchmarks (KYC Go/No-Go, a harder matching-robustness half, and Retail restock over real Walmart demand) are shipped, and are deliberately built so the composed decision can be measurably wrong - real robustness numbers, not 100% by construction. The rest of this paper walks the stack.
Enterprise knowledge is not one shape. It lives as documents, relational tables, property graphs, temporal histories, multimodal assets, source code, operational systems and event streams. Each is a different access path to an answer, with a different cost profile and a different regime where it wins. The planner's first and highest-leverage decision is which representation a question needs - because that choice dominates everything downstream. Retrieving a document when the answer is a five-hop ownership chain is not a tuning error; it is the wrong access path.
| Representation | Access paths (methods) | Wins when the question is… |
|---|---|---|
| document | dense vectors · BM25 · hybrid | a fact stated in text; lexical for exact ids, dense for paraphrase |
| graph (reasoning) | HippoRAG · SimGraph | multi-hop: the answer is in the connections between passages |
| graph (system of record) | Cypher · Gremlin | an exact, auditable traversal: ownership, UBO, entity links |
| analytical | SQL · Mongo · Elasticsearch | an aggregate or a filter over a known schema (counts, rankings) |
| temporal | Graphiti · state_at(T) | point-in-time state: what was true then, what changed |
| multimodal | CLIP · ColPali/ColQwen | the answer is in an image, a page render or a diagram |
| code | AST scope-graph | "where is X defined", "what calls X" over a codebase |
Two of these rows deserve emphasis because they are new in v7's telling. The graph representation now holds two engines that answer different questions - an approximate reasoning graph (HippoRAG) and a deterministic system-of-record graph (Cypher/Gremlin) - and the planner chooses between them by query shape. And the temporal representation reframes a large class of "retrieval" problems as state reconstruction: many production questions are not "find the document" but "reconstruct what was true at time T", which a bi-temporal store answers directly and a document index cannot.
The planner turns an intent into an executed plan through a fixed pipeline. It is the same lowering the runtime has always performed, now named, formal and back-compatible: intent analysis classifies the request to a representation; candidate generation enumerates the plans that representation admits (method × model tier × reasoning strategy × verification); a rule pass prunes the inadmissible and the policy-violating; the cost model scores the survivors; the optimizer selects; execution runs; and the measured outcome updates the model.
The layer is small and pluggable by design. Four interfaces define it; every retriever, model and estimator is an implementation behind one of them.
IntentAnalyzer.analyze(goal) -> Intent{ bucket, representation, confidence }
CandidateGenerator.generate(intent,goal)-> [Candidate{ steps=[retrieve·rerank·route·reason·verify] }]
Estimator.estimate(candidate, goal) -> PlanScore{ value, cost_usd, latency_s, risk, hallucination }
Optimizer.select([(cand, score)], goal) -> Plan{ chosen, rejected[(cand,reason)], score }
RetrieverPlugin.search(query, k, method)-> [Hit{ id, text, score, meta }] # the access path
Selection is a bounded optimization, not a heuristic. Each candidate is scored on a common utility and the optimizer picks the highest-value plan that fits the mission's budget and policy - a knapsack over admissible plans:
utility(plan) = w_v · value # expected answer quality (recall × model accuracy)
- w_c · cost_usd
- w_l · latency_s
- w_r · risk # hallucination, governance, sensitivity
subject to: cost ≤ budget, sensitivity=restricted ⇒ tier=local,
require_citations ⇒ a verify step exists
select = argmax utility(plan) over the pruned candidate setThe value term is where routing lives. The estimator holds intent-aware priors - a graph engine's recall edge on multi-hop, the property graph's on ownership, SQL's on aggregates, a full-context thinking pass on temporal - so the specialist access path outscores the safe default exactly on the questions it is built for. Those priors are a cold start; the feedback loop refines them per deployment from measured value.
Single-representation questions are the easy case. Real decisions compose. The planner does not just pick one access path; it assembles several into one execution graph, gathers evidence from each, and hands a verifier the union. Three worked examples, two shipped and measured and one on the roadmap, show the same machinery at different scales.
The property graph is the sharpest test of the thesis, because it is the representation most tempting to treat as a special integration. v7 treats it as an access path like any other, and the result is measured on real public data rather than asserted.
Ownership questions - "who ultimately owns and controls this business" - are variable-depth traversals up an ownership DAG, the one query shape relational stores are structurally worst at (a recursive join that re-scans per level) and a graph is best at (index-free adjacency, one pointer walk per hop). So the runtime gains two retrieval methods, cypher (Neo4j / openCypher) and gremlin (Neptune / TinkerPop), that map to the graph representation alongside the incumbent HippoRAG. Ownership phrasing routes to the deterministic engine; "how is X connected to the ring" still routes to the reasoning engine. Two graphs, chosen apart.
RetrieverPlugin seam as every other engine. The cost model selects between the exact traversal and the reasoning graph by query shape; the graph database stays the system of record and the runtime stays the planner.The retriever is safe by construction: the query value is always parameter-bound (it never touches the Cypher string), traversal depth is bounded, an optional row-scope predicate carries the permissions plane, and the full path is preserved on every result for audit. We loaded the GLEIF golden-copy relationship records - real corporate consolidation/control links - plus entity names, flagged against OpenSanctions, into Neo4j, and measured the unchanged retriever against it.
| What we measured (real GLEIF + OpenSanctions) | Result |
|---|---|
| graph loaded into Neo4j | 182,445 entities · 168,818 ownership edges · 3,765 sanctioned |
| the N-hop ownership traversal itself (index-free adjacency) | 0.53 ms |
| name → ultimate owner, CONTAINS scan vs full-text index | 67 ms → 7 ms |
| retriever vs ground-truth Cypher owner set | identical (exact) |
| planner routes plain-English question to the right engine | representation 94.9% · engine 91.5% |
The finding that matters: the traversal was never the cost. The variable-depth walk on a six-figure graph is sub-millisecond; the only real cost was the seed lookup, which an index removes. And the planner distinctly selects the property graph for ownership while keeping HippoRAG for reasoning - the two-graph coexistence the thesis predicts, measured. Full numbers and methodology are on the retrieval benchmark.
A recurring category error in RAG is to treat a temporal question as a retrieval question. "What did we know about this account in Q1", "what changed after the policy update", "what was the ownership structure before the restructuring" are not searches for a document; they are reconstructions of state at a time. The runtime exposes this directly as state_at(T) over a bi-temporal store (Graphiti), so the temporal representation returns the world as it was, with provenance, rather than the latest chunk that happens to mention it. The reasoning benchmark makes the stakes concrete: on TEMPO the evidence is trivially findable (every retriever ties), and the entire lift comes from reasoning over the reconstructed state - which is why temporal is a representation the planner routes to, not a corner of document search.
A cost-based planner is only as good as its statistics. A database runs ANALYZE; the runtime runs every mission. Selection is a contextual bandit keyed on the intent class: the estimator's priors give a cold start, and each executed plan's measured outcome - realized cost, latency, verified answer quality, and for missions the eventual success or reversal - updates the value the next selection reads. Two properties make this trustworthy rather than a black box. First, discounting: recency-weighted learning lets the model track drift (a model upgrade, a corpus shift, a price move) instead of being anchored by stale history - the drift benchmark shows this recovering most of the oracle reward where plain averaging does not. Second, legibility: EXPLAIN surfaces the full candidate menu for a class with each arm's cost prior and learned value, and flags the cost/quality Pareto frontier, so a routing decision reads as "the cheapest arm that answers this class," auditable after the fact.
The benchmarks are built to be believed, not to flatter. Four principles govern them.
Context Runtime is regularly compared to tools it does not compete with, because they occupy adjacent layers. The distinction is the query-planner one: an orchestration framework lets you wire an access path; a graph database is one access path; the runtime chooses and composes access paths by measured cost. It sits above the frameworks and beside the stores, and it can drive both.
| System | What it is | Relation to the query-planner layer |
|---|---|---|
| LangChain | library of components + chains | you hand-wire the pipeline; the access path is fixed at author time. CR selects it at run time. |
| LangGraph | stateful agent graph runtime | you author the control flow; it executes what you drew. CR generates and scores the graph from intent. |
| CrewAI / AutoGen | multi-agent role orchestration | coordinates agents; no cost model over representations. CR is the planner such agents could call. |
| Amazon Bedrock | managed models + KBs + agents | a hosted single-path RAG/agent surface. CR is the routing layer over many paths, self-hostable, model-agnostic. |
| DSPy | compile/optimize LM programs | optimizes prompts/weights for a fixed program. CR optimizes which program (representation+method) to run. |
| Neo4j / Neptune | graph databases | one excellent access path. CR routes to them when the question is a traversal - they stay the system of record. |
| PostgreSQL planner | cost-based SQL optimizer | the intellectual template. CR is its analogue one layer up, over knowledge representations instead of table access paths. |
None of these is a competitor to be beaten on a leaderboard; they are the ecosystem the planner routes over. The claim is architectural: the missing layer is not a better retriever or a better agent framework, it is the optimizer that decides which to use.
v7 names a layer that is partly built. This ledger separates what runs today from what is planned, so the thesis is read against evidence.
| Capability | Status |
|---|---|
| Intent → representation classification; candidate generation; knapsack selection; EXPLAIN | shipped (v4) |
| Document (dense/BM25/hybrid), reasoning-graph (HippoRAG/SimGraph), temporal (Graphiti), analytical (SQL/Mongo/Elastic) plugins | shipped |
| Property-graph plugin (Cypher/Gremlin), cost-model routing priors, full-text seed, pooled driver | shipped, benchmarked on real GLEIF/OpenSanctions |
| Online bandit routing with discounting; reasoning-effort ladder (self-consistency, refinement) | shipped (v4/v6, opt-in) |
| Retrieval + reasoning + property-graph routing benchmarks, published | live on redevops.io/benchmarks |
| RepresentationBench (representation, now 300 questions across 6 representations incl. code + multimodal) + within-representation method routing + RepresentationBench-KYC (Go/No-Go, real GLEIF/OpenSanctions) + RepresentationBench-Retail (restock/abstain, real M5) | shipped, published |
| Fuzzy/alias sanctions matching (near-match → abstain, jurisdiction disambiguation); end-to-end representation → retrieval → reasoning → mission trace on one workload | shipped, published |
| Entity resolution → golden records; versioned KYC/KYB ontology; hybrid SQL+graph execution | planned |
| Real vision arm for Retail (SKU-110K / DeepStream); OpenOwnership + SEC EDGAR ingest | planned (next) |
| Representation learning (learned selection beyond hand-set priors); world models; distributed execution | research |
The sequence extends the property-graph proof into the full composition - now demonstrated end to end, with the composed KYC and Retail decisions, the fuzzy/alias matching-robustness half, and a single-workload representation → retrieval → reasoning → mission trace all shipped and published - then into learning. Remaining near-term: entity resolution and golden records so the graph's nodes are trustworthy; versioned ontologies and schema packs; hybrid SQL+graph planning (aggregate in the store, traverse in the graph); a real Retail vision arm (SKU-110K / DeepStream); and OpenOwnership + SEC EDGAR ingest. Then: representation learning so selection improves beyond hand-set priors; and, further out, world models and distributed execution.
The first era of AI infrastructure optimized the prompt; the second optimized retrieval. Both assumed a fixed access path and tuned within it. The benchmarks say the access path itself is the decision: no retriever, reasoning strategy or model is universally best, so the winning move is to choose per workload and learn from the outcome. That is a query planner. Context Runtime v7 makes the knowledge access path a first-class, cost-based, learned planning decision - representations, retrieval, reasoning, verification and execution, chosen the way PostgreSQL chooses a scan. Applications describe the goal; the runtime decides how it is answered, shows its work, and gets better every time it runs.
These extend v7's planner-scoring and retrieval theses to serve the harness of v10.
The capability graph becomes model-facing through one contract — id · version · purpose · consumes · produces · pre/postconditions · deterministic · side_effects · required_runtimes · required_permissions · visibility · cost_model · latency_model · context_model · verification · retry_policy · idempotency · sandbox_profile · failure_types. An undeclared capability cannot be planned or executed. Cost/latency/context models feed the planner's scoring; the verification field carries the acceptance chain (v9).
ReDevOps RAG returns typed handles, not chunks: RetrievalResult carries evidence/artifact references, a bounded rationale preview, authority, temporal and contradiction status, and available expansions. Retrieval modes (preview-only, citation-only, structural-neighborhood, contradiction-sweep, full-rationale, dependency-expansion, historical-as-of, merge-evidence-bundle) are planner-selected. A new expected-context-value score — relevance + authority + structural_necessity + contradiction_value + unresolved_risk_value + expected_reuse − expansion_cost − privacy_risk — makes v10's Context-Precision and Expansion-Recall optimizable at retrieval time.
The planner selects a harness strategy (DIRECT_TYPED_CALL · REFERENCE_AND_EXPAND · CODE_SANDBOX · DETERMINISTIC_ONLY · HIERARCHICAL_MERGE · HUMAN_GATED · LONG_LIVED_SESSION · FRESH_ISOLATED_SESSION) from object size, expected reuse, privacy, side effects, context limit, coupling, required verification, cache value, latency, cost, and worker reliability — the bridge from v8's execution topology to the v10 harness.