RAG, Retrieval Augmented Generation
Marcelo Honorio Santos
Senior Software Engineer | Tech Lead | 20+ Years in Software Engineering | AWS, GCP, Azure Certified | Remote-ready | Crafting Scalable Solutions, Bridging Code and Creativity, Passionate Problem Solver in Tech
Hello my friends! Today i will talk a little bit about another important topic over Artificial Intelligence, RAG.
Its a summary to talk about important points of RAG.
I hope that you enjoy!
RAG, Retrieval Augmented Generation, aims to enhance Large Language Models, LLM, generating a better response to user requests.
It is an information search component that can be applied to the natural language model.
The RAG approach uses external sources in the search for information, in addition to the data used in training the Large Language Model to which it was implemented, thus improving responses and allowing the model's information domain to be increased without having to train it again.
The use of RAG in addition to LLM provides more informed and updated answers.
According to articles found on AWS, RAG is a process consisting of 4 steps:
1. Search for external information, or external data, as it is not part of the data present in LLM training, coming from APIs, Repositories, Databases, etc.
领英推荐
2. Information Retrieval, through contextual documents that are obtained from external data sets. Data is selected according to relevance to respond to user input. The input is transformed into a vector representation to be joined to a vector database. The information is analyzed for relevance through vector calculations carried out within the model and the most appropriate data is selected.
3. Enrichment of “prompts” or “user inputs” with context-relevant information that was retrieved from external information sources, making the response to LLM more relevant and accurate.
4. Updating external data with the aim of ensuring that the system continues to provide coherent responses, keeping external data updated, which can be carried out in two ways: automated processes in real time or periodic batch processing.
RAG makes real-time adaptation possible by enabling language models to dynamically access external knowledge sources, providing up-to-date, contractually relevant responses.
A transformative approach to the field of natural language processing, especially when used with LLM, helping to overcome obstacles that interfere with content generation by language models.
In the next weeks I will create a POC using AWS Bedrock and others AWS services for we have a real demonstration about generative AI.
That's it for now!
We'll see you soon!