![]() And the next step will likely be dependent on the user input and the response in the previous steps.įor such applications, the LangChain library provides “ Agents” that can take actions based on inputs along the way instead of a hardcoded deterministic sequence. In some tasks, however, the sequence of calls is often not deterministic. We mentioned that “chains” can help chain together a sequence of LLM calls. Or when we need code snippets to compute a specific mathematical quantity or solve a problem instead of computing answers once. These are suitable for applications where it’ll help to interact directly with the underlying system. The utils module provides Bash and Python interpreter sessions amongst others. Currently, document loaders leverage the Python library Unstructured to convert these raw data sources into text that can be processed. Your corpus may be a mix of text files, PDF documents, HTML web pages, images, and more. ![]() Suppose you have a large corpus of text on economics that you'd like to build an NLP app over. LangChain’s Document Loaders and Utils modules facilitate connecting to sources of data and computation, respectively. To that end, LangChain provides prompt templates that you can use to format inputs and a lot of other utilities. Even in a ChatGPT session, the answer is only as helpful as the prompt. Prompts are at the core of any NLP application. Which can then be used to generate a response. You may need to read in user input which is then used to construct the prompt. However, as the name LangChain suggests, you can chain together LLM calls depending on specific tasks.įor example, you may need to get data from a specific URL, summarize the returned text, and answer questions using the generated summary. It is essentially a wrapper around a large language model that helps use the functionality and capability of a specific large language model.Īs mentioned, LLM is the fundamental unit in LangChain. LLM is the fundamental component of LangChain. Next let's take a look at some of the modules in LangChain:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |