elasticsearch-labs  by elastic

Elasticsearch examples for search and AI applications

created 2 years ago
911 stars

Top 40.7% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides executable Python notebooks and sample applications for leveraging Elasticsearch in modern search and AI/ML-powered applications. It targets developers and researchers looking to implement advanced search functionalities like vector databases, hybrid search, retrieval-augmented generation (RAG), and semantic search, integrating with popular AI frameworks.

How It Works

The project demonstrates Elasticsearch's capabilities as a vector database for storing embeddings and powering semantic search. It highlights advanced features such as the Elastic Learned Sparse Encoder (ELSER) and reciprocal rank fusion (RRF) for out-of-the-box, high-performance search without custom training. The examples showcase integration with LLM ecosystems like OpenAI, Hugging Face, and LangChain, positioning Elasticsearch as a robust backend for AI-driven applications.

Quick Start & Requirements

  • Install/Run: Primarily through Python notebooks (e.g., Google Colab).
  • Prerequisites: Python, Elasticsearch instance (local or cloud), potentially API keys for services like OpenAI or Hugging Face.
  • Resources: Notebooks are designed for interactive use, with resource requirements dependent on the specific notebook's data and model usage.
  • Links: Elasticsearch Labs, Contributing Guidelines

Highlighted Details

  • Demonstrates Retrieval Augmented Generation (RAG) and question-answering (QA) use cases.
  • Features hybrid search, semantic reranking, and keyword querying with filtering.
  • Includes examples for document chunking and calculating tokens for semantic search.
  • Showcases integrations with OpenAI, Anthropic Claude 3, Hugging Face, and LangChain.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the Apache License, version 2.0 (ALv2).
  • Permissive license suitable for commercial use and integration with closed-source applications.

Limitations & Caveats

The repository contains sample application code, and official Elastic support services do not extend to this code. Some notebooks may require specific versions of dependencies or access to external AI services.

Health Check
Last commit

2 days ago

Responsiveness

1 day

Pull Requests (30d)
11
Issues (30d)
0
Star History
78 stars in the last 90 days

Explore Similar Projects

Starred by Jason Liu Jason Liu(Author of Instructor) and Ross Taylor Ross Taylor(Cofounder of General Reasoning; Creator of Papers with Code).

Search-R1 by PeterGriffinJin

1.3%
3k
RL framework for training LLMs to use search engines
created 5 months ago
updated 3 weeks ago
Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Hiroshi Shibata Hiroshi Shibata(Core Contributor to Ruby), and
2 more.

searchkick by ankane

0.0%
7k
Ruby gem for integrating intelligent search
created 12 years ago
updated 1 month ago
Feedback? Help us improve.