Vector Search
Vector search is a method of finding information based on semantic meaning rather than exact keyword matches. It works by converting text into numerical representations (vectors/embeddings) and finding the most similar vectors in a database. Also called semantic search or similarity search.
How it works
Traditional keyword search requires exact word matches — searching for "pricing" will not find a document about "cost" or "fees." Vector search understands that these words are semantically related. It converts both the query and all documents into high-dimensional vectors using embedding models, then finds the documents whose vectors are closest to the query vector.
Vector databases like pgvector, Pinecone, and Weaviate store these embeddings and perform fast similarity searches. The quality of vector search depends on the embedding model used — better models create more accurate semantic representations.
Why it matters
How Chatsy uses vector search
Real-world examples
Key takeaways
Frequently asked questions
How is vector search different from keyword search?
Keyword search matches exact words. Vector search matches meaning. Searching for "cancel my account" with keyword search only finds documents containing those exact words. Vector search also finds documents about "close account," "delete profile," or "end subscription" because they have similar meaning.
What is a vector database?
A vector database is specialized storage for embedding vectors that supports fast similarity search. Examples include pgvector (PostgreSQL extension), Pinecone, Weaviate, and Qdrant. Chatsy uses pgvector to keep everything in PostgreSQL.
How fast is vector search compared to keyword search?
Vector search with optimized indexes (HNSW or IVFFlat) returns results in 5-50 milliseconds for databases with millions of vectors. This is comparable to keyword search and fast enough for real-time chatbot responses.
Does vector search work with short queries like one or two words?
Short queries produce less precise vectors because there is less semantic context to encode. For single-word queries like "pricing," keyword search often outperforms vector search — which is why hybrid search combining both methods is recommended.