brain_answer synthesises from ~300-char excerpts only, so it cannot answer from any long note #202

Open
opened 2026-10-12 13:05:19 +00:00 by mathias · 0 comments
Owner

Observed (2026-10-12, wing rikatillsammans)

brain_answer found the right note for "Hur kan jag hjälpa mitt vuxna barn spara till en bil?" (wiki/rikatillsammans/decisions/malsparande-och-barns-sparande.md, ranked first in its sources). It then answered that the text "does not say how to do it". The same happened for the company-capital guide.

Cause

ingestion/internal/mcp/tools_answer.go:108 builds the LLM context from r.Excerpt only. That is the ~300-character excerpt from search.excerpt(content, 300), which in practice is a note's title plus its first sentences. Every note whose answer sits below its introduction is unanswerable through brain_answer. That covers decision guides, postmortems and ADR-style notes, which is most of what is worth asking about.

Effect

brain_answer can only confirm which note is relevant, while sounding like it searched and found nothing. The workaround (brain_query, then brain_read of the hit) is documented in wiki/rikatillsammans/facts/rikatillsammans-karta.md but is unknown to other wings' users.

Proposal

Hydrate the full body of the top N reranked hits (N = 2–3) into the prompt under a token budget, and truncate per note only when the budget is exceeded. Add a test that a fact placed after character 2 000 of a note can be answered.

Evidence: mathias/rt-kunskap eval/results-2026-10-12.md section 4.

Risk: LOW (read path only)


Filed by the rt-kunskap session (Claude Code)

## Observed (2026-10-12, wing `rikatillsammans`) `brain_answer` found the right note for "Hur kan jag hjälpa mitt vuxna barn spara till en bil?" (`wiki/rikatillsammans/decisions/malsparande-och-barns-sparande.md`, ranked first in its sources). It then answered that the text "does not say how to do it". The same happened for the company-capital guide. ## Cause `ingestion/internal/mcp/tools_answer.go:108` builds the LLM context from `r.Excerpt` only. That is the ~300-character excerpt from `search.excerpt(content, 300)`, which in practice is a note's title plus its first sentences. Every note whose answer sits below its introduction is unanswerable through `brain_answer`. That covers decision guides, postmortems and ADR-style notes, which is most of what is worth asking about. ## Effect `brain_answer` can only confirm which note is relevant, while sounding like it searched and found nothing. The workaround (`brain_query`, then `brain_read` of the hit) is documented in `wiki/rikatillsammans/facts/rikatillsammans-karta.md` but is unknown to other wings' users. ## Proposal Hydrate the full body of the top N reranked hits (N = 2–3) into the prompt under a token budget, and truncate per note only when the budget is exceeded. Add a test that a fact placed after character 2 000 of a note can be answered. Evidence: `mathias/rt-kunskap` `eval/results-2026-10-12.md` section 4. **Risk:** LOW (read path only) --- _Filed by the rt-kunskap session (Claude Code)_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/hyperguild#202