pgvector or Pinecone" : this is not entirely about which one. This is about when and why. If you are contemplating on implementing, you must before it is too later. I've shipped semantic search and recommendations on both, and the honest answer to "which should I use?" is the least satisfying one: it depends on your scale, your team, and how much database you want to run yourself. What follows is how each actually works, how to use them from Python, when to reach for which, and three problems people hit in production once the demo is over.

First, the thing both of them do

An embedding is a list of numbers that captures the meaning of a piece of text (or an image, or audio). Two descriptions that mean similar things end up close together in that number-space; unrelated ones end up far apart. You generate embeddings with a model — OpenAI's text-embedding-3-small (1536 dimensions), Amazon's Titan Text Embeddings V2 (1024), or others — and you store them.

A vector database exists to answer one question quickly: given this query vector, which stored vectors are nearest? That's it. "Find me films like this one," "find the support article that answers this question," "recommend the next thing to watch" — all the same nearest-neighbour lookup underneath.