Semantic search with Django, PostgreSQL, & pgvector
summary
Shows a working semantic search added to an existing Django app by storing embeddings in Postgres via pgvector, creating a Vector extension migration and a fixed-dimension embedding column, and using sentence-transformers to encode text on save. Queries use pgvector’s cosine distance operator to filter and order results, demonstrated in the Django admin returning surprisingly relevant matches (e.g., “guitar” matching “rock” and “music”). Notes heavy deps for sentence-transformers and simple integration by override model.save and Django + PostgreSQL + pgvector.
AI-written summary · about
chapters (7)
- 0:00Intro
- 1:17Django
- 2:19Flask, FastAPI, etc
- 4:06Django - Code
- 9:47Django - Administration
- 14:26Semantic Search and Vector Databases
- 16:37pgvector
related talks
29mA Pythonic semantic search
48mFrom Text to Meaning: pgvector Transforms PostgreSQL Search
36mUnleashing the Power of Vector Databases for AI-Driven Applications
52mpgvector Newbie to Expert
05mCheeses, vectors and PostgreSQL
43mFull-Text-Search Explained from A to Z with French Food
27mMachine Learning for Advanced AI Search
27mUnified AI & Relational Power: Scalable Distributed Vector Search with
