LLM hallucinations have been a difficulty even for tech giants like Google (merely ask Gemini what number of rocks are advisable to eat per day… spoiler alert, it’s one per day). Whereas we nonetheless don’t know methods to train LLMs widespread sense information, what we will do is give them sufficient context to your particular use case. That is the place Retrieval-Augmented Era (RAG) is available in! On this article, I’ll stroll you thru how I carried out a RAG pipeline that may learn my resume and speak to recruiters for me!
Psst! For those who don’t have a membership, you’ll be able to learn the article here.
First, let’s cowl our bases and guarantee we perceive what a RAG is and the way it works. In a nutshell, Retrieval-Augmented Era (RAG) is a way the place an LLM’s reply era is augmented with extra related data retrieved from a group of area information. The RAG pipeline picks essentially the most related chunk of textual content out of your non-public knowledge and lets the LLM learn it together with the immediate to generate a solution. For instance, on this article, I’m constructing a bare-bones chatbot that solutions recruiters’ questions for me. For the LLM to precisely do its job, I need to “inform” it who I’m. Utilizing a RAG pipeline, I can let it retrieve essentially the most related components of my resume for each recruiter’s query augmenting the LLM’s…