Generative AI","metadata":{}},{"id":"faq-hub#faq-type#what-is","name":"what-is","namespaceId":"faq-hub#faq-type","description":"

what-is","metadata":{}}]}}]},"metadata":{"auth":{},"testAttributes":{}},"context":{"page":{"locale":null,"site":null,"pageUrl":"https://aws.amazon.com/what-is/langchain/","targetName":null,"pageSlotId":null,"organizationId":null,"availableLocales":null},"environment":{"stage":"prod","region":"us-east-1"},"sdkVersion":"1.0.115"},"refMap":{"manifest.js":"289765ed09","what-is-header.js":"251923df8a","what-is-header.rtl.css":"ccf4035484","what-is-header.css":"ce47058367","what-is-header.css.js":"004a4704e8","what-is-header.rtl.css.js":"f687973e4f"},"settings":{"templateMappings":{"category":"category","headline":"headline","primaryCTA":"primaryCTA","primaryCTAText":"primaryCTAText","primaryBreadcrumbText":"primaryBreadcrumbText","primaryBreadcrumbURL":"primaryBreadcrumbURL"}}}

LangChain is an open source framework for building applications based on large language models (LLMs). LLMs are large deep-learning models pre-trained on large amounts of data that can generate responses to user queries—for example, answering questions or creating images from text-based prompts. LangChain provides tools and abstractions to improve the customization, accuracy, and relevancy of the information the models generate. For example, developers can use LangChain components to build new prompt chains or customize existing templates. LangChain also includes components that allow LLMs to access new data sets without retraining. \n

Read about Large Language Models (LLMs)","id":"seo-faq-pairs#what-is-langchain","customSort":"1"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#langchain","name":"langchain","namespaceId":"seo-faq-pairs#faq-collections","description":"

langchain","metadata":{}}]}},{"fields":{"faqQuestion":"Why is LangChain important? ","faqAnswer":"

LLMs excel at responding to prompts in a general context, but struggle in a specific domain they were never trained on. Prompts are queries people use to seek responses from an LLM. For example, an LLM can provide an answer to how much a computer costs by providing an estimate. However, it can't list the price of a specific computer model that your company sells.  \n

To do that, machine learning engineers must integrate the LLM with the organization’s internal data sources and apply prompt engineering—a practice where a data scientist refines inputs to a generative model with a specific structure and context.  \n

LangChain streamlines intermediate steps to develop such data-responsive applications, making prompt engineering more efficient. It is designed to develop diverse applications powered by language models more effortlessly, including chatbots, question-answering, content generation, summarizers, and more. \n

The following sections describe benefits of LangChain. \n

Repurpose language models \n

With LangChain, organizations can repurpose LLMs for domain-specific applications without retraining or fine-tuning. Development teams can build complex applications referencing proprietary information to augment model responses. For example, you can use LangChain to build applications that read data from stored internal documents and summarize them into conversational responses. You can create a Retrieval Augmented Generation (RAG) workflow that introduces new information to the language model during prompting. Implementing context-aware workflows like RAG reduces model hallucination and improves response accuracy.  \n

Simplify AI development \n

LangChain simplifies artificial intelligence (AI) development by abstracting the complexity of data source integrations and prompt refining. Developers can customize sequences to build complex applications quickly. Instead of programming business logic, software teams can modify templates and libraries that LangChain provides to reduce development time.  \n

Developer support \n

LangChain provides AI developers with tools to connect language models with external data sources. It is open-source and supported by an active community. Organizations can use LangChain for free and receive support from other developers proficient in the framework.","id":"seo-faq-pairs#why-is-langchain-important","customSort":"2"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#langchain","name":"langchain","namespaceId":"seo-faq-pairs#faq-collections","description":"

langchain","metadata":{}}]}},{"fields":{"faqQuestion":"How does LangChain work? ","faqAnswer":"

With LangChain, developers can adapt a language model flexibly to specific business contexts by designating steps required to produce the desired outcome.  \n

Chains \n

Chains are the fundamental principle that holds various AI components in LangChain to provide context-aware responses. A chain is a series of automated actions from the user's query to the model's output. For example, developers can use a chain for: \n

Next Steps on AWS

Check out additional product-related resources
Innovate faster with AWS generative AI services 
Sign up for a free account

Instant get access to the AWS Free Tier.

Sign up 
Start building in the console

Get started building in the AWS management console.

Sign in