Guides
Working notes on retrieval, context engineering, and the practical failure modes of AI agents - written while building Loreto.
All guides
Why does RAG keep failing on questions about your team's history?
The reason RAG works for FAQs and breaks for decision history — and what to do about it.
When should you stop adding chunks to your RAG and reach for a knowledge graph?
The signal that you've crossed a Class A/B boundary — and what a hybrid context layer actually looks like.
Why does every new hire ask the same questions even when you have the docs?
The institutional memory problem isn't a documentation problem. It's a provenance problem.
Why can't your AI agent answer 'how did we get here?' even when it has all the data?
Two failure modes of LLM temporal reasoning, and why long context isn't the fix.
Your model got smarter and your answers got worse. Why?
The multiplicative principle, the degradation curve, and why upgrading models without auditing context backfires.
Cursor, Claude Code, Cline — why does the same model feel completely different in each?
The harness is what's actually different — and most platform comparisons miss it.
When you have several vector stores, how do you send a query to the right one?
Why a merged store wrecks precision, why if/else routing is brittle, and the retriever-tool pattern that fixes both.
What's the smallest RAG pipeline that actually works — and why is it exactly one LLM call?
The Query-Retrieve-Augment-Generate flow, the single-LLM-call invariant, and why grounding is a prompt-template discipline, not a bigger model.
Your RAG answers are wrong. Is it the model — or your chunking?
Most "RAG doesn't work" reports are chunking problems, not model problems. Here's why chunking is the single biggest quality lever.
What should your agent do when every retriever tool comes back empty?
Agentic RAG has a hole: no defined behavior when retrieval fails. The Retrieve-Check-Route pattern closes it.
When your RAG finds nothing relevant, should it stay silent or fall back to the model?
Treating retrieval as an unconditional prefix to generation is the bug. Make generation conditional on a relevance decision.