dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD

Author Topic: RAG - Retrieval Augmented Generation  (Read 33 times)

Online Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7148
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 10:51:09 PM
  • Deeply Confused Learner
  • Profession: IT Engineer now retired
RAG - Retrieval Augmented Generation
« on: Today at 03:58:02 PM »
i=ojUsk7Y9NoqVS3Zs

RAG (Retrieval-Augmented Generation)

Core idea
RAG adds an external knowledge system to a language model so it doesn’t rely only on its internal weights.

Instead of:
Code: [Select]
Question → Model → Answer

You get:
Code: [Select]
Question → Retrieval → Context → Model → Answer

---

1. Full RAG pipeline (data flow)

Step 1: User query
Code: [Select]
"What are the side effects of drug X?"

Step 2: Embedding
The query is converted into a vector:
Code: [Select]
text → embedding vector

Step 3: Retrieval
The vector is used to search a database (vector store):

Code: [Select]
Query vector → nearest documents

Example outputs:
- medical paper excerpt
- guideline snippet
- prior Q&A or notes

---

Step 4: Augmentation
Combine retrieved context with the question:

Code: [Select]
Context + Question → Model Input

---

Step 5: Generation
The transformer produces an answer grounded in retrieved context:

Code: [Select]
Context + Question → Transformer → Answer

---

2. Full system flow

Code: [Select]
User Query
   ↓
Embedding Model
   ↓
Vector Search (Retrieval)
   ↓
Relevant Documents
   ↓
Context Augmentation
   ↓
LLM (Transformer)
   ↓
Final Answer

---

3. What changes vs a normal transformer

Plain LLM
- Uses only internal weights
- Static knowledge
- Can hallucinate when uncertain

RAG system
- Uses external documents
- Knowledge is dynamic and updatable
- More grounded answers (if retrieval works well)

---

4. Key intuition

- Transformer alone = closed-book exam
- RAG = open-book exam with instant indexing system

---

5. Where it fits in AI stack

Code: [Select]
Neural Networks
   ↓
Transformers
   ↓
LLMs
   ↓
RAG Systems (LLM + external memory)

RAG is not a model — it is an architecture built around a model.

---

Key takeaway
RAG is what turns an LLM from a static predictor into a system that can “look things up” before answering.

Generated by ChatGPT
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
21256 Views
Last post May 02, 2018, 07:10:00 AM
by Chip
0 Replies
21965 Views
Last post June 14, 2019, 06:09:31 PM
by Chip
0 Replies
11584 Views
Last post December 29, 2024, 07:44:50 PM
by Chip
0 Replies
12492 Views
Last post April 06, 2025, 03:55:22 AM
by smfadmin


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal