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.
- Elastic Search for the vector store
- Python Bot server (Chainlit)
- LangChain implementation of RAG with Elastic
- Elastic cloud ID and API key
- OpenAI API key
- python3
- git
- pip
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
python3 esload.py
chainlit run bot.py --host=0.0.0.0 --port=8000