Part 2 · The Harness Around the Model

From Retrieval to RAG

Chunking, filtering, hybrid search, RRF, reranking, and evaluation

THE QUESTION THIS PAGE ANSWERS

ANSWER FIRST

What is the key idea behind “From Retrieval to RAG”?

Chunking, filtering, hybrid search, RRF, reranking, and evaluation

DECISION RULE

Make the claim earn its place. Use this page as a decision aid, not a definition to memorize. Connect the idea to one real task, one observable result, and one failure that would change your mind.

TRY NEXT

Write one question you could answer with evidence after trying this idea.

WATCH FOR

A conclusion that sounds complete but leaves the key assumption untested.

Where this lesson sits: The entry point for vector retrieval is Long-Term Memory: Vector Retrieval, earlier in this topic; the product view of RAG is in Chapter 1, in RAG — Retrieval-Augmented Generation and The Cost and Optimization of RAG. This lesson skips those fundamentals and only covers putting Milvus retrieval into a reliable RAG pipeline; wrapping retrieval as an Agent tool comes in Chapter 4, in Milvus as an Agent Knowledge Tool.
Online path
1

Embed query

Use the same model as ingestion.

2

Retrieve

Tenant/ACL filter plus Top-K search.

3

Rerank

Rerank, deduplicate, and budget tokens.

4

Generate

Answer only from evidence and cite sources.

Offline ingestion sets the ceiling

Chunking

Split on titles, paragraphs, and semantic boundaries with modest overlap. Large chunks add noise; tiny chunks lose context.

Metadata

Keep source ID, version, section, tenant, ACL, and update time for citations, filters, and deletion.

Versioning

Re-embed when content or the model changes. Blue/green collections avoid mixing incompatible vectors.

Retrieval toolbox
Method Purpose Caution
Scalar filter Tenant, ACL, time, language Enforce access during retrieval, never only in the prompt
Vector + keyword hybrid Semantics plus exact SKUs/error codes Raw score scales are not directly comparable
RRF Fuse several rankings Simple and stable; rerank the resulting candidates
Partition / TTL Hot-data isolation or expiration Advanced options; start with clean collections and filters
Evaluate two layers: retrieval Recall@K, MRR/nDCG, and filter correctness first; then answer faithfulness, citation accuracy, and appropriate refusal. A fluent answer can hide failed retrieval.
Takeaway RAG is more than stuffing search hits into a prompt. Chunking, metadata, access filters, fusion, and citations make retrieval-augmented answers reliable.

Why “Embed query” can find relevant content

“Tenant/ACL filter plus Top-K search” moves retrieval beyond storing material: the real question is how to find what is relevant. That decision shapes the input quality of RAG, recommendation, and image-search systems.

Similarity is not the answer

In the flow described by “Rerank, deduplicate, and budget tokens”, embeddings place items in a comparable semantic space and a neighbor index narrows the search. The final answer still depends on whether the retrieved chunks cover the question, whether the distance metric fits, and whether the evidence is current.

Separate findable from relevant

Turn “Re-embed when content or the model changes.” into a small test: prepare queries with known answers, record relevance, misses, and distractors, then decide whether chunking, the index, or reranking needs to change.

From “Embed query” to “Retrieve”

“Embed query” grounds the problem in “Use the same model as ingestion”. “Retrieve” then moves it toward “Tenant/ACL filter plus Top-K search”. Together, they show that the lesson is not just a conclusion to remember, but a claim with conditions.

Carry the judgment into the next situation

The same logic applies to retrieval: define what counts as relevant, check whether recall covers the question, and then inspect whether ranking, chunking, or freshness pushed useful evidence out.

  • “Embed query”: Use the same model as ingestion
  • “Retrieve”: Tenant/ACL filter plus Top-K search
  • “The closing point”: Re-embed when content or the model changes. Blue/green collections avoid mixing incompatible vectors

The final “The closing point” brings the discussion to “Re-embed when content or the model changes. Blue/green collections avoid mixing incompatible vectors”. The useful thing to carry forward is knowing which judgments must be revisited when input, scale, or risk changes.

Mark as learned Your reading progress updates automatically
← PreviousNext →

Keep reading

The next useful article in the thread.

ARTICLE DISCUSSION

Leave one useful thought here.

Keep the idea that clicked, the question that stayed open, or a small note for the next learner.

Discussing From Retrieval to RAG The Harness Around the Model
3discussionsArticle discussion · synced with the Circle
View in the learning circle
AM
Asha MorganContent editor
INSIGHTField note

I turned one judgment from this article into a small experiment I could run today. Knowing what to observe next is more useful than simply remembering the conclusion.

ARTICLE DISCUSSION7 helpful
LH
Lin HarperIndie developer
INSIGHTInsight

After reading this, I first looked for the conditions behind the idea instead of copying the method into a project. That order made the later trade-offs much clearer.

ARTICLE DISCUSSION5 helpful
KM
Kiki MooreProduct operations
QUESTIONQuestion

When this judgment reaches real work, which constraint should be added first? I am curious which step matters most between reading and the first practical attempt.

ARTICLE DISCUSSION4 helpful