Commit e43c16d
committed
Store answer: reasoning-heavy map (full tree-walk per document)
Replace the store answer's map stage: instead of fanning the
section-selection strategy across documents (retrieve-then-generate,
chunk-shaped), run the FULL agentic tree-walk on EACH document — read its
structure, navigate hop by hop to a grounded per-document answer + page
citations — then synthesise the per-document answers into one. Every
document is now reasoned over exactly like /v1/answer/treewalk; no
chunking, no embeddings anywhere in the collection path.
- max_depth controls the per-document tree-walk hop budget (0 = the
engine's full/default depth), as requested.
- max_docs bounds how many documents are tree-walked (0 = all) — a cost
valve for large collections; the per-doc walks run with bounded
concurrency.
- Citations are one-per-contributing-document, carrying the document's
cited page span + overlapping section ids (from the tree-walk's
CitedPages) and a short quote from its answer. Refusals/empty per-doc
answers are dropped before synthesis.
Returns 501 unless the tree-walk strategy + an LLM are configured.1 parent db6888d commit e43c16d
3 files changed
Lines changed: 211 additions & 186 deletions
0 commit comments