This is the course repository for Vector Search Applications with LLMs taught by Chris Sanchez with assistance from Matias Weber. The course is desgined to teach search and discovery industry best practices culminating in a demo Retrieval Augmented Generation (RAG) application. Along the way students will learn all of the components of a RAG system to include data preprocessing, embedding creation, vector database selection, indexing, retrieval systems, reranking, retrieval evaluation, question answering through an LLM and UI implementation through Streamlit.
Students are expected to have the following technical skills prior to enrolling. Students who do not meet these prerequisites will likely have an overly challenging learning experience:
- Minimum of 1-year experience coding in Python. Skillsets should include programming using OOP, dictionary and list comprehensions, lambda functions, setting up virtual environments, comfortability with git version control.
- Professional or academic experience working with search engines.
- Ability to comfortably navigate the command line to include familiarity with docker.
- Nice to have but not strictly required:
- experience fine-tuning a ML model
- familiarity with the Streamlit API
- familiarity with making inference calls to a Generative LLM (OpenAI or Llama-2)
- Students will need access to their own compute environment, whether locally or remote. There are no hard requirements for RAM or CPU processing power, but in general the more punch the better.
- Students will need accounts with the following organizations:
- Either an OpenAI account (RECOMMENDED) or a HuggingFace account. Students have the option of either using a paid LLM service (OpenAI) or using the open source
meta-llama/Llama-2-7b-chat-hf
model. Students choosing the latter option will first need to register with Meta to request access to the Llama-2 model. - An account with weaviate.io. The current iteration of this course will use Weaviate as a sparse and dense vector database. Weaviate offers free cloud instance cluster resources for 21 days (as of November 2023). Students are advised to NOT CREATE a Weaviate cloud cluster until the course officially starts.
- A standard Github account in order to fork this repo, clone a copy, and submit commits to the fork as needed throughout the course.
- Either an OpenAI account (RECOMMENDED) or a HuggingFace account. Students have the option of either using a paid LLM service (OpenAI) or using the open source
- Fork this course repo (see upper right hand corner of the repo web page).
- Clone a copy of the forked repo into the dev environment of your choice. Navigate into the cloned
vectorsearch-applications
directory. - Create a python virtual environment using your library of choice. Here's an example using
conda
:
conda create --name impactenv -y python=3.10
- Once the environment is created, activate the environment and install dependencies.
conda activate impactenv
pip install -r requirements.txt
- Last but not least create a
.env
text file in your cloned repo. At a minimum, add the following environment variables:
OPENAI_API_KEY= "your OpenAI account API Key"
HF_TOKEN= "your HuggingFace account token" <--- Optional: not required if using OpenAI
WEAVIATE_API_KEY= "your Weaviate cluster API Key" <--- you will get this on Day One of the course
WEAVIATE_ENDPOINT= "your Weaviate cluster endpoint" <--- you will get this on Day One of the course
- If you've made it this far, you are ready to start the course. Enjoy the process!