Embeddings
Last updated:
What embeddings are
An embedding model turns a word, sentence or paragraph into a vector: a fixed-length list of numbers, often several hundred to a few thousand values long. Each number on its own means little. What matters is position: texts about similar things get vectors that point in similar directions.
This makes meaning measurable. “How do I return a jacket?” and “What is your refund policy for clothing?” share almost no words, but their embeddings are close, so a system can treat them as related.
How embeddings work
Embedding models are neural networks trained on large amounts of text to place related content near each other. Using them in a chatbot takes three steps:
Vectors from different embedding models are not compatible. If the model changes, all content has to be embedded again.
- Each chunk of your content is sent to the embedding model once, and the resulting vector is stored.
- When a question arrives, it is embedded with the same model.
- The system compares the question vector with the stored vectors, usually by cosine similarity, and returns the closest chunks.
Example
A hotel stores its FAQ as chunks with embeddings. A guest asks: “Can I bring my dog?” The nearest chunk is the one about the pet policy, which says pets are welcome for a nightly fee. A keyword search for “dog” could miss that passage if the page only says “pets”, but the embeddings recognize that the two are related.
Why embeddings matter for business chatbots
Visitors rarely use the same words as your website. Embeddings let a chatbot find the right passage despite synonyms, typos and paraphrases. Multilingual embedding models can even match a question in one language with content written in another.
Their weak spot is exact terms. Product codes, model numbers and rare names can be matched poorly, because a vector captures general meaning rather than precise strings. That is why many systems combine embeddings with keyword search.
How intoCHAT uses embeddings
When you train an intoCHAT agent, each chunk of your website pages, files, text snippets and Q&A pairs gets an embedding, and intoCHAT stores and indexes them for you. During a chat, the visitor’s question is embedded and compared with your content, and the results are merged with a keyword search into one hybrid ranking. When you edit a source, retraining it refreshes its embeddings.