Skip to content

A simple demonstration of building a Retrieval Augmented Generation (RAG) system using SQLite and Ollama for local, on-device vector search.

License

Notifications You must be signed in to change notification settings

inferablehq/sqlite-ollama-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLite RAG with Ollama

A simple demonstration of building a Retrieval Augmented Generation (RAG) system using SQLite and Ollama for local, on-device vector search. This project implements a movie recommendation system to showcase RAG capabilities without requiring complex infrastructure.

Overview

This project demonstrates how to:

  • Store and query vector embeddings in SQLite
  • Generate embeddings using Ollama's local models
  • Perform semantic similarity search for movie recommendations

For a detailed walkthrough of this project, check out the companion blog post: Doing on-device retrieval augmented generation with Ollama and SQLite

Prerequisites

  • SQLite3
  • sqlite-utils
  • sqlite-vec extension
  • Ollama
  • curl
  • jq

Usage

To embed the data and build the database, run the embed.sh script.

sh embed.sh

To perform a search, run the search.sh script with a query.

sh search.sh "a movie about time travel"

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A simple demonstration of building a Retrieval Augmented Generation (RAG) system using SQLite and Ollama for local, on-device vector search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages