Description
CB has one retrieval mode today: ask mode — an agent sends a natural-language question, CB retrieves + synthesizes an answer. This adds a second, complementary query mode — if an agent can see the block's ontology (schema) via MCP, it can generate a precise structured query and get exact, composable, auditable results.
Two modes, different jobs:
- Ask mode (exists): NL question → retrieve → synthesize. Fuzzy, semantic, good for exploration.
- Query mode (new): agent reads the ontology → writes a typed query → exact structured results. Deterministic, good for "list all P1 incidents affecting service X in Q2." The query is explicit, so the answer is auditable — important for regulated/trust use cases.
This is the natural extension of the typed-retrieval thesis (DCR): instead of CB guessing the traversal, the agent that knows the schema drives it. Inspired by CyKG-RAG (LLM generates SPARQL/Cypher against a KG, with fallback to vector search when the query is invalid/empty).
No triple store required to start. CB already loads entities into an in-memory typed relationship graph — a Cypher-lite traversal over that is feasible without RDF/Neo4j.
Composes with the cache/router model: structured queries run over the cached graph; anything not cached returns a route to the system-of-record.
Acceptance Criteria
Out of Scope
- Full RDF/SPARQL or Neo4j/Cypher triple-store backend (can come later if needed)
- The cache/router live-fetch mechanics (separate concern — this issue only queries cached knowledge and returns routes)
Description
CB has one retrieval mode today: ask mode — an agent sends a natural-language question, CB retrieves + synthesizes an answer. This adds a second, complementary query mode — if an agent can see the block's ontology (schema) via MCP, it can generate a precise structured query and get exact, composable, auditable results.
Two modes, different jobs:
This is the natural extension of the typed-retrieval thesis (DCR): instead of CB guessing the traversal, the agent that knows the schema drives it. Inspired by CyKG-RAG (LLM generates SPARQL/Cypher against a KG, with fallback to vector search when the query is invalid/empty).
No triple store required to start. CB already loads entities into an in-memory typed relationship graph — a Cypher-lite traversal over that is feasible without RDF/Neo4j.
Composes with the cache/router model: structured queries run over the cached graph; anything not cached returns a route to the system-of-record.
Acceptance Criteria
Out of Scope