mongodb-atlas-vector-search
mongodb-atlas-vector-search copied to clipboard
Vector Search and RAG Using MongoDB Atlas + Embedding Models + LLMs
About
This repo has sample code showcasing building Vector Search / RAG (Retrieval-Augmented Generation) applications using built-in Vector Search capablities of MongoDB Atlas, embedding models and LLMs (Large Language Models).
What is Vector Search?
vector search explained
Hackathon specific notes
- 2024-03-23 - Mistral AI hackathon
Labs
Setup: Setup Python Environment
Follow setup-python-env.md
Lab-1: Connect to MongoDB Atlas
Setup Atlas in the cloud and make sure we can connect to it.
Lab-1
Lab-2 - Vector Search Using OpenAI Embeddings
Perform vector search on an already indexed collection. This collection is pre-populated with embeddings using an OpenAI embedding model.
lab-2
Lab-3: Vector Search Using Custom Embeddings
We will populate collections data with custom embeddings, using open source embedding models and query them.
lab-3
Sample streamlit app
streamlit app
screencast | screenshot 1 | screenshot 2
Lab-4: RAG (Retrieval Augmentation Generation)
Index PDF files and store the index in Atlas with embeddings, and ask questions about the documents using LLMs
lab-4
Dockerizing and Deploying the App
dockerize.md
Some Fun Benchmarks
Vector search results using different embedding models
Local embedding models benchmark
LLMs performance on RAG