You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The motivating case for linked retrieval (ADR #43): run an LLM over each document to produce a synopsis, index the synopses, and route from a synopsis match down to the document's chunks. ir's data model reserved the slot — "synopsis" is a documented surface kind and the strategy docstrings name "AI synopsis / problem-class surfaces" as the extension point — but no strategy produces them. This is report 12's document-summary-index pattern (build-time LLM cost, ≈free at query time) and the natural fuel for the collapsed-tree policy (#47).
Scope
A synopsis-producing strategy decorator/wrapper (e.g. with_synopsis(strategy, *, synthesize=None)): wraps any IndexingStrategy, adds one synopsis surface per artifact. synthesize: Callable[[Artifact], str] is injectable; built lazily on oa only when omitted (the make_llm_* idiom — import ir stays offline; tests inject doubles).
Build-time cost is the regime (report 12: summary indexing ≈30 LLM calls/doc happens once); the ledger's incremental rebuild means only new/changed artifacts get synthesized.
Persistence/staleness: synopses are derived state — stamp the synthesizer identity (model/prompt hash) the way embedder_id/strategy_id are stamped, so a prompt change triggers re-synthesis, not silent staleness.
Acceptance criteria
build(source, strategy=with_synopsis(Chunked())) with an injected fake synthesizer indexes a synopsis surface per artifact, hermetically.
Problem
The motivating case for linked retrieval (ADR #43): run an LLM over each document to produce a synopsis, index the synopses, and route from a synopsis match down to the document's chunks. ir's data model reserved the slot —
"synopsis"is a documented surface kind and the strategy docstrings name "AI synopsis / problem-class surfaces" as the extension point — but no strategy produces them. This is report 12's document-summary-index pattern (build-time LLM cost, ≈free at query time) and the natural fuel for the collapsed-tree policy (#47).Scope
with_synopsis(strategy, *, synthesize=None)): wraps any IndexingStrategy, adds onesynopsissurface per artifact.synthesize: Callable[[Artifact], str]is injectable; built lazily onoaonly when omitted (themake_llm_*idiom —import irstays offline; tests inject doubles).surfaces={"synopsis"}search works immediately; PARENT/CHILD edges to the artifact's chunks land in the links view (links: typed-edge view on CorpusStore + GraphStore protocol (semantic link graph) #46) at build time.embedder_id/strategy_idare stamped, so a prompt change triggers re-synthesis, not silent staleness.Acceptance criteria
build(source, strategy=with_synopsis(Chunked()))with an injected fake synthesizer indexes a synopsis surface per artifact, hermetically.Size: M. Depends on #46 (edges) and feeds #47 (routing policy). Capability 1 (ir). Refs ADR #43, report 12.