- RAG – An Agent That Chooses Between Search and SQL
"What are the latest Spring Boot posts?" is not a question about what a post says. Give Claude a search tool and two SQL tools over the post catalogue, keep citations working through search_result blocks, and test routing with answers computed from the database. The agent passes 15 of 15; plain RAG fails 4 of 6 catalogue questions.
- RAG – Keeping the Index Current Without Rebuilding It
Hash each post's article, compare with what was indexed, and touch only new, changed and removed posts, each in one transaction. Adopting an existing index without re-embedding, ETags for downloads, a connection-reuse fix that took a refresh from 31 to 8 seconds, and an integration test proven to catch the bug it guards.
- RAG – Evaluating Answers: Groundedness and Correctness
Split every answer into claims and check each against the passages the model was given; check every answer against key points drafted from the full posts. Structured outputs for the judges, what the numbers say about three prompt setups, and the content contradiction on this site the eval surfaced.
- RAG – Contextual Retrieval, Measured and Not Adopted
Claude Haiku writes a sentence situating each of 11,701 chunks in its post, for $2 with prompt caching. On this site it did not help: same hit@5, slightly worse at rank one. Why a well-known technique can be a no-op, the fairness checks behind that verdict, and the rate limit and silent pipeline failure we hit running it.
- RAG – Search Small, Answer Big: Neighbouring Chunks
Search on small chunks, but give the model the chunks around each hit. One neighbour on each side takes full answers from 18 to 24 of 33 with no new padding, for about 1.8 times the input tokens. Two neighbours add little more. How to merge windows, and the ordering assumption it depends on.