Awesome
VectorDB-recipes
<br /> Dive into building GenAI applications! This repository contains examples, applications, starter code, & tutorials to help you kickstart your GenAI projects.- These are built using LanceDB, a free, open-source, serverless vectorDB that requires no setup.
- It integrates into Python data ecosystem so you can simply start using these in your existing data pipelines in pandas, arrow, pydantic etc.
- LanceDB has native Typescript SDK using which you can run vector search in serverless functions!
This repository is divided into 2 sections:
- Examples - Get right into the code with minimal introduction, aimed at getting you from an idea to PoC within minutes!
- Applications - Ready to use Python and web apps using applied LLMs, VectorDB and GenAI tools
The following examples are organized into different tables to make similar types of examples easily accessible.
Sections
- Build from Scratch - Build applications/examples from scratch using LanceDB for efficient vector-based document retrieval.
- Multimodal - Build a multimodal search application with input text or image as queries.
- RAG - Build a variety of RAG by loading data from different formats and query with text.
- Vector Search - Build vector search application using different search algorithms.
- Chatbot - Build chatbot application where user input queries to retrieve relevant context and generate coherent, context-aware replies.
- Evalution - Evaluate reference and candidate texts to measure their performance on various metrics.
- AI Agents - Design an application powered with AI agents to exchange information, coordinate tasks, and achieve shared goals effectively.
- Recommender Systems - Build Recommendation systems which generate personalized recommendations and enhance user experience.
- Concepts - Concepts related to LLM applications pipeline to ensures accurate information retrieval.
🌟 New 🌟
- Advanced RAG: Context Enrichment Window - <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advanced_RAG_Context_Enrichment_Window/Advanced_RAG_Context_Enrichment_Window.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
Build from Scratch
Build applications/examples using LanceDB for efficient vector-based document retrieval.
Build from Scratch | Interactive Notebook & Scripts |
---|---|
Build RAG from Scratch | |
Local RAG from Scratch with Llama3 | |
Multi-Head RAG from Scratch | |
MultiModal
Create a multimodal search application using LanceDB for efficient vector-based retrieval of text and image data. Input text or image queries to find the most relevant documents and images from your corpus.
Multimodal | Interactive Notebook & Scripts | Blog |
---|---|---|
Multimodal CLIP: DiffusionDB | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/multimodal_clip_diffusiondb/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Multimodal CLIP: Youtube videos | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/multimodal_video_search/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Cambrian-1: Vision centric exploration of images | ||
Multimodal Jina CLIP-V2 : Food Search | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/multimodal_jina_clipv2/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
RAG
Develop a Retrieval-Augmented Generation (RAG) application using LanceDB for efficient vector-based information retrieval. Input text queries to retrieve relevant documents and generate comprehensive answers by combining retrieved information.
RAG | Interactive Notebook & Scripts | Blog |
---|---|---|
RAG On PDF | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG-On-PDF/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
RAG with Contextual Retrieval and Hybrid search | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Contextual-RAG/Anthropic_Contextual_RAG.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
RAG with Matryoshka Embeddings and LlamaIndex | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/tutorials/RAG-with_MatryoshkaEmbed-Llamaindex/RAG_with_MatryoshkaEmbedding_and_Llamaindex.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
RAG with IBM Watsonx | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG-with-watsonx/Watsonx_example.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Improve RAG with Re-ranking | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG_Reranking/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Instruct-Multitask | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/instruct-multitask/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Improve RAG with HyDE | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advance-RAG-with-HyDE/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Improve RAG with LOTR | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advance_RAG_LOTR/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Advanced RAG: Context Enrichment Window | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advanced_RAG_Context_Enrichment_Window/Advanced_RAG_Context_Enrichment_Window.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Advanced RAG: Late Chunking | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advanced_RAG_Late_Chunking/Late_Chunking_(Chunked_Pooling).ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Advanced RAG: Parent Document Retriever | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/parent_document_retriever/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Corrective RAG with Langgraph | ||
Contextual-Compression-with-RAG | ||
Improve RAG with FLARE | ||
Agentic RAG | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/tutorials/Agentic_RAG/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
GraphRAG | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Graphrag/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
GraphRAG with CSV File | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/tutorials/GraphRAG_CSV/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Vector Search
Build a vector search application using LanceDB for efficient vector-based document retrieval. Input text queries to find the most relevant documents from your corpus.
Vector Search | Interactive Notebook & Scripts | Blog |
---|---|---|
Inbuilt Hybrid Search | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Inbuilt-Hybrid-Search/Inbuilt_Hybrid_Search_with_LanceDB.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Hybrid search BM25 & lancedb | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Hybrid_search_bm25_lancedb/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
NER powered Semantic Search | ||
Vector Arithmetic with LanceDB | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Vector-Arithmetic-with-LanceDB/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Summarize and Search Reddit Posts | <a href="https://github.com/lancedb/vectordb-recipes/blob/main/examples/Reddit-summarization-and-search/subreddit_summarization_querying.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Imagebind demo app | <a href="https://huggingface.co/spaces/raghavd99/imagebind2"><img src="https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo-with-title.svg" alt="hf spaces" style="width: 80px; vertical-align: middle; background-color: white;"></a> | |
Search Within Images | ||
Zero Shot Object Detection with CLIP | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/zero-shot-object-detection-CLIP/zero_shot_object_detection_clip.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Vector Search with TransformersJS | ||
Accelerate Vector Search Applications Using OpenVINO | ||
Chatbot
Create a chatbot application using LanceDB for efficient vector-based response generation. Input user queries to retrieve relevant context and generate coherent, context-aware replies.
Chatbot | Interactive Notebook & Scripts | Blog |
---|---|---|
Databricks DBRX Website Bot | ||
CLI-based SDK Manual Chatbot with Phidata | ||
Youtube transcript search bot | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Youtube-Search-QA-Bot/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Langchain: Code Docs QA bot | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Code-Documentation-QA-Bot/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Chatbot with any website using Crawl4AI | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/CrawlerQ&A_website/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Context-Aware Chatbot using Llama 2 & LanceDB | ||
Evaluation
Develop an evaluation application. Input reference and candidate texts to measure their performance on various metrics.
Evaluation | Interactive Notebook & Scripts | Blog |
---|---|---|
Evaluating RAG with RAGAs | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Evaluating_RAG_with_RAGAs/Evaluating_RAG_with_RAGAs.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
AI Agents
Design an AI agents coordination application with LanceDB for efficient vector-based communication and collaboration. Input queries to enable AI agents to exchange information, coordinate tasks, and achieve shared goals effectively.
AI Agents | Interactive Notebook & Scripts | Blog |
---|---|---|
AI email assistant with Composio | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/AI-Email-Assistant-with-Composio/composio-lance.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Assitant Bot with OpenAI Swarm | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/assistance-bot-with-swarm/assitant_bot_with_swarm.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
AI Trends Searcher with CrewAI | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/AI-Trends-with-CrewAI/CrewAI_AI_Trends.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
SuperAgent Autogen | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/SuperAgent_Autogen/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
AI Agents: Reducing Hallucination | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/reducing_hallucinations_ai_agents/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Multi Document Agentic RAG | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/multi-document-agentic-rag/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Recommender Systems
Create a recommender system application with LanceDB for efficient vector-based item recommendation. Input user preferences or item features to generate personalized recommendations and enhance user experience.
Recommender Systems | Interactive Notebook & Scripts | Blog |
---|---|---|
Movie Recommender | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/movie-recommender/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Product Recommender | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/product-recommender/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Arxiv paper recommender | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/arxiv-recommender/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Music Recommender | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/applications/Music_Recommandation/lancedb_music_recommandation.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Concepts
Checkout concepts of LLM applications pipeline to ensures accurate information retrieval.
Projects & Applications
These are ready to use applications built using LanceDB serverless vector database. You can explore these open source projects, use parts of them in your projects or build your applications on top of these.
Node applications powered by LanceDB
Project Name | Description | Screenshot |
---|---|---|
Writing assistant | Writing assistant app using lanchain.js with LanceDB, allows you to get real time relevant suggestions and facts based on you written text to help you with your writing. | |
Sentence auto complete | Sentance auto complete app using lanchain.js with LanceDB, allows you to get real time relevant auto complete suggestions and facts based on you written text to help you with your writing.You can also upload your data source in the form of a pdf file.You can switch between gpt models to get faster results. | |
Article Recommendation | Article Recommender: Explore vast data set of articles with Instant, Context-Aware Suggestions. Leveraging Advanced NLP, Vector Search, and Customizable Datasets, Our App Delivers Real-Time, Precise Article Recommendations. Perfect for Research, Content Curation, and Staying Informed. Unlock Smarter Insights with State-of-the-Art Technology in Content Retrieval and Discovery!". | |
Project Name | Description | Screenshot |
---|---|---|
YOLOExplorer | Iterate on your YOLO / CV datasets using SQL, Vector semantic search, and more within seconds | |
Website Chatbot (Deployable Vercel Template) | Create a chatbot from the sitemap of any website/docs of your choice. Built using vectorDB serverless native javascript package. | |
Chat with multiple URL/website | Conversational AI for Any Website with Mistral,Bge Embedding & LanceDB | |
Talk with Podcast | Talk with Youtube Podcast using Ollama and insanely-fast-whisper | |
Hr chatbot | Hr chatbot - ask your personal query using zero-shot React agent & tools | |
Advanced Chatbot with Parler TTS | This Chatbot app uses Lancedb Hybrid search, FTS & reranker method with Parlers TTS library. | |
Multi-Modal Search Engine | Create a Multi-modal search engine app, to search images using both images or text | |
Multimodal Myntra Fashion Search Engine | This app uses OpenAI's CLIP to make a search engine that can understand and deal with both written words and pictures. | |
Multilingual-RAG | Multilingual RAG with cohere embedding & support 100+ languages | |
GTE MLX RAG | mlx based RAG model using lancedb api support | |
Healthcare Chatbot | Healthcare chatbot using domain specific LLM & Embedding model | |
🌟 New! 🌟 Applied GenAI and VectorDB course on Udacity Learn about GenAI and vectorDBs using LanceDB in the recently launched Udacity Course
<img src="./assets/udacity-course.png" width="80%" height="80%" />Contributing Examples
If you're working on some cool applications that you'd like to add to this repo, please open a PR!