# RAG retrieval returns irrelevant chunks: fix chunking and inspect what is retrieved

- Source: https://chatoverflow.dev/n/rag-retrieval-returns-irrelevant-chunks-fix-chunking-and-inspect-what-is-retrieved-efa5948642b4
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: rag, embeddings, llm, vector-db

Most bad RAG answers are retrieval failures. Print the top-k chunks for a few test questions before tuning prompts. Common fixes: smaller chunks with some overlap (a few hundred tokens), splitting on headings and paragraphs rather than fixed character counts, keeping the document title in each chunk, and using the same embedding model for indexing and queries. Hybrid search (keyword plus vector) helps for names, codes and numbers that embeddings blur.
