Embeddings and Vector Databases for Fast RAG (100% Local) | Ollama, Supabase (PostgreSQL + pgvector)
Complete tutorial and source code (requires MLExpert Pro): https://www.mlexpert.io/academy/v2/context-engineering/embeddings-and-vector-databases
Simple keyword is not enough for your RAG. If a user asks for "money" but your documents say "revenue," traditional search fails. In this tutorial, we'll build the storage layer of a production-grade RAG system using Vector Embeddings.
We will move beyond simple TF-IDF and implement Semantic Search using local open-source models (Qwen3 Embedding), PostgreSQL, and pgvector via Supabase.
Qwen3 Embedding: https://qwenlm.github.io/blog/qwen3-embedding/
Supabase: https://github.com/supabase/supabase
HNSW index: https://github.com/pgvector/pgvector?tab=readme-ov-file#hnsw
AI Academy: https://www.mlexpert.io/
LinkedIn: https://www.linkedin.com/in/venelin-valkov/
Follow me on X: https://twitter.com/venelin_valkov
Discord: https://discord.gg/UaNPxVD6tv
Subscribe: http://bit.ly/venelin-subscribe
GitHub repository: https://github.com/curiousily/AI-Bootcamp
👍 Don't Forget to Like, Comment, and Subscribe for More Tutorials!
00:00 - How to store your chunks?
01:06 - What are Vector Embeddings?
03:16 - Local Postgres & pgvector setup
06:31 - Initializing Supabase & Docker
07:17 - Generating Embeddings with Ollama and Qwen3 Embedding
09:00 - Storing Data: Inserting Vectors into SQL
09:45 - Full-Text Search Limitations
10:27 - Vector Semantic Search Success
11:30 - Why you need persistence and what's next
Join this channel to get access to the perks and support my work:
https://www.youtube.com/channel/UCoW_WzQNJVAjxo4osNAxd_g/join
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: Vector Stores
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
The Future of RAG: Dead, Evolving… or Becoming the Brain of AI?
Medium · Machine Learning
Smart Routing, Transfer Family Ingestion, and Voice Chat — Permission-Aware RAG v4.2
Dev.to · Yoshiki Fujiwara(藤原 善基)@AWS Community Builder
Most Companies Doing GenAI Are Really Just Doing RAG: RAGOps Explained for analysts
Medium · RAG
RAG - Sliding Window, Token Based Chunking and PDF Chunking Packages
Dev.to AI
Chapters (9)
How to store your chunks?
1:06
What are Vector Embeddings?
3:16
Local Postgres & pgvector setup
6:31
Initializing Supabase & Docker
7:17
Generating Embeddings with Ollama and Qwen3 Embedding
9:00
Storing Data: Inserting Vectors into SQL
9:45
Full-Text Search Limitations
10:27
Vector Semantic Search Success
11:30
Why you need persistence and what's next
🎓
Tutor Explanation
DeepCamp AI