What Is RAG (Retrieval-Augmented Generation)?
RAG stands for Retrieval-Augmented Generation — an AI technique that combines two steps: retrieving real data (retrieval) and generating text (generation). Instead of relying solely on knowledge learned during training, an AI using RAG first searches for relevant information from an external database, then uses that information as context to generate more accurate and up-to-date answers.
RAG addresses a major limitation of LLMs: knowledge is frozen at the time of training.
Simple Explanation
Imagine the difference between two students in an exam:
- Student A (pure LLM): relies only on memory — knows a great deal but might misremember or lack new information
- Student B (LLM + RAG): allowed to look up reference books before answering — still uses their understanding to analyze, but their information is more accurate because they have specific sources
RAG is like giving AI the ability to "open a book" before answering.
Real-World Example
You ask: "How did VNM's Q3 2025 profit compare to the same period last year?"
Without RAG: The LLM might answer based on old data (from its training cutoff) or admit it does not know. Worse, it might "fabricate" a plausible-sounding number that is completely wrong — a phenomenon called hallucination.
With RAG: The system performs two steps:
- Retrieval: Searches the financial database and finds VNM's Q3 2025 report: revenue of 15,200B VND (+8% YoY), net profit of 2,100B VND (+12% YoY)
- Generation: The LLM uses this real data to produce an answer: "VNM's net profit in Q3 2025 reached 2,100 billion VND, up 12% year-over-year. Growth was primarily driven by improved gross margins as raw material costs declined."
The result: an answer with specific numbers, up-to-date data, and traceable sources.
Why It Matters for Investors
Reduces hallucination. In investing, a single wrong number can lead to a wrong decision. RAG forces AI to rely on actual data instead of "guessing" — significantly reducing the rate of inaccurate information.
Always current data. The stock market changes daily. RAG allows AI to access real-time data — stock prices, the latest financial reports, today's news — rather than being limited to stale training data.
Verifiable sources. When AI answers based on RAG, the information can be traced back to its origin. You know which financial report or filing a number came from — instead of having to trust the AI blindly.
For any AI system serving investors, RAG is not optional — it is a fundamental requirement to ensure the reliability of information.