Elastic's cookbook for turning a search engine into an AI backend
A curated pile of notebooks and sample apps showing how to wire Elasticsearch into RAG pipelines, LangChain, and vector search without starting from scratch.

What it does This is Elastic’s official example kitchen: runnable Jupyter notebooks and three sample apps that demonstrate how to use Elasticsearch as a vector database, hybrid search engine, and retrieval backbone for LLM applications. The notebooks cover everything from keyword queries and semantic reranking to document chunking and integration with OpenAI, Anthropic, Hugging Face, and LangChain.
The interesting bit The repo treats Elasticsearch less like a text search tool and more like a configurable AI infrastructure layer. It showcases Elastic’s own out-of-the-box models—particularly the Elastic Learned Sparse Encoder (ELSER) and reciprocal rank fusion (RRF)—as first-class alternatives to tuning your own embeddings. That’s a notable pitch: semantic search without the usual training overhead.
Key highlights
- 20+ executable notebooks, organized by topic: generative AI, LangChain, search fundamentals, document chunking, and third-party integrations
- Three working apps: a RAG chatbot, an internal knowledge search tool, and a relevance workbench
- Heavy emphasis on hybrid search—combining BM25 keyword matching with vector/semantic approaches
- Explicit support for model migration (e.g., upgrading indexes to use ELSER)
- Colab-ready, so you can run in-browser without local setup
Caveats
- The sample apps are explicitly excluded from official Elastic support; you’re on your own for debugging
- The README is a flat directory listing—no guided learning path, so you’ll need to know what you’re looking for
Verdict Worth bookmarking if you’re already running Elastic and want to add RAG or semantic search without rebuilding your stack. Skip it if you’re looking for a standalone vector database comparison or a gentle introduction to search fundamentals.