Skip to content

Learn what is RAG and how it can increase trustability of LLM apps

License

Notifications You must be signed in to change notification settings

pyladiesams/intro-RAG-elastic-apr2024

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An introduction to RAG with Elastic

Presentation: Introduction to RAG

Workshop description

During the workshop you will learn what is Retrieval Augmented Generation, how it can increase trustability of LLM models and how to set up a RAG pipeline using Elastic.

Requirements 🧰

For this workshop, you will need:

Usage

  • Clone the repository
  • Start your favorite IDE and navigate to the solutions folder
  • Run pip install -r requirements.txt
  • Launch Jupyter App jupyter notebook

Notebooks

Question answering

In the question-answering.ipynb notebook you'll learn how to:

  • Retrieve sample workplace documents from a given URL.
  • Set up an Elasticsearch client.
  • Chunk documents into 800-character passages with an overlap of 400 characters using the CharacterTextSplitter from langchain.
  • Use OpenAIEmbeddings from langchain to create embeddings for the content.
  • Retrieve embeddings for the chunked passages using OpenAI.
  • Persist the passage documents along with their embeddings into Elasticsearch.
  • Set up a question-answering system using OpenAI and ElasticKnnSearch from langchain to retrieve answers along with their source documents.

Chatbot

In the chatbot.ipynb notebook you'll learn how to:

  • Retrieve sample workplace documents from a given URL.
  • Set up an Elasticsearch client.
  • Chunk documents into 800-character passages with an overlap of 400 characters using the CharacterTextSplitter from langchain.
  • Use OpenAIEmbeddings from langchain to create embeddings for the content.
  • Retrieve embeddings for the chunked passages using OpenAI.
  • Run hybrid search in Elasticsearch to find documents that answers asked questions.
  • Maintain conversational memory for follow-up questions.

Video record

Re-watch this YouTube stream

Credits

This workshop was set up by @pyladiesams and @ahavrius

About

Learn what is RAG and how it can increase trustability of LLM apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%