Sitemap
Press enter or click to view image in full size

Member-only story

How does Reranker work in RAG

--

Your Vector Search Is Fast. Your Reranker Makes It Useful.

Most RAG systems do not fail because the LLM is stupid.

They fail because the LLM is given the wrong context with full confidence.

The user asks:

“Can I cancel my subscription after the free trial?”

Your vector database proudly returns ten chunks.

One talks about subscriptions.

One talks about free trials.

One talks about cancellation.

One talks about refunds.

One is from a blog written three years ago.

And one actually answers the question, but it is sitting at rank 8 like a brilliant student ignored in the last bench.

Then the LLM reads the top few chunks and says something like:

“Based on the available information…”

Translation:

“You gave me average context. I am now going to produce average confidence.”

This is where a reranker enters the pipeline.

A retriever finds possible answers.

A reranker decides which possible answer deserves to be at the top.

--

--

Milind Divre
Milind Divre

Written by Milind Divre

I write about AI, software engineering, automation. https://www.milinddivre.com/