Read page 1 as text
How can an LLM answer from private documents?
The model was not trained on your handbook. How can it cite it?
WHAT WE WILL FIGURE OUT
01
Prepare the document library
02
Retrieve evidence for one question
03
Check what retrieval did not find
OUR EXAMPLE
A leave-policy question answered from the documents the user is allowed to read.
Follow the steps. Ask the obvious questions. Check the result.
Part 15 of 18 · Challenge: page 5 · Suggested answers: page 6
Read page 2 as text
Prepare the document library
1
THE PRIVATE HANDBOOK
FOLLOW THE CHANGE
question
retrieve
grounded answer
question
→
retrieve
→
grounded answer
Do I have to retrain the model?
Retrieval-augmented generation, or RAG, supplies relevant source text at request time. It can help with private or changing information.
Question → retrieve evidence → answer with sources
2
CHUNK THE DOCUMENTS
passage
source ID
access rules
passage
source ID
access rules
Split material into usable passages while preserving document identity, headings, version and permissions.
Policy paragraph + document ID + section + access rules
3
EMBED THE PASSAGES
FOLLOW THE CHANGE
text
vector
similarity
text
→
vector
→
similarity
An embedding model maps text into vectors for similarity search. These are not the same as next-token probabilities.
Password reset can resemble forgotten credentials
4
KEEP THE INDEX FRESH
FOLLOW THE CHANGE
new source version
refresh index
new source version
→
refresh index
When the handbook changes, update affected indexed passages and remove stale versions. Track which source version was used.
Weekly document change → index refresh
Read page 3 as text
Retrieve evidence for one question
5
A USER ASKS
FOLLOW THE CHANGE
identity
permitted documents
identity
→
permitted documents
How many days of leave do I get?
First authenticate the user and establish which documents they may access. Retrieval must respect those boundaries.
Authorized user + permitted source collection
6
FIND CANDIDATES
FOLLOW THE CHANGE
search
candidate passages
rerank
search
→
candidate passages
→
rerank
Keyword search, vector search or a hybrid can retrieve candidate passages. A reranker can reorder promising candidates.
Retrieve relevant leave-policy sections
7
BUILD THE INPUT
FOLLOW THE CHANGE
question + evidence
model
question + evidence
→
model
Supply the question, source excerpts and instructions for grounded answering. Include enough source identifiers to cite accurately.
Question + policy excerpts + citation references
8
WRITE AND CHECK
FOLLOW THE CHANGE
claim
cited passage
verify
claim
→
cited passage
→
verify
The model can cite supplied sources. Verify that each citation supports the claim; allow an insufficient-evidence answer.
A real citation can still fail to support a sentence
Read page 4 as text
Check what retrieval did not find
9
WHAT DID SEARCH MISS?
top five
not all documents
top five
not all documents
Are the top five documents the whole answer?
Top-k retrieval returns a subset. It cannot establish a complete count or prove that no contradictory policy exists.
Top five passages do not mean all applicable policies
10
MATCH THE METHOD TO THE QUESTION
FOLLOW THE CHANGE
exact total
complete query
exact total
→
complete query
A question asking for every employee or an exact total may need an authorized database query or exhaustive method.
Search for evidence; query complete sets for exact counts
11
RAG AND FINE-TUNING
fine-tuning
retrieval
fine-tuning
retrieval
Fine-tuning changes model parameters and can teach task patterns or knowledge. Retrieval supplies inspectable, updateable evidence.
They solve different needs and can be combined
12
MY NEW MENTAL MODEL
coverage
freshness
faithfulness
coverage
freshness
faithfulness
The answer depends on the evidence pipeline.
Evaluate retrieval coverage, permissions, source freshness and answer faithfulness separately.
A better generator cannot recover a missing document
Read page 5 as text
Your turn. Can you explain what happens?
Use the same example. Change one detail. What follows?
KEEP THIS EXAMPLE IN MIND
A leave-policy question answered from the documents the user is allowed to read.
Try first. Suggested answers are on the next page.
1
Which two metadata fields help prevent stale or unauthorized retrieval?
What makes you say that?
2
Does finding five relevant passages prove that an exact count is complete?
What makes you say that?
3
What should the system do when permitted sources do not support an answer?
What makes you say that?
Write your answers in the comments.
Read page 6 as text
Suggested answers
How can an LLM answer from private documents?
01
Which two metadata fields help prevent stale or unauthorized retrieval?
Document version or timestamp, and access-control metadata.
02
Does finding five relevant passages prove that an exact count is complete?
No. A complete-set question may require an exhaustive, authorized query.
03
What should the system do when permitted sources do not support an answer?
State that evidence is insufficient or ask for clarification instead of inventing support.