How it works
Embedding models (like OpenAI text-embedding-3, Cohere embed, or open-source models) convert text into vectors of 256-3072 dimensions. For example, "How do I cancel?" and "I want to end my subscription" would produce vectors that are close together in the embedding space because they have similar meaning.
Embeddings enable semantic search: instead of matching keywords, you compare the mathematical similarity (cosine similarity) between the query embedding and document embeddings. The closest vectors represent the most semantically relevant content.
Why it matters
Embeddings are the foundation of modern AI search and RAG systems. They enable chatbots to find relevant knowledge base content even when the customer uses completely different words than the documentation. Without embeddings, AI chatbots would be limited to keyword matching, missing most relevant content.
How Chatsy uses it
Chatsy generates embeddings for all knowledge base content, documentation, and training data. When a customer asks a question, the query is embedded and compared against all content embeddings using pgvector to find the most semantically relevant passages. These passages are then provided to the language model for answer generation.
Chatsy
What else should I know about Embedding?
Embedding models produce vectors of 256-3072 dimensions depending on the model
Key takeawaysTest this in your own agent
Add your help content, ask the questions on this page, and check every answer before you publish.
Start freeChatsy
Example scenarios
- 01
Knowledge base article indexing
When you publish a help article about "Managing team permissions," Chatsy generates embeddings for each section. Later, a customer asking "how do I give my colleague admin access" matches those embeddings despite zero keyword overlap, because the semantic meaning is the same.
- 02
Cross-language semantic matching
A multilingual embedding model encodes both "politique de remboursement" (French) and "refund policy" (English) to nearby vectors. This enables a single knowledge base to serve customers in multiple languages without duplicating content.
- 03
Chunking strategy for long documents
A 5,000-word product guide is split into 20 overlapping chunks of 300 words each, and each chunk is embedded separately. When a customer asks about a specific feature, only the relevant 1-2 chunks are retrieved, not the entire document.
Key takeaways
- Embeddings convert text into numerical vectors where semantically similar content clusters together
- Embedding models produce vectors of 256-3072 dimensions depending on the model
- Cosine similarity between embedding vectors measures how semantically related two texts are
- Embedding quality directly determines RAG retrieval accuracy, better models produce better search results
- Embeddings are generated once at indexing time and stored in vector databases for fast retrieval