Instiq
Chapter 1 · Foundation Model Integration, Data Management, and Compliance·v1.0.0·Updated 7/16/2026·~12 min

What's changed: Initial: 5 sections for Domain 1 (FM integration, data management, compliance)

1.4Retrieval Mechanisms for FM Augmentation (RAG)

Key points

Learn mechanisms that improve RAG retrieval quality: chunking strategies, Titan embeddings, hybrid search, Bedrock reranker, query expansion/decomposition/transformation, and access via function calling/MCP.

RAG accuracy is determined by how you chunk, embed, search, and rerank. If retrieved context is off-target, even the best FM answers wrong.

1.4.1Levers to improve retrieval

  • Chunking: split fixed-size/hierarchical/semantic. Use Bedrock chunking or custom splitting with Lambda. Too coarse/fine hurts precision.
  • Embeddings (e.g., Titan): choose by dimensionality and domain fit; batch-generate with Lambda as needed.
  • Hybrid search + reranker: combine keyword + vector, then reorder with a Bedrock reranker to improve top results.
  • Query handling: expansion (Bedrock), decomposition (Lambda), transformation (Step Functions) to improve retrieval for ambiguous/compound queries.
  • Consistent access: standardize vector search via function calling or MCP clients invoked by the FM.
Exam point

Common: improve top results = reranker, also use keywords = hybrid search, rephrase ambiguous query = query expansion, break compound question into sub-queries = query decomposition, call retrieval as a tool from the FM = function calling/MCP. For off-target retrieval, suspect chunking and search method first.

Advanced RAG stacks gains in stages:
① match chunking to content structure (e.g., hierarchical chunks by heading);
② choose embeddings like Amazon Titan Text Embeddings by dimensionality/domain fit;
③ retrieve with hybrid search (BM25 + vector) for recall, then
④ reorder with a Bedrock reranker model for precision;
⑤ improve hard queries via query expansion (synonyms/rephrasing), query decomposition (compound → sub-queries), and query transformation;
⑥ to curb hallucination, make the model cite retrieved evidence and answer “I do not know” on zero hits;
⑦ expose retrieval to the FM as a tool via function calling or MCP so agents can reuse a standard access path. For off-target retrieval, isolate in order: chunk size → embeddings → hybrid/reranker → query preprocessing.

ProblemFixNote
Top results irrelevantRerank with a rerankerAfter hybrid search
Missing keyword matchesHybrid searchBM25 + vector
Ambiguous/compound queryQuery expansion/decompositionBedrock/Lambda
Unified call from FMFunction calling/MCPStandardize as a tool
Warning

Trap: “a reranker is a search engine that replaces embeddings” is wrong—a reranker reorders results (a later stage) and does not replace retrieval (embeddings/vector search). Also “hybrid search is always slower than vector search, so avoid it” is wrong—it is a standard way to improve recall.

Diagram of chunking → embeddings → hybrid search → reranker for RAG precision.
Stack precision in stages

1.4.2Section summary

  • Precision ladder = chunking → embeddings → hybrid search → reranker → query preprocessing
  • Anti-hallucination = cite evidence + say unknown on zero hits / FM access = function calling/MCP

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. In RAG, relevant docs are retrieved but irrelevant chunks rank high, hurting answers. Best lever to improve the relevance of top results?

Q2. Users ask compound questions like “What were the differences and drivers between NA and EU sales last month?” Which preprocessing best improves RAG retrieval?

Q3. You want agents and multiple apps to invoke vector search in a consistent way from the FM. Which standardized access mechanism fits?

Check your understandingPractice questions for Chapter 1: Foundation Model Integration, Data Management, and Compliance