RAG and agents: giving the model your documents and tools
How retrieval grounds an answer in your protocol, and what changes when the AI can take actions.
Retrieval-augmented generation (RAG) fixes part of the hallucination problem by searching a trusted set of documents first and handing the matching passages to the model with the question. Tools such as OpenEvidence, and “chat with this PDF” features, work this way.
RAG is only as good as its library and its search. If the right passage is not retrieved, the model may fill the gap from memory. Good systems show their sources so you can click through, and say “not found” rather than guess.
An agent goes a step further: the model can call tools (search, a calculator, a database, an order-entry system), look at the result and decide what to do next, in a loop. That makes it more useful and more dangerous. A wrong answer in a chat window is read by a doctor; a wrong action by an agent may happen before anyone reads it.
Check yourself
Educational material, not clinical advice. Interactive numbers are teaching examples unless a source is named.