Live

Reranking and hybrid search

Two levers that turn naive retrieval into production retrieval.

Reranking

Vector search returns the top candidates by similarity, but the most similar is not always the most relevant. A reranker takes those candidates and reorders them by their actual relevance to the specific question, pushing the genuinely useful chunk to the top before the model ever sees it. It is a second, sharper pass over a shortlist.

Hybrid search

Pure vector search matches meaning but loses exact terms: names, product codes, jargon — anything where the literal string is the point. Keyword search (BM25) matches those exactly but misses paraphrase. Hybrid runs both and merges the results, so "POL-114" is caught by the keyword half and "how many remote days" is caught by the semantic half. You stop choosing between meaning and precision.

Why it matters

These two levers are usually the difference between a demo that works on friendly questions and a system that holds up on the messy, specific queries real users ask. The POL-114 failure from Lesson 2 is fixed here, cleanly, by adding the keyword half.

Where integrations enter

Reranking and hybrid search often live in an external service: a managed vector database, a dedicated reranker, a search engine. This is where MCP (Model Context Protocol) matters. MCP is the open standard that lets an agent talk to external tools and data sources through a consistent interface. Connect an MCP server for your vector database, and Claude Code can query it, inspect indexes, and run retrieval as first-class tools inside the build session.

MCP alone

Gives the agent the raw capability — the connection to the vector store.

MCP + Skill

MCP is the hands; the skill is the know-how — when to rerank, how your team weights hybrid results, what good retrieval looks like for your data.

In a plugin, you can bundle both: an MCP server plus the skills that drive it, so a teammate installs one package and gets the capability and the workflow at once.

Watch out

Common mistakes

  • Reranking before fixing chunking (garbage in, expensively reordered).
  • Relying on vector search alone for document IDs, SKUs, and policy codes.
  • Writing bespoke glue for every external service instead of MCP.