How to add semantic search to an existing app using an embedding model and pgvector TL;DR Adding the most basic form of "AI search" to an existing app is three changes: Add a vector column to the table you want to search. When a row is created, send its text to an embedding model and store the numbers it returns in that column. On search, embed the search term the same way and ask the database which rows are closest. Introduction I have a su...