Retrieval-augmented generation (RAG)
Retrieval-augmented generation (RAG) is a way to make an AI answer from a chosen set of documents. It first searches those documents for the relevant bits, then writes the answer using only what it found. This cuts down on made-up facts.
Normal AI models answer from whatever they picked up during training. That sounds fine until they confidently state something wrong. RAG fixes this by giving the model a specific pile of sources to read first. So instead of guessing from memory, it pulls the right passages and builds the answer on top of them.
Two steps happen each time you ask something. First the system finds the parts of your documents that match your question. Then it hands those parts to the model and says: answer from this. The model becomes more of an assembler of facts than the source of facts, which is why the answers stay closer to the truth.
One thing to watch: RAG is only as good as what it retrieves. If the right passage never gets found, or your documents do not cover the question, the answer can still be thin or wrong. It lowers made-up facts a lot. It does not erase them.
Maya is studying for a biochemistry exam. She asks her AI tool to explain the citric acid cycle. With RAG, it pulls the exact paragraphs from her lecture slides and explains it in those terms, instead of dragging in random details from the wider internet that her professor never taught.