LangChain

LangChain is a popular framework for working with AI, Vectors, and embeddings. Used to simplify building a variety of AI applications.

Elasticsearch can be used with LangChain in two ways:

  • Use the LangChain ElasticsearchStore to store and retrieve documents from Elasticsearch.
  • Use the LangChain self-query retriever, with the help of an LLM like OpenAI, to transform a user's query into a query + filter to retrieve relevant documents from Elasticsearch.

Notebooks

LangServe Templates

LangChain Powered RAG Reference App

This reference app demonstrates how to use LangChain to power a RAG (Retrieval Augmented Generation) model. The app uses the ElasticsearchStore to store and retrieve documents from Elasticsearch. This is a quick way to get started with Langchain and Elasticsearch.

https://github.com/elastic/elasticsearch-labs/tree/main/example-apps/chatbot-rag-app

Share this article