Skip to content

Using MongDB Atlas with embedding models and LLMs to do vector search and RAG applications

License

Notifications You must be signed in to change notification settings

sujee/mongodb-atlas-vector-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

Useful Resources

About

Using MongDB Atlas with embedding models and LLMs to do vector search and RAG applications

Topics

Resources

License

Stars

Watchers

Forks