What is RAG and why do people use it with AI?
RAG, or retrieval-augmented generation, means searching your own documents for relevant passages and giving them to the model along with the question, so it answers from real material instead of memory.
Why people use it:
- Answers can draw on private or recent information the model never saw in training.
- You can show the source passages, which makes checking easier.
- It reduces, but does not eliminate, made-up answers.
Typical steps: split documents into chunks, index them for search, find the best chunks for each question, and place them in the prompt with an instruction to answer only from them and to say when the answer is absent. Quality depends on good search, so test with real questions.
Related answers
Are AI-written phishing emails harder to spot, and what should I look for now?
Yes, AI can write clean, convincing phishing emails without the spelling mistakes people used to rely on, so judge the request and the sender, not the grammar.
privacy-safety
Can AI analyze my Excel or CSV data and can I trust the results?
Often yes, especially with assistants that can run code on uploaded files, but you should verify the results.
accuracy
Can an AI assistant be tricked by hidden instructions in emails or web pages?
Yes. If an assistant reads emails, web pages or documents, hidden text in them can try to give it new instructions, which is called prompt injection.
privacy-safety