> Reranking: the highest value 5 lines of code you'll add. The chunk ranking shifted a lot. More than you'd expect. Reranking can many times make up for a bad setup if you pass in enough chunks. We found the ideal reranker set-up to be 50 chunk input -> 15 output. What is re-ranking in the context of RAG? Why not just show the code if it’s only 5 lines?
OP. Reranking is a specialized LLM that takes the user query, and a list of candidate results, then re-sets the order based on which ones are more relevant to the query. Here's sample code: https://docs.cohere.com/reference/rerank
Production RAG: what I learned from processing 5M+ documents
41–50 of 116 posts
Re: Production RAG: what I learned from processing 5M+ documents
#42Re: Production RAG: what I learned from processing 5M+ documents
#43Re: Production RAG: what I learned from processing 5M+ documents
#44I concur: The big LLM-based rerankers (e.g. Qwen3-reranker) are what you always wanted your cross-encoder to be, and I highly recommend giving them a try. Unfortunately they're also quite computationally expensive. Your metadata/tabular data often contains basic facts that a human takes for granted, but which aren't repeated in every text chunk - injecting it can help a lot in making the end model seem less clueless.…
Re: Production RAG: what I learned from processing 5M+ documents
#45We have very different ideas about the meaning of self-hosted.
Re: Production RAG: what I learned from processing 5M+ documents
#46Earlier quoted context omitted.
OP. Reranking is a specialized LLM that takes the user query, and a list of candidate results, then re-sets the order based on which ones are more relevant to the query. Here's sample code: https://docs.cohere.com/reference/rerank
What is the difference between reranking versus generating text embeddings and comparing with cosine similarity?
Re: Production RAG: what I learned from processing 5M+ documents
#47Earlier quoted context omitted.
It's described in the remainder of the point - they use an LLM to generate additional search queries, either rephrasings of the user's query or bringing additional context from the chat history.
Here's an interesting read on the evolution beyond RAG: https://www.nicolasbustamante.com/p/the-rag-obituary-killed-... One of the key features in Claude Code is "Agentic Search" aka using (rip)grep/ls to search a codebase without any of the overhead of RAG. Sounds like even RAG approaches use a similar approach (Query Generation).
Or am I completely misunderstanding how Claude Code works?
Re: Production RAG: what I learned from processing 5M+ documents
#48Re: Production RAG: what I learned from processing 5M+ documents
#49Re: Production RAG: what I learned from processing 5M+ documents
#50I must be missing something, this says it can be self-hosted. But the first page of the self-hosting docs say you need accounts with no less than 6 (!) other third-party hosted services. We have very different ideas about the meaning of self-hosted.