sujee / mongodb-atlas-vector-search

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:Apache License 2.0


Languages

Language:Jupyter Notebook 98.8%Language:Python 1.1%Language:Dockerfile 0.1%