mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-13 05:09:22 +03:00
concepts: update llm stub page and re-link (#27567)
Update text llm stub page and re-link content
This commit is contained in:
1 parent
f2dbf01d4a
commit
4466caadba
173 files changed
+306
-299
No files matched your search
@@ -25,9 +25,9 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chat Models](/docs/concepts/#chat-models)\n",
|
||||
"- [Tools](/docs/concepts/#tools)\n",
|
||||
"- [Agents](/docs/concepts/#agents)\n",
|
||||
"- [Chat Models](/docs/concepts/chat_models)\n",
|
||||
"- [Tools](/docs/concepts/tools)\n",
|
||||
"- [Agents](/docs/concepts/agents)\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chat Models](/docs/concepts/#chat-models)\n",
|
||||
"- [Prompt Templates](/docs/concepts/#prompt-templates)\n",
|
||||
"- [Chat History](/docs/concepts/#chat-history)\n",
|
||||
"- [Chat Models](/docs/concepts/chat_models)\n",
|
||||
"- [Prompt Templates](/docs/concepts/prompt_templates)\n",
|
||||
"- [Chat History](/docs/concepts/chat_history)\n",
|
||||
"\n",
|
||||
"This guide requires `langgraph >= 0.2.28`.\n",
|
||||
":::\n",
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chat Models](/docs/concepts/#chat-models)\n",
|
||||
"- [Tools](/docs/concepts/#tools)\n",
|
||||
"- [Tool calling](/docs/concepts/#function-tool-calling)\n",
|
||||
"- [Chat Models](/docs/concepts/chat_models)\n",
|
||||
"- [Tools](/docs/concepts/tools)\n",
|
||||
"- [Tool calling](/docs/concepts/tool_calling)\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
"\n",
|
||||
"After reading this tutorial, you'll have a high level overview of:\n",
|
||||
"\n",
|
||||
"- Using [language models](/docs/concepts/#chat-models)\n",
|
||||
"- Using [language models](/docs/concepts/chat_models)\n",
|
||||
"\n",
|
||||
"- Using [PromptTemplates](/docs/concepts/#prompt-templates) and [OutputParsers](/docs/concepts/#output-parsers)\n",
|
||||
"- Using [PromptTemplates](/docs/concepts/prompt_templates) and [OutputParsers](/docs/concepts/output_parsers)\n",
|
||||
"\n",
|
||||
"- Using [LangChain Expression Language (LCEL)](/docs/concepts/#langchain-expression-language-lcel) to chain components together\n",
|
||||
"- Using [LangChain Expression Language (LCEL)](/docs/concepts/lcel) to chain components together\n",
|
||||
"\n",
|
||||
"- Debugging and tracing your application using [LangSmith](/docs/concepts/#langsmith)\n",
|
||||
"\n",
|
||||
@@ -443,7 +443,7 @@
|
||||
"id": "0b19cecb",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This is a simple example of using [LangChain Expression Language (LCEL)](/docs/concepts/#langchain-expression-language-lcel) to chain together LangChain modules. There are several benefits to this approach, including optimized streaming and tracing support.\n",
|
||||
"This is a simple example of using [LangChain Expression Language (LCEL)](/docs/concepts/lcel) to chain together LangChain modules. There are several benefits to this approach, including optimized streaming and tracing support.\n",
|
||||
"\n",
|
||||
"If we take a look at the LangSmith trace, we can see all three components show up in the [LangSmith trace](https://smith.langchain.com/public/bc49bec0-6b13-4726-967f-dbd3448b786d/r)."
|
||||
]
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chat Models](/docs/concepts/#chat-models)\n",
|
||||
"- [Chat Models](/docs/concepts/chat_models)\n",
|
||||
"- [Chaining runnables](/docs/how_to/sequence/)\n",
|
||||
"- [Embeddings](/docs/concepts/#embedding-models)\n",
|
||||
"- [Embeddings](/docs/concepts/embedding_models)\n",
|
||||
"- [Vector stores](/docs/concepts/#vector-stores)\n",
|
||||
"- [Retrieval-augmented generation](/docs/tutorials/rag/)\n",
|
||||
"\n",
|
||||
@@ -25,7 +25,7 @@
|
||||
"\n",
|
||||
"This guide will show how to run `LLaMA 3.1` via one provider, [Ollama](/docs/integrations/providers/ollama/) locally (e.g., on your laptop) using local embeddings and a local LLM. However, you can set up and swap in other local providers, such as [LlamaCPP](/docs/integrations/chat/llamacpp/) if you prefer.\n",
|
||||
"\n",
|
||||
"**Note:** This guide uses a [chat model](/docs/concepts/#chat-models) wrapper that takes care of formatting your input prompt for the specific local model you're using. However, if you are prompting local models directly with a [text-in/text-out LLM](/docs/concepts/#llms) wrapper, you may need to use a prompt tailed for your specific model. This will often [require the inclusion of special tokens](https://huggingface.co/blog/llama2#how-to-prompt-llama-2). [Here's an example for LLaMA 2](https://smith.langchain.com/hub/rlm/rag-prompt-llama).\n",
|
||||
"**Note:** This guide uses a [chat model](/docs/concepts/chat_models) wrapper that takes care of formatting your input prompt for the specific local model you're using. However, if you are prompting local models directly with a [text-in/text-out LLM](/docs/concepts/text_llms) wrapper, you may need to use a prompt tailed for your specific model. This will often [require the inclusion of special tokens](https://huggingface.co/blog/llama2#how-to-prompt-llama-2). [Here's an example for LLaMA 2](https://smith.langchain.com/hub/rlm/rag-prompt-llama).\n",
|
||||
"\n",
|
||||
"## Setup\n",
|
||||
"\n",
|
||||
@@ -445,7 +445,7 @@
|
||||
"\n",
|
||||
"- [Video: Reliable, fully local RAG agents with LLaMA 3](https://www.youtube.com/watch?v=-ROS6gfYIts) for an agentic approach to RAG with local models\n",
|
||||
"- [Video: Building Corrective RAG from scratch with open-source, local LLMs](https://www.youtube.com/watch?v=E2shqsYwxck)\n",
|
||||
"- [Conceptual guide on retrieval](/docs/concepts/#retrieval) for an overview of various retrieval techniques you can apply to improve performance\n",
|
||||
"- [Conceptual guide on retrieval](/docs/concepts/retrieval) for an overview of various retrieval techniques you can apply to improve performance\n",
|
||||
"- [How to guides on RAG](/docs/how_to/#qa-with-rag) for a deeper dive into different specifics around of RAG\n",
|
||||
"- [How to run models locally](/docs/how_to/local_llms/) for different approaches to setting up different providers"
|
||||
]
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Document loaders](/docs/concepts/#document-loaders)\n",
|
||||
"- [Chat models](/docs/concepts/#chat-models)\n",
|
||||
"- [Embeddings](/docs/concepts/#embedding-models)\n",
|
||||
"- [Document loaders](/docs/concepts/document_loaders)\n",
|
||||
"- [Chat models](/docs/concepts/chat_models)\n",
|
||||
"- [Embeddings](/docs/concepts/embedding_models)\n",
|
||||
"- [Vector stores](/docs/concepts/#vector-stores)\n",
|
||||
"- [Retrieval-augmented generation](/docs/tutorials/rag/)\n",
|
||||
"\n",
|
||||
@@ -33,7 +33,7 @@
|
||||
"\n",
|
||||
"PDF files often hold crucial unstructured data unavailable from other sources. They can be quite lengthy, and unlike plain text files, cannot generally be fed directly into the prompt of a language model.\n",
|
||||
"\n",
|
||||
"In this tutorial, you'll create a system that can answer questions about PDF files. More specifically, you'll use a [Document Loader](/docs/concepts/#document-loaders) to load text in a format usable by an LLM, then build a retrieval-augmented generation (RAG) pipeline to answer questions, including citations from the source material.\n",
|
||||
"In this tutorial, you'll create a system that can answer questions about PDF files. More specifically, you'll use a [Document Loader](/docs/concepts/document_loaders) to load text in a format usable by an LLM, then build a retrieval-augmented generation (RAG) pipeline to answer questions, including citations from the source material.\n",
|
||||
"\n",
|
||||
"This tutorial will gloss over some concepts more deeply covered in our [RAG](/docs/tutorials/rag/) tutorial, so you may want to go through those first if you haven't already.\n",
|
||||
"\n",
|
||||
@@ -111,13 +111,13 @@
|
||||
"\n",
|
||||
"- The loader reads the PDF at the specified path into memory.\n",
|
||||
"- It then extracts text data using the `pypdf` package.\n",
|
||||
"- Finally, it creates a LangChain [Document](/docs/concepts/#documents) for each page of the PDF with the page's content and some metadata about where in the document the text came from.\n",
|
||||
"- Finally, it creates a LangChain [Document](https://python.langchain.com/api_reference/core/documents/langchain_core.documents.base.Document.html#langchain_core.documents.base.Document) for each page of the PDF with the page's content and some metadata about where in the document the text came from.\n",
|
||||
"\n",
|
||||
"LangChain has [many other document loaders](/docs/integrations/document_loaders/) for other data sources, or you can create a [custom document loader](/docs/how_to/document_loader_custom/).\n",
|
||||
"\n",
|
||||
"## Question answering with RAG\n",
|
||||
"\n",
|
||||
"Next, you'll prepare the loaded documents for later retrieval. Using a [text splitter](/docs/concepts/#text-splitters), you'll split your loaded documents into smaller documents that can more easily fit into an LLM's context window, then load them into a [vector store](/docs/concepts/#vector-stores). You can then create a [retriever](/docs/concepts/#retrievers) from the vector store for use in our RAG chain:\n",
|
||||
"Next, you'll prepare the loaded documents for later retrieval. Using a [text splitter](/docs/concepts/text_splitters), you'll split your loaded documents into smaller documents that can more easily fit into an LLM's context window, then load them into a [vector store](/docs/concepts/#vector-stores). You can then create a [retriever](/docs/concepts/retrievers) from the vector store for use in our RAG chain:\n",
|
||||
"\n",
|
||||
"import ChatModelTabs from \"@theme/ChatModelTabs\";\n",
|
||||
"\n",
|
||||
@@ -315,7 +315,7 @@
|
||||
"\n",
|
||||
"For more on document loaders, you can check out:\n",
|
||||
"\n",
|
||||
"- [The entry in the conceptual guide](/docs/concepts/#document-loaders)\n",
|
||||
"- [The entry in the conceptual guide](/docs/concepts/document_loaders)\n",
|
||||
"- [Related how-to guides](/docs/how_to/#document-loaders)\n",
|
||||
"- [Available integrations](/docs/integrations/document_loaders/)\n",
|
||||
"- [How to create a custom document loader](/docs/how_to/document_loader_custom/)\n",
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chat history](/docs/concepts/#chat-history)\n",
|
||||
"- [Chat models](/docs/concepts/#chat-models)\n",
|
||||
"- [Embeddings](/docs/concepts/#embedding-models)\n",
|
||||
"- [Chat history](/docs/concepts/chat_history)\n",
|
||||
"- [Chat models](/docs/concepts/chat_models)\n",
|
||||
"- [Embeddings](/docs/concepts/embedding_models)\n",
|
||||
"- [Vector stores](/docs/concepts/#vector-stores)\n",
|
||||
"- [Retrieval-augmented generation](/docs/tutorials/rag/)\n",
|
||||
"- [Tools](/docs/concepts/#tools)\n",
|
||||
"- [Agents](/docs/concepts/#agents)\n",
|
||||
"- [Tools](/docs/concepts/tools)\n",
|
||||
"- [Agents](/docs/concepts/agents)\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
"\n",
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Document loaders](/docs/concepts/#document-loaders)\n",
|
||||
"- [Chat models](/docs/concepts/#chat-models)\n",
|
||||
"- [Embeddings](/docs/concepts/#embedding-models)\n",
|
||||
"- [Document loaders](/docs/concepts/document_loaders)\n",
|
||||
"- [Chat models](/docs/concepts/chat_models)\n",
|
||||
"- [Embeddings](/docs/concepts/embedding_models)\n",
|
||||
"- [Vector stores](/docs/concepts/#vector-stores)\n",
|
||||
"- [Retrieval](/docs/concepts/#retrieval)\n",
|
||||
"- [Retrieval](/docs/concepts/retrieval)\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"complexity.\n",
|
||||
"\n",
|
||||
"If you're already familiar with basic retrieval, you might also be interested in\n",
|
||||
"this [high-level overview of different retrieval techinques](/docs/concepts/#retrieval).\n",
|
||||
"this [high-level overview of different retrieval techinques](/docs/concepts/retrieval).\n",
|
||||
"\n",
|
||||
"## What is RAG?\n",
|
||||
"\n",
|
||||
@@ -39,15 +39,15 @@
|
||||
"The most common full sequence from raw data to answer looks like:\n",
|
||||
"\n",
|
||||
"### Indexing\n",
|
||||
"1. **Load**: First we need to load our data. This is done with [Document Loaders](/docs/concepts/#document-loaders).\n",
|
||||
"2. **Split**: [Text splitters](/docs/concepts/#text-splitters) break large `Documents` into smaller chunks. This is useful both for indexing data and for passing it in to a model, since large chunks are harder to search over and won't fit in a model's finite context window.\n",
|
||||
"3. **Store**: We need somewhere to store and index our splits, so that they can later be searched over. This is often done using a [VectorStore](/docs/concepts/#vector-stores) and [Embeddings](/docs/concepts/#embedding-models) model.\n",
|
||||
"1. **Load**: First we need to load our data. This is done with [Document Loaders](/docs/concepts/document_loaders).\n",
|
||||
"2. **Split**: [Text splitters](/docs/concepts/text_splitters) break large `Documents` into smaller chunks. This is useful both for indexing data and for passing it in to a model, since large chunks are harder to search over and won't fit in a model's finite context window.\n",
|
||||
"3. **Store**: We need somewhere to store and index our splits, so that they can later be searched over. This is often done using a [VectorStore](/docs/concepts/#vector-stores) and [Embeddings](/docs/concepts/embedding_models) model.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"### Retrieval and generation\n",
|
||||
"4. **Retrieve**: Given a user input, relevant splits are retrieved from storage using a [Retriever](/docs/concepts/#retrievers).\n",
|
||||
"5. **Generate**: A [ChatModel](/docs/concepts/#chat-models) / [LLM](/docs/concepts/#llms) produces an answer using a prompt that includes the question and the retrieved data\n",
|
||||
"4. **Retrieve**: Given a user input, relevant splits are retrieved from storage using a [Retriever](/docs/concepts/retrievers).\n",
|
||||
"5. **Generate**: A [ChatModel](/docs/concepts/chat_models) / [LLM](/docs/concepts/text_llms) produces an answer using a prompt that includes the question and the retrieved data\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -946,7 +946,7 @@
|
||||
"- [Return sources](/docs/how_to/qa_sources): Learn how to return source documents\n",
|
||||
"- [Streaming](/docs/how_to/streaming): Learn how to stream outputs and intermediate steps\n",
|
||||
"- [Add chat history](/docs/how_to/message_history): Learn how to add chat history to your app\n",
|
||||
"- [Retrieval conceptual guide](/docs/concepts/#retrieval): A high-level overview of specific retrieval techniques\n",
|
||||
"- [Retrieval conceptual guide](/docs/concepts/retrieval): A high-level overview of specific retrieval techniques\n",
|
||||
"- [Build a local RAG application](/docs/tutorials/local_rag): Create an app similar to the one above using all local components"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
"\n",
|
||||
"## Retrievers\n",
|
||||
"\n",
|
||||
"LangChain `VectorStore` objects do not subclass [Runnable](https://python.langchain.com/api_reference/core/index.html#module-langchain_core.runnables), and so cannot immediately be integrated into LangChain Expression Language [chains](/docs/concepts/#langchain-expression-language-lcel).\n",
|
||||
"LangChain `VectorStore` objects do not subclass [Runnable](https://python.langchain.com/api_reference/core/index.html#module-langchain_core.runnables), and so cannot immediately be integrated into LangChain Expression Language [chains](/docs/concepts/lcel).\n",
|
||||
"\n",
|
||||
"LangChain [Retrievers](https://python.langchain.com/api_reference/core/index.html#module-langchain_core.retrievers) are Runnables, so they implement a standard set of methods (e.g., synchronous and asynchronous `invoke` and `batch` operations) and are designed to be incorporated in LCEL chains.\n",
|
||||
"\n",
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
"This guide assumes familiarity with the following concepts:\n",
|
||||
"\n",
|
||||
"- [Chaining runnables](/docs/how_to/sequence/)\n",
|
||||
"- [Chat models](/docs/concepts/#chat-models)\n",
|
||||
"- [Tools](/docs/concepts/#tools)\n",
|
||||
"- [Agents](/docs/concepts/#agents)\n",
|
||||
"- [Chat models](/docs/concepts/chat_models)\n",
|
||||
"- [Tools](/docs/concepts/tools)\n",
|
||||
"- [Agents](/docs/concepts/agents)\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
"\n",
|
||||
"Concepts we will cover are:\n",
|
||||
"\n",
|
||||
"- Using [language models](/docs/concepts/#chat-models).\n",
|
||||
"- Using [language models](/docs/concepts/chat_models).\n",
|
||||
"\n",
|
||||
"- Using [document loaders](/docs/concepts/#document-loaders), specifically the [WebBaseLoader](https://python.langchain.com/api_reference/community/document_loaders/langchain_community.document_loaders.web_base.WebBaseLoader.html) to load content from an HTML webpage.\n",
|
||||
"- Using [document loaders](/docs/concepts/document_loaders), specifically the [WebBaseLoader](https://python.langchain.com/api_reference/community/document_loaders/langchain_community.document_loaders.web_base.WebBaseLoader.html) to load content from an HTML webpage.\n",
|
||||
"\n",
|
||||
"- Two ways to summarize or otherwise combine documents.\n",
|
||||
" 1. [Stuff](/docs/tutorials/summarization#stuff), which simply concatenates documents into a prompt;\n",
|
||||
|
||||
Reference in new issue
Block a user