← Back to Dashboard
1. RAG Architecture in Bedrock2. Chunking, Ranking, and Freshness

Chunking, Ranking, and Freshness

📚 Knowledge Bases and RAG11 min80 XP

Retrieval Quality Engineering

Most RAG failures come from retrieval setup, not the model. If the right passage never reaches the prompt, no model can answer correctly. Tune chunking strategy, ranking, and freshness windows as first-class engineering concerns.

Chunking Strategies in Bedrock Knowledge Bases

StrategyHow it splitsBest for
Fixed-sizeN tokens per chunk with configurable overlapUniform prose; simplest baseline
HierarchicalSmall child chunks for precise matching, larger parents returned for contextLong structured docs (runbooks, policies)
SemanticSplits at meaning boundaries using embedding similarityMixed-topic documents
NoneOne document = one chunkShort FAQs and atomic records

Failure Modes and Symptoms

  • Chunk too large → low relevance precision - retrieved text contains the answer plus three unrelated topics, diluting the prompt.
  • Chunk too small → context fragmentation - the answer spans two chunks and neither alone makes sense.
  • No overlap → sentences cut mid-thought at chunk boundaries.
  • No freshness strategy → stale operational guidance - last year's escalation phone tree, deprecated API endpoints.

Freshness Is a Pipeline Property

Define sync cadence per source (e.g. runbooks daily, policies weekly), tag chunks with ingestion timestamps, and filter or down-rank stale content at query time. An answer grounded in an outdated document is still a wrong answer - with a convincing citation.

Diagnostic discipline: evaluate retrieval separately from generation. Score "did the right chunk appear in top-k?" (recall@k) before scoring "was the final answer correct?". This tells you instantly which half of the pipeline is failing.
🧪 Knowledge Check
Press 1-4 to select1 of 2
A common RAG anti-pattern is:
Testing retrieval metrics
Ignoring chunk strategy and freshness
Adding citations
Using allowlists