How to Create the Augmented Query in LangChain

Learn how LangChain applies query augmentation to refine information retrieval.

Now that we’ve covered how LangChain and ChromaDB handle indexing and retrieval, let’s dive into the next crucial step: augmentation. Imagine you’re on a treasure hunt, and you’ve just found a map. The map is a bit faded, and you need to enhance it to see all the details clearly. In the world of RAG systems, our “map” is the retrieved information, and augmentation is the process of removing that blurriness.

Think of it this way: when we ask a question, our system embarks on a computational adventure, fetching bits of information from various sources, as we saw in the previous lesson. But before this information is handed over to the generator component—which is responsible for the final response—it needs to undergo preprocessing or, in our context, augmentation.

Get hands-on with 1200+ tech skills courses.