An Idea (by Ingenious Piece)

No Matter What People Tell You, Words And Ideas Can Change The World.

Follow publication

Retrieval-Augmented Generation (RAG) — Basics to Advanced Series (Part 1)

Decoding the bigger picture !!

Chandan Durgia
An Idea (by Ingenious Piece)
4 min readJan 24, 2024

Photo by Romain Dancre on Unsplash

Pretext: I have been working on RAG build and efficacy assessments for a while and I realised there is certainly a lack of simplified resources available to understand the domain better. That’s why, I’ve am creaing this blog series, where the aim is to share my RAG journey lessons from scratch. If you come across any parts that need further explanation, please leave a comment.

Let’s dive in and unravel the mysteries of the RAG value chain! All the best !!

What is RAG and how is this different from ChatGPTs (LLMs)?

ChatGPT (or any other variant) is a Large Language Model (LLM) trained on massive amounts of text data (from the internet) and uses deep learning techniques to learn patterns and generate coherent and contextually relevant responses.

However, there are some glaring issues with the LLMs, key ones being — false/out-of-date information on the internet, using non-reliable sources from internet and hallucination. To avoid this, it is always prudent to leverage a reliable data source and extract the output from it.

And that’s where RAG (Retrieval-Augmented Generation) comes into picture. In order to understand what RAG means, lets fragmenting the keywords Retrieval, Augmented and Generation:

  • Retrieval: Retrieve relevant information or data from a specific source (pdf, API, database etc.) It involves searching and selecting the most appropriate information to be used in generating a response or output.
  • Augmented: Augment the query with the retrieved information to enhance and generate more accurate and relevant outputs.
  • Generation: Produce responses based augmented input or context provided. The language model generates new text that is coherent and relevant to the given input or query.

In other words, Retrieval-Augmented Generation (RAG) is a language model that doesn’t rely just on the internet but uses a specific data source instead. It enhances the performance of the model by incorporating a separate knowledge base that is not part of its training data. In other words, RAG…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

An Idea (by Ingenious Piece)
An Idea (by Ingenious Piece)

Published in An Idea (by Ingenious Piece)

No Matter What People Tell You, Words And Ideas Can Change The World.

Responses (2)

Write a response