Local AI search engine that auto-indexes any folder (code, docs, logs, PDFs) and speaks the Elasticsearch API, built in Rust.
elastic/elastic-labs
Executable Python notebooks, sample apps and resources for trying Elasticsearch across search, observability and security use cases.
- Stars
- 1,140
- Forks
- 280
- Open issues
- 52
- Last commit
- 4 days ago
What is it?
elastic-labs is a collection of runnable Python notebooks and sample applications from Elastic's Search team, covering how to use Elasticsearch as a vector database, build RAG and chatbot apps, and run hybrid search. It also includes material on OpenTelemetry-based observability with ES|QL queries and on security detection engineering and LLM application attack testing.
The notebooks cover kNN and hybrid search with reciprocal rank fusion, ELSER and multilingual E5 semantic search, query rules, synonyms, learning to rank, and semantic reranking. Integration examples connect Elasticsearch with OpenAI, Hugging Face, Cohere, Amazon Bedrock, Anthropic and LangChain. Three example apps are included: a Chatbot RAG App, an Internal Knowledge Search app and a Relevance Workbench.
The project is Apache-2.0 licensed and maintained by Elastic's Search team. Sample app code is not covered by Elastic's support services.
Key features
- 01Runs Elasticsearch as a vector database with kNN and hybrid search.
- 02Provides notebooks for ELSER and multilingual E5 semantic search.
- 03Includes RAG and chatbot example apps built on Elasticsearch.
- 04Shows integrations with OpenAI, Hugging Face, Cohere, Amazon Bedrock, Anthropic and LangChain.
- 05Covers OpenTelemetry observability and ES|QL log analysis examples.
- 06Includes security detection queries using ES|QL and EQL.
Use cases
- Learning how to build semantic search or RAG features on Elasticsearch.
- Prototyping a chatbot that answers questions over internal documents.
- Experimenting with query rules, synonyms and reranking to tune search relevance.
- Exploring ES|QL queries for logs, observability data or threat hunting.
Quick start
- 1
Open a notebook from the notebooks folder, such as the search quick start, in your browser via Colab or locally
- 2
Run the notebook cells against your own Elasticsearch deployment
Things to know
- This is a collection of examples and notebooks, not a single installable library.
- The notebooks assume you have an Elasticsearch deployment to connect to.
- Elastic support does not cover the sample application code in this repository.
In collections
Topics
FAQ
- What is elastic-labs?
- Executable Python notebooks, sample apps and resources for trying Elasticsearch across search, observability and security use cases. elastic-labs is a collection of runnable Python notebooks and sample applications from Elastic's Search team, covering how to use Elasticsearch as a vector database, build RAG and chatbot apps, and run hybrid search. It also includes material on OpenTelemetry-based observability with ES|QL queries and on security detection engineering and LLM application attack testing.
- Is elastic-labs free to use? What license does it have?
- elastic-labs is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is elastic-labs still maintained?
- Actively maintained. The last commit to elastic-labs was on Nov 3, 2026.
- What can I use elastic-labs for?
- Learning how to build semantic search or RAG features on Elasticsearch. Prototyping a chatbot that answers questions over internal documents. Experimenting with query rules, synonyms and reranking to tune search relevance. Exploring ES|QL queries for logs, observability data or threat hunting.
- How do I install elastic-labs?
- Open a notebook from the notebooks folder, such as the search quick start, in your browser via Colab or locally Run the notebook cells against your own Elasticsearch deployment
- Where can I get elastic-labs?
- The source code and installation instructions are on GitHub: https://github.com/elastic/elastic-labs
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
FastAPI backend for a conversational RAG agent that embeds documents into Qdrant, runs semantic and hybrid search, and answers questions with LLMs.
An AI-native search database that stores vector, full-text, structured and semi-structured data in one MySQL-compatible engine, for agent memory and retrieval.
All-in-one Python AI framework for semantic search, RAG, LLM orchestration and language model workflows, built on an embeddings database.
Epsilla is an open-source C++ vector database for embedding similarity search, with metadata filtering, hybrid search, and LLM retrieval integrations.
Open-source vector database that stores objects and vectors together, combining vector similarity search with structured filtering.