Skip to content

joeywhelan/es-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastic RAG Demo

Contents

  1. Summary
  2. Architecture
  3. Features
  4. Prerequisites
  5. Installation
  6. Usage

Summary

This is a demo of usage of Elastic as a vector store for Retrieval Augmented Generation (RAG) for this scenario:

  • Pure LangChain Expression Language (LCEL) chain with no safeguards on user or LLM interactions
  • Content from the Elastic online documentation of Elastic Vector Search is used for the RAG content.

Architecture

architecture

Features

  • Elastic Search for the vector store
  • Python Bot server (Chainlit)
  • LangChain implementation of RAG with Elastic

Prerequisites

  • Elastic cloud ID and API key
  • OpenAI API key
  • python3
  • git
  • pip

Installation

git clone https://github.com/joeywhelan/es-rag.git && cd es-rag
pip install -qU python-dotenv langchain_elasticsearch bs4 langchain langchain_openai langchainhub chainlit
  • Edit the .env_template file with your OpenAI key, Elastic Cloud ID, and Elastic Cloud API Key and rename the file to .env

Usage

Start Up

python3 esload.py
chainlit run bot.py --host=0.0.0.0 --port=8000

Releases

No releases published

Packages

No packages published

Languages