elasticsearch-labs  by elastic

Elasticsearch examples for search and AI applications

Created 2 years ago
958 stars

Top 38.4% 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)
6
Issues (30d)
1
Star History
32 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Taranjeet Singh Taranjeet Singh(Cofounder of Mem0), and
8 more.

Perplexica by ItzCrazyKns

5.7%
25k
AI-powered search engine alternative
Created 1 year ago
Updated 1 day ago
Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

LightRAG by HKUDS

1.2%
21k
RAG framework for fast, simple retrieval-augmented generation
Created 11 months ago
Updated 2 days ago
Feedback? Help us improve.