1. Why retrieval beats memory
4 min
The problem
A chat model can sound confident even when it has not seen your document. If you ask about your college rulebook, internship policy, or a startup pitch deck, the model may answer from general patterns instead of your file.
For a document QA app, that is not enough. Your user needs answers that come from the uploaded documents and can be checked.
One idea
Do not ask the model to remember your documents. Retrieve the relevant parts first, then ask the model to answer only from those parts.
Memory vs retrieval
Model memory means the information learned during training, plus whatever is in the current chat. It is broad, but not reliable for your private PDFs, notices, invoices, resumes, or project docs.
Retrieval means your app searches your own document collection at answer time. It finds small pieces of text that match the question, puts them into the prompt, and asks the model to answer using that evidence.
Tiny prompt difference
A memory-only prompt asks for an answer directly. A retrieval prompt includes evidence and clear rules.
Memory-only:
Question: What is the late submission penalty?
Answer the question.
Retrieval-grounded:
Evidence:
[doc: assignment_policy.txt, lines 12-14]
Late submissions lose 10% marks per day. Submissions more than 5 days late are not accepted.
Question: What is the late submission penalty?
Answer using only the evidence. If the evidence is not enough, say you do not know.