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
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
What is LangChain?4m 54s
-
(Locked)
LangChain overview4m 52s
-
(Locked)
Model I/O: Interface with language models20m 16s
-
(Locked)
Retrieval: Interface with application-specific data13m 35s
-
Chains: Construct sequences of calls15m 13s
-
(Locked)
Agents: Let chains choose tools based on high-level directives11m 4s
-
(Locked)
Memory: Persist application state between runs of a chain8m 16s
-
(Locked)
-
-
-
-
-