What is an embedding?
An embedding is a fixed-length array of numbers (a vector) that represents the meaning of a word, sentence, document or image, so that similar content ends up close together. 'Invoice refund' and 'payment reversal' use different words, yet their vectors land near each other. Semantic search and RAG rely on that closeness.
Definition
An embedding is a fixed-length array of numbers (a vector) that represents the meaning of a word, sentence, document or image, so that similar content ends up close together.
How do embeddings work?
An embedding model is trained on large amounts of text to map expressions with similar meaning to nearby vectors. Its output is an array of hundreds or thousands of numbers. The similarity between two vectors, usually cosine similarity, indicates how close two pieces of content are in meaning. These vectors are stored and searched in a vector database.
An embedding model does not generate text; it only produces representations. It is therefore much smaller and cheaper than a large language model, and easier to run on your own servers.
When are embeddings used?
To find relevant chunks in RAG systems, cluster support requests by topic, recommend similar products, detect duplicate records and classify text. Well-known options include embedding models from OpenAI, Google, Cohere and Mistral, as well as open multilingual models on Hugging Face.
Embeddings for Turkish and other languages
Turkish is agglutinative: a single word such as “siparişlerimizin” (“of our orders”) carries a lot of information. Models trained mainly on English can underperform on such languages, so multilingual models are preferred. Splitting documents into meaningful chunks matters as much as the model. If personal data will be sent to an external embedding API, review international transfers under GDPR and KVKK, Türkiye’s data protection law.
Related terms
- Vector databaseA vector database is a database that stores numeric vectors representing content such as text, images or audio and quickly finds the records closest in meaning to a query.
- RAG (Retrieval-Augmented Generation)RAG (Retrieval-Augmented Generation) is an AI architecture that lets a language model retrieve relevant passages from a chosen document collection, such as a company's own documents, and use them as context before it writes an answer.
- LLM (Large Language Model)An LLM (large language model) is an AI model trained on very large amounts of text that answers questions, summarises, translates and writes by predicting what text should come next.
Frequently asked questions
Which embedding model should I choose?
If your content includes Turkish or other non-English languages, choose a multilingual model and compare a few candidates on question-answer pairs built from your own documents. Public leaderboards give a hint but do not guarantee results on your data.
What happens if we change the embedding model?
Vectors from different models cannot be compared with each other. When the model changes, every document has to be embedded again. That is why the model should be chosen with care from the start.
Let’s talk about your transformation
Tell us which work repeats every week. We will tell you honestly whether it is worth automating.
How we start
- A free first callWe pin down the problem and the goal together.
- A 2-week discovery sprintWe look at the data, the process and the tools, and decide where to start.
- A written proposalScope, architecture and timeline, in writing.