Advanced RAG - Overview

I'm a passionate web developer, focusing on Generative AI to deliver responsive, innovative, and visually appealing modern web applications that make a real-world impact and enhance user experience. I am also enthusiastic about exploring and utilizing new, innovative tech products to improve efficiency and stay ahead in the ever-evolving tech landscape."
Advanced RAG : Rag with optimization , to make Response more Accurate for User .
RAG is Retrieval-Augmented Generation , its basically Retrieving (Fetching) Relevant information from some External data source and providing it as a context to LLMs, Augement ( Increasing) the model’s base Knowledge to Generate Improved Output response by LLMs .
which works on 3 step process, Indexing → Retrieval → Generation
If u want to read in detail, i have explained in simple words, you can read it here
Why Advanced RAG ?
Till now with RAG, we were able to fetch small data , and use it to Augment our model knowledge, but in real Life, or Production level use-case, reality is we have to “ interact with vast collections of information ( Sparse Data ) ” , for that We need OPTIMIZATION in response generated by model
To increase Accuracy of responses , there is a direct relation you will see => To Increase Context being provided to Model before generation , now this Increasing Context doesn’t mean, literally increasing it, since we have Context Window concept it is limited, but to provide model with Increased Related Context to make him give more Accurate responses.
User Prompts are the only thing in LLMs , we don’t have control over, so we can’t do anything about them, but what we can do is we can optimize them after receiving them.
ISSUES with USER Prompts : Because there is difference between, What user intends to ask LLM ? and What user is actually asking ? - So its our responsibility as developers to provide most accurate response possible , it can be very Abstract , too much Detail , Ambiguous , Garbage - anything, and if we don’t optimize, its default nature of LLM, to provide same output as your prompt is , GARBAGE IN GARBAGE OUT…
For Advancing, we have three options:
QUERY TRANSFORMATION , ROUTING , QUERY CONSTRUCTION
for now, we will just focus at QUERY TRANSFORMATION PART,
Query Transformation / Translation:
Meaning : Changing User Prompt
Objective : Improving User Prompt to provide more & better Context for more accurate Response
Query Translation Techniques:

I have discussed all Advanced RAG techniques, check out! Advanced RAG Article Series
Code Repository → Github - Advanced RAG
Conclusion:
Just Explained my learning’s about Advanced RAG! if u find it useful then don’t forget to like this Article &
Follow for more such informative Articles Me
Credits:
Credits: I am very grateful to ChaiCode for Providing all this knowledge, Insights , Deep Learning about AI : Piyush Garg Hitesh Choudhary
If you want to learn too, you can Join here → Cohort || Apply from ChaiCode & Use NAKUL51937 to get 10% off
Thanks:
Feel free to Comment your thoughts, Would love to hear your feedback! this is my third Article :)
Thanks you for Giving your Precious time , reading this article
Connect:
Let’s learn something Together: LinkedIn
If you would like , you can Check out my Portfolio






