Be10x Β· Daily Drop
Your demo works. Your handbook doesn't.
Why real RAG returns the wrong paragraph β and the five stages that fix it.
Swipe β
01
INDEX Β· ONCE PER CHANGE
load
chunk
embed
store
RETRIEVE Β· EVERY QUESTION
question
embed
search
answer
Index once. Retrieve every time .
Load, chunk, embed, store β that runs once per document change. Retrieval runs on every question.
02
split mid-table chunk 14 ends "β¦12 days a year. Unused" chunk 15 opens "days lapse on 31 Decβ¦"
split on structure one clause per chunk, table intact
Chunking decides what's answerable
A chunk is the unit of what can be retrieved. Baseline: 256β512 tokens, split on structure.
03
casual leave
earned leave
reimbursement
code of conduct
written alike β stored alike
Meaning becomescoordinates
An embedding is a list of numbers β commonly 1024β1536 of them. Similar meaning, nearby vectors.
04
top-1 from dense search "Earned leave accrues monthly and unused days carry forward."
what you actually asked "Casual leave: 12 days a year. Unused days lapse on 31 December."
Closest is notcorrect
You asked about casual leave. It handed back earned leave.
05
" Exact policy names"casual leave" β the phrase the user typed
# IDs and codesclaim LTA-2025-04, invoice and voucher numbers
A AcronymsLTA, PF, HRA β short, rare, unparaphrasable
Keywords still win some fights
Dense retrieval catches paraphrase. BM25 catches the exact string.
06
Fuse the two lists
score(d) = Ξ£ 1 / (k + rank), k = 60
dense rank 7 β 1/67 = .0149
bm25 rank 1 β 1/61 = .0164
βββββ
casual-leave chunk .0313
Reciprocal Rank Fusion merges the two lists by rank, not score .
07
top 25
rank 7 = the right chunk
cross-encoder
keep 3
casual leave β
leave policy intro
HR FAQ Β· leave
Retrieve wide. Then narrow .
A cross-encoder reads query and chunk together , so it judges far better than a distance.
08
Hand the chunk its document
# 50β100 LLM-written tokens, prepended
From the 2025 leave policy, section 4,
on casual leave accrual and lapse.
Casual leave: 12 days a year. Unused
days lapse on 31 December.
Anthropic's Contextual Retrieval: situate the chunk first.
09
HOW RELIABLY THE MODEL USES A CHUNK
first chunk
buried in the middle
last chunk
POSITION IN THE PROMPT β
Models miss the middle
Lost in the middle (Liu et al., 2023). Bigger context windows did not fix it.
10
1 Golden set30β100 real questions, known correct sources
2 Recall@kis the right chunk anywhere in the top k?
3 Faithfulnessis every claim backed by a retrieved chunk?
Perfect recall. Wrong answer .
The right chunk can sit in the context and the answer still be wrong.
Fix retrieval before the prompt.
Take your worst question, look at what actually got retrieved, and fix that first. Next drop: the 2024 habits that are now the bug.
Follow for daily drops β
Be10x Β· Eshmith Saideep