Skip to Content
All Articles Our blog

RAG

Why we need RAG?

Retrieval-Augmented Generation (RAG) is an AI framework that improves Large Language Model (LLM) accuracy and relevance by fetching data from trusted, external, or proprietary knowledge bases before generating a response. 

If we asked our LLM like is virtat kholi playing next match?

LLM are not upto date

suppose TCS revenue in 2022-2023?

LLM will give Very generic response even the document is available on internet.

suppose if we have a pdf report, if i upload the report in somewhere.

if we have sales report in this pdf, so to overcome LLM problem overcome we will consider RAG, then we will get exact answer from our model because we train it on pdf.

suppose we have a book, if we put this is in database, so we augment model with this book. so we store the text in form of embeding in vector db. the embeding is important,each chunk is converted into a vector by an embedding model. It takes text and maps it into a high-dimensional space so that:

  • similar meaning = close vectors

  • different meaning = far vectors

This is why vector DB can search by meaning, not only exact words

but vector db design,architect matter a lot, like architectural constrains depends on use cases. 

Next Article Langraph
Kashif Aziz
Kashif Aziz
AlhadiTech Engineer

Technical expert at AlhadiTech passionate about building enterprise-grade Odoo solutions and sharing knowledge with the community.

More posts by this author