elastic/elastic-labs: What the Notebooks Repository Actually Gives You
Notebooks & Example Apps for Search, Observability, and Security with Elasticsearch
At a glance
- What is it?
- Elastic's elastic-labs repository collects executable Python notebooks and sample apps for vector search, RAG, and hybrid retrieval on Elasticsearch. It is a teaching and prototyping resource, not a library you install.
- Who is it for?
- Adopt elastic-labs if you need a working reference for Elasticsearch vector search, RAG, or LangChain integration before committing to an architecture, and treat the notebooks as executable documentation rather than as a dependency. Skip it if you want a supported library, a packaged service, or a drop-in chatbot: the README states that Elastic's official support services do not apply to the sample application code in the repository.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What elastic-labs Is For, and Who Should Open It
The repository is a set of executable Python notebooks, sample apps, and resources for testing the Elastic platform. The README frames the intended work plainly: using Elasticsearch as a vector database to store embeddings, building retrieval augmented generation, summarization, and question answering, and trying out capabilities such as the Elastic Learned Sparse Encoder and reciprocal rank fusion. Integration notebooks cover OpenAI, Hugging Face, Amazon Bedrock, and Cohere, plus a set of LangChain examples.
The audience is narrower than the topic list suggests. If you are evaluating whether Elasticsearch can serve as the retrieval layer for an LLM application, the notebooks let you run that evaluation in a browser through Colab or locally with a Jupyter environment. If you already run Elasticsearch and want to see how hybrid search, query rules, synonyms, or learning to rank behave on real data, the numbered search notebooks walk through each in sequence. What you will not find is a Python package with a stable API. Nothing here is published as a library, and the README points readers to Search Labs for articles and tutorials rather than to a product download.
How the Repository Is Organized: Notebooks, Apps, Datasets, Docker
The top-level layout separates concerns by artifact type. The notebooks directory holds the executable content, grouped into generative AI, playground examples, LangChain, document chunking, search, integrations, and model upgrades. The example-apps directory holds three runnable applications: a chatbot RAG app, an internal knowledge search app, and a relevance workbench. Supporting directories include datasets, docker, k8s, bin, telemetry, and supporting-blog-content.
The search notebooks are numbered from 00-quick-start through 09-semantic-text, with separate files for semantic reranking using Cohere and Hugging Face. That numbering is the closest thing to a learning path in the repository. The document chunking set covers ingest pipelines, LangChain splitters, and token counting for ELSER and E5, which matters because chunking decisions drive retrieval quality more than most query tuning does.
The Makefile shows how the repository tests itself. A shell script, bin/find-notebooks-to-test.sh, produces the list of notebooks wired into the testing framework, and bin/nbtest runs them. That means the notebooks are not static prose with code pasted in; they are executed as part of the project's own tooling. The README also notes that a pre-commit configuration exists at the top level, and requirements-dev.txt supplies the development dependencies.
Installing the Tooling and Running Your First Notebook Check
There is no package to install for the notebooks themselves. What the Makefile installs is the development and testing environment: a virtual environment, the pre-commit hooks, and elastic-nbtest, the tool used to execute notebooks. The Makefile defines the install targets as follows, so run them from the repository root after cloning it.
install: install-pre-commit install-nbtest
install-pre-commit:
python -m venv $(VENV)
$(VENV)/bin/pip install -qqq -r requirements-dev.txt
$(VENV)/bin/pre-commit install
install-nbtest:
python3 -m venv $(VENV)
$(VENV)/bin/pip install -qqq elastic-nbtestThe install-pre-commit target creates a .venv directory, installs requirements-dev.txt into it, and registers the pre-commit hooks. The install-nbtest target creates the same virtual environment and installs elastic-nbtest. Note that both targets invoke a venv creation command on the same path, so running them in sequence recreates the environment rather than adding to it.
To run the notebook tests, the Makefile chains the two prerequisite targets:
test: install-nbtest notebooks
notebooks:
bin/nbtest $(NOTEBOOKS)Here NOTEBOOKS is populated by bin/find-notebooks-to-test.sh. Expect the run to take real time and to require network access, because the notebooks call external services. The Makefile also exposes a pre-commit target that runs the hooks against all files.
For a first real use, the README points at the generative AI and search notebooks. Opening notebooks/search/00-quick-start.ipynb is the lowest-friction entry point because it is numbered first in the search sequence. The README notes that Colab provides a browser-based Python environment, which avoids local setup entirely. Whichever route you take, the notebooks are where the actual Elasticsearch calls live; there is no wrapper module to import.
Support Boundaries and Other Reasons This Might Be the Wrong Repository
The README is unusually direct about support. It states that Elastic's official support services, available to subscription customers for their Elasticsearch deployments, do not apply to the sample application code contained in this repository. So the chatbot RAG app and the internal knowledge search app are examples, not supported products. If your organization requires a vendor-backed component, these apps do not qualify, and the README routes questions to the Elastic discuss forums under the #esre-elasticsearch-relevance-engine tag or to the Elastic Community Slack channel.
There is also no release history to pin against. No releases were retrieved for the repository, so there are no version numbers to track and no changelog to consult when a notebook stops working. The notebooks depend on Elasticsearch behavior, on client library versions, and on third-party services such as OpenAI, Hugging Face, Amazon Bedrock, and Cohere. Any of those can move independently. The model upgrades notebook, upgrading-index-to-use-elser.ipynb, exists precisely because embedding models change and indexes built with an older model need migration.
Finally, the repository is a collection, not a coherent product. The notebooks do not share a common configuration layer, and the README does not document a unified setup path across them. If you want a single supported integration surface, a client library is the right shape and this is not it. The last push to the default branch was on 2026-09-09, so the repository is currently being updated, but that says nothing about the stability of any individual notebook's dependencies.
How elastic-labs Differs from the Elasticsearch Python Client
The natural alternative is the official Elasticsearch Python client, which is the library the notebooks themselves call. The difference in approach is scope. The client is a thin, versioned transport layer: you construct a connection, issue requests, and handle responses. It ships with its own release cadence and is the thing you would list in a requirements file.
elastic-labs sits above that. It demonstrates what requests to send and in what order to get a particular outcome, such as hybrid search with reciprocal rank fusion, or a RAG pipeline that retrieves documents and passes them to a language model. The notebooks embed the client plus a specific workflow plus sample data. That makes them useful for learning and awkward as a dependency, because there is no importable module that encapsulates the workflow.
The practical consequence: read the notebook, understand the sequence, then write your own code against the client. Copying a notebook into a production service means inheriting its assumptions about index mappings, chunk sizes, and model choice, none of which the README documents as configurable. The LangChain notebooks add a second layer of the same trade-off, since LangChain's abstractions and Elasticsearch's native capabilities overlap, and the repository includes a BM25-only self-query example alongside the vector store examples for exactly that comparison.
Licence, Maintenance, and the Cost of Keeping Up
The repository is licensed under the Apache License, version 2.0, with a LICENSE file at the root and a NOTICE file alongside it. Apache-2.0 permits commercial use, modification, and redistribution with the usual conditions around notices and attribution. This is a permissive licence, which matters here because sample code under a restrictive licence would be hard to reuse in a product. That is a description of the licence terms, not legal advice; check the LICENSE and NOTICE files yourself before redistributing anything.
Maintenance cost is the real consideration. The repository has no releases, so there is nothing to upgrade against in a structured way. When a notebook breaks, you diagnose it by reading the notebook. The Makefile's test target exists to catch that, and bin/nbtest is the mechanism, which suggests the maintainers treat notebook execution as the regression test. If you fork the repository, you inherit that tooling and can run its test target yourself.
The dependency surface is broad. requirements-dev.txt covers development tooling, elastic-nbtest covers notebook execution, and each notebook may pull in additional clients for OpenAI, LangChain, Hugging Face, or Cohere. Tracking all of that across an Elasticsearch upgrade is ongoing work. The model upgrades notebook is a reminder that embedding model changes force index rebuilds, which is a cost that lands on your infrastructure, not on the repository.
Editorial conclusion
Adopt elastic-labs if you need a working reference for Elasticsearch vector search, RAG, or LangChain integration before committing to an architecture, and treat the notebooks as executable documentation rather than as a dependency. Skip it if you want a supported library, a packaged service, or a drop-in chatbot: the README states that Elastic's official support services do not apply to the sample application code in the repository. Before building on anything here, open the specific notebook or app directory you intend to copy, confirm which Elasticsearch version it assumes, and check whether it expects external credentials such as an OpenAI or Cohere API key.
Frequently asked questions
Is elastic-labs a Python package I can install?
No. The repository contains executable notebooks, sample apps, and resources, not a published library. The Makefile installs development tooling and elastic-nbtest for running the notebooks, not a package you import into your own project.
Does Elastic officially support the sample apps in elastic-labs?
The README states that official support services for Elasticsearch deployments do not apply to the sample application code in this repository. Support questions are directed to the Elastic discuss forums under the #esre-elasticsearch-relevance-engine tag or the Elastic Community Slack channel.
What can I build with the elastic-labs notebooks?
The README lists vector search with embeddings, hybrid and semantic search, retrieval augmented generation, summarization, and question answering. There are also notebooks for document chunking, query rules, synonyms, learning to rank, and semantic reranking with Cohere and Hugging Face.
Which Elasticsearch integrations does elastic-labs cover?
The repository includes notebooks for OpenAI, Hugging Face, Amazon Bedrock, and Cohere, plus a set of LangChain examples covering vector stores, self-query retrievers, and using your own model.
What licence does elastic-labs use?
The repository is licensed under the Apache License, version 2.0, with LICENSE and NOTICE files at the root. Apache-2.0 is permissive and allows commercial use and modification under its stated conditions.
Community notes