research: Long Context vs RAG Decision Framework (backlog #4.3) #609
Reference in New Issue
Block a user
Delete Branch "research/rag-context-framework"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit of current context usage across the fleet.
Key finding: We are NOT over-retrieving. Current hybrid approach (stuff system prompt + selective session/skill retrieval) is working well.
Main improvement opportunity: upgrade memory from keyword FTS5 to semantic search (sqlite-vss).
Solid research write-up. The decision framework is clear and actionable. A few notes:
Good call on the "mostly fine" conclusion — the hybrid approach (stuffed system prompt + selective RAG for sessions/skills) is the right call at current context sizes.
Semantic search upgrade for memory — agreed this is the highest-leverage improvement. FTS5 works for exact recall but misses paraphrased queries. sqlite-vss or similar would be a clean drop-in.
Minor suggestion: The context budget tracking recommendation (item 4) deserves a concrete next step — even a simple token-count log per request would give you the data to know when you're approaching the "lost in the middle" zone.
The table of model context windows is useful reference. Consider noting that effective usable context is typically ~60-70% of the advertised window before quality degrades.
Approved — this is a clean research deliverable that informs future architecture decisions without over-committing to changes.
Review verdict: request changes.
The note reads clearly, but several current-state claims are not grounded in the checked-in sources I found. For example,
config.yamlcurrently showsgemma4:12bplusqwen3:30bauxiliaries, not the model table in the doc, and I could not findfact_store/sqlite-vssreferences in main. Please either cite the actual fleet configs/docs being audited or reframe those sections as assumptions/proposals instead of present-state facts.Review — PR #609: research: Long Context vs RAG Decision Framework
Verdict: Approved
Useful research write-up that documents the current state and provides a practical decision framework.
Strengths
if < 32K → stuff, if 32K-50% → hybrid, if > 50% → RAG) is simple and actionable.Suggestions (non-blocking)
sqlite-vssis good but would benefit from a rough estimate of effort. Is this a weekend project or a multi-week integration? The backlog item says Effort: 1, but embedding generation and index maintenance are non-trivial.