RAG configurations and reranking
Lesson 4 of 4 in Deploying FMs, RAG, and Agents.
A RAG system that "mostly works" has exactly three families of knobs, and the exam's favorite trick is making you pick the cheapest one that fixes the stated symptom. Query-time knobs (top-k, hybrid search, filters, a Reranker) change nothing in the index — adopt them in minutes. Index-time knobs (chunking) force a re-ingest. Embedding-model changes force a full re-embed and re-index. Walk the request first, then the knobs.
| Symptom | Fix | Cost of the fix |
|---|---|---|
Relevant docs exist and are retrieved, but the best ones rank below noise | Add a reranker (and consider retrieving more, passing fewer) | Query-time only — no re-ingestion |
Exact identifiers (part numbers, error codes) miss | Enable hybrid search on a store that supports it | Query-time only |
Chunks arrive truncated, or answers lack surrounding context | Re-chunk — larger chunks or hierarchical strategy | Re-ingest the data source |
Domain jargon or multilingual queries retrieve junk | Re-embed with a better-suited embeddings model | Full re-embed + re-index — the expensive one |
Answers are correct but stale | Re-sync ingestion (and schedule it) | One ingestion job — see retraining loops |
Key terms: Provisioned Throughput (Bedrock), Custom Model Import, Bedrock Knowledge Bases, Amazon Bedrock AgentCore, Action group, Reranker
Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.