From the course: Prompt Engineering with LangChain

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Retrieval: Interface with application-specific data

Retrieval: Interface with application-specific data

From the course: Prompt Engineering with LangChain

Retrieval: Interface with application-specific data

- [Instructor] Now that we know how to send data to a language model and parse that data, let's talk about another core component of LangChain. This component is called retrieval. So we'll start the notebook off by installing our dependencies, importing a couple of preliminaries that we need, set our OpenAI key, download a document. That's essentially what we're doing here. The document that we're downloading is the golden_hymns_of_epictetus. We're going to go ahead and just parse this text file to a Python object. That's pretty much all we're doing. Just cleaning this up a little bit. And you can see here that this is a document of 23,500 words. So real quick, I want to give you a high-level overview of this task called retrieval-augmented generation. So language models are trained on kind of a fixed dataset, right? There's so much data out in the world that a language model did not have access to during training. For example, you might be working at a company, your company's…

Contents