Language models

What is an embedding?

In short

An embedding is a list of numbers that captures the meaning of a piece of text or an image, so a computer can find things that mean the same even when the words differ.

An embedding model turns text into a point in a space with hundreds of dimensions. Texts with similar meaning end up close to each other. This makes search by meaning possible, which is the base of RAG and smart internal search.

Mini course

3 short lessons, about 2 minutes in total

  1. Meaning as coordinates
  2. What they enable
  3. Practical notes

Lesson 1

Meaning as coordinates

An embedding is a list of hundreds or thousands of numbers that represents the meaning of a piece of text, an image or a product. Think of it as coordinates on a huge map of meaning: 'car' and 'vehicle' sit close together, 'car' and 'banana' far apart. A special embedding model produces them.

An embedding model turns text into a list of numbers that captures meaning, so similar meanings end up close together and can be found by search

Tap a box to open that concept

Computers can then compare meanings by measuring distance.

Lesson 2

What they enable

Embeddings power semantic search, where results match meaning rather than exact words. They let AI assistants find the right passages in company documents before answering, which is the core of RAG. They also group similar support tickets, find duplicate records and drive recommendations.

Multilingual embeddings even match a Swedish question with an English document.

Lesson 3

Practical notes

Embeddings are cheap to create compared with generating text. They are stored in a vector database or a normal database with vector support. If you change embedding model, all documents must be re-embedded. And how you split documents into chunks before embedding affects search quality a lot.

  1. Customers find youHow customers and AI tools find the companySEOGEOGoogle AI Overviews
  2. AI in daily workTools staff and customers useChatbotAI copilotVoice AI
  3. Building blocksHow AI connects to data and systemsRAG (retrieval-augmented generation)AI agentMCP (Model Context Protocol)
  4. AI modelsThe models that understand and createEmbeddingLarge language model (LLM)Generative AIMachine learning
  5. DataCompany data, gathered and cleanedData warehouseETLData quality
  6. InfrastructureCloud, networks and systems underneathCloud computingDatabaseAPI key
Trust and rulesSecurity, law and control in every layerGDPR and AIEU AI ActAI guardrails
Where Embedding sits in a company's AI setup

Test search results on real questions before blaming the language model for poor answers.

An everyday example

A search for "how do I get my money back" finds the page titled "Refund policy", even though no words match.

How companies use it

Companies use embeddings for search in their own documents, grouping customer feedback, finding duplicates and recommending related content.

Frequently asked questions

Are embeddings the same as a language model?

Embeddings are not the same as a language model. Embeddings are often made by smaller models that only turn text into numbers.

Do embeddings work across languages?

Many do: a Swedish question can find an English document with the same meaning.

Where are embeddings stored?

Embeddings are usually stored in a vector database built for searching them fast.

In depth: Embedding

The full picture, about 4 minutes of reading

What an embedding is

An embedding is a list of numbers that describes what a piece of text, or an image, means. The list is often hundreds or thousands of numbers long. On its own, a single number in it means nothing to a person. Together, they place the text at a point in a kind of map of meaning.

The key property is simple. Texts that mean similar things end up close to each other on that map, even when they use different words. How do I get my money back and refund policy land near each other. Refund policy and opening hours land far apart. That lets a computer compare meaning, not just spelling.

Why they are needed

Traditional search matches words. If you search for cancel subscription and the help page is titled how to end your membership, a keyword search may miss it, because no words overlap. People do not think in exact words, so keyword search often fails in exactly the moments it is needed most.

Embeddings fix that gap. Because they capture meaning, a search built on them finds the right page even when the wording differs. The same idea works for grouping similar customer emails, spotting duplicate support tickets, recommending related products or finding the paragraph in a long contract that deals with termination. Anywhere a computer needs to judge whether two things are about the same thing, embeddings can help.

How embeddings are made and used

Embeddings are produced by an embedding model, a type of AI model trained on huge amounts of text to place similar meanings close together. You send it a piece of text and it returns the list of numbers. Model providers such as OpenAI, Google and Cohere offer these through an API, and there are also open models you can run yourself.

To build a search, you first split your documents into chunks of a few paragraphs and create an embedding for each chunk. These are stored in a vector database, a database built to find nearby points quickly. When a question comes in, it is turned into an embedding with the same model, and the database returns the chunks whose points are closest. Closeness is usually measured with a simple calculation of the angle between two lists of numbers, called cosine similarity.

This is the search step in RAG, retrieval-augmented generation, where an AI assistant first finds relevant passages and then writes an answer from them.

Where they fall short

Embeddings are good at meaning but weak at exact details. A product code, an order number or a person's name may not be captured precisely, so a search for article 4471 can return article 4417. Good systems therefore combine embeddings with ordinary keyword search, an approach often called hybrid search.

They also reflect what the model learned. A general embedding model may not understand that two terms in your industry mean the same thing, or that a word means something special in your company. Testing on real questions shows whether this is a problem.

Finally, embeddings from different models cannot be mixed. If you switch embedding model, every document must be processed again, because the new model draws its map of meaning differently.

Practical choices

Chunk size matters more than most people expect. Chunks that are too large blur several topics together, and chunks that are too small lose the context that makes them meaningful. A few paragraphs, split at natural headings, is a common starting point.

Language matters too. If your documents are in Swedish and questions come in both Swedish and English, choose a model that handles several languages well. Many current models do.

Keep the source information with each chunk: document title, date, link and who may see it. That lets the search filter out old versions, show where an answer came from and respect access rights. Then build a small test set of real questions with the right passages, and measure how often the search finds them before and after each change.

What it means for a small business

For a small business, embeddings are rarely something you work with directly. They are the engine inside tools that search by meaning: a help center that finds the right article, an internal assistant that answers from the staff handbook, a chatbot that answers from the website.

What you control is the material. Clear, up-to-date documents with good headings give embeddings something useful to work with. Duplicate files, old versions and scanned pages without real text make even the best model fail.

When evaluating a tool that promises smart search, ask simple questions. Does it combine meaning-based search with keyword search? Can it show which document an answer came from? Does it respect who is allowed to see what? Those answers say more about quality than any claim about the model behind it.

Curious what this could mean for your company? Book a call.

Book a call