AI explained

Vector embedding explained: how text becomes searchable

An embedding turns a sentence into a list of numbers so search can match meaning, not just words. Learn how it works, what it misses and how to check it on your own content.

By the Askocto team · · 5 min read

A vector embedding is a list of numbers that represents the meaning of a piece of text. Two passages that mean similar things get lists that sit close together, and two unrelated passages get lists that sit far apart. Search systems use this to find the part of your content that best matches a question, even when the customer uses different words than your help center does.

In short: Embeddings let search match meaning instead of exact words. They are strong on paraphrases and weak on exact codes, names and negations, so test them on your own questions and pair them with keyword matching where needed.

The idea in plain terms

Imagine placing every sentence on a map. Sentences about refunds land in one area, sentences about delivery in another, sentences about password resets in a third. Two sentences about the same thing sit near each other, whatever words they use. A vector embedding is the coordinates of a sentence on that map.

A real embedding has hundreds or thousands of coordinates, not two, so no one can draw it. The principle is the same as the toy map below.

"How do I get my money back?"        -> (0.82, 0.10)
"Refund policy for returned items"   -> (0.79, 0.14)
"Where is my parcel?"                -> (0.12, 0.88)

These two-number coordinates are made up to show the idea. The first two sentences share no key words, yet they sit close together. The third sits far away. A search system finds the closest points to the question and returns those passages.

How an embedding step works in a support system

The usual sequence has four parts:

  1. Split. Your content is cut into passages, often called chunks, such as a section of a help article.
  2. Embed. Each chunk is turned into a vector by an embedding model and stored in an index.
  3. Embed the question. When a customer asks something, the question is turned into a vector by the same model.
  4. Match. The system returns the chunks whose vectors are nearest to the question's vector.

The chunks then go to a language model that writes the answer. The full flow is described in how to build a RAG chatbot, and RAG from scratch goes into the construction in more depth.

One rule matters a lot: the question and the content must be embedded with the same model. Switch models and every stored vector has to be recomputed, or the matches become meaningless.

Where embeddings are strong

Embeddings handle the way customers actually write:

  • Paraphrase. "My card was charged twice" matches a passage titled "Duplicate payments".
  • Vague wording. "The thing I bought is broken" can still reach the warranty section.
  • Other languages. Many embedding models place the same idea in different languages near each other. Check the provider's current documentation for the languages a model covers, and test yours.
  • Typos and informal phrasing. Small spelling slips rarely break the match.

This is why a support agent can answer from a help center without a hand-written list of keywords for every article.

Where embeddings fall short

Weak spot Example Why it happens What helps
Exact identifiers Order code, SKU, error code The code carries little meaning to match Keyword search alongside embeddings
Negation "Can I cancel?" and "I cannot cancel" Opposite meanings can land close together Reading passages in context, reranking
Numbers and dates "30 days" versus "14 days" Small numeric differences barely move the vector Clear headings and one fact per chunk
Near duplicates Policies for two regions Both sit close to the question Separate sources, labels, a second ranking pass
Very long chunks A 3,000 word page The vector blurs many topics together Smaller chunks with a clear subject

Many systems combine embeddings with keyword search, called hybrid search, so exact terms and meaning both count. A second pass over the results can also help, as covered in reranking.

What you control without touching the math

Even when a platform handles embeddings for you, the quality of the match depends on what you feed it.

  • Write one idea per section. A heading and a short paragraph that answers one question makes a clean chunk.
  • Put the answer near the top of the section. Do not bury a policy under a story.
  • State key facts in words and numbers. "Returns are accepted within 30 days of delivery" beats "see our policy".
  • Remove stale duplicates. Two conflicting pages produce two close matches and a confused answer.
  • Parse files carefully. Tables and scanned pages can turn into noise before any embedding happens, which document parsing explains.

In Askocto the embedding step happens when a source is trained. You add a website, files, text or Q&A pairs under Build > Sources, wait for the status to reach Ready, and use Auto-retrain on a schedule so new content gets embedded. Retraining after you edit a page matters, because an old vector keeps matching old wording.

A quick check you can run

You do not need to inspect any vectors. Test the behavior.

  1. Write 20 questions the way customers phrase them, with typos and slang.
  2. For each, note the passage that should answer it.
  3. Ask the agent in the Test > Playground, which shows the sources behind each answer.
  4. Mark each as right source, wrong source or no source.
  5. For the misses, ask whether the cause is wording, a missing page, a near duplicate or an exact code.

Repeat the same list after each content change, and note which questions Askocto answers from the wrong source. If misses cluster around codes and SKUs, add Q&A pairs that name them. The Sources guide lists the options, and the product overview shows where testing fits.

When answers still drift from your sources, the controls in AI hallucination cover the next layer.

Frequently asked questions

What is a vector embedding in simple words?

It is a list of numbers that stands for the meaning of a text. Texts with similar meanings get similar lists, which lets a search system match by meaning instead of by exact words.

Keyword search looks for the same words. Embedding search looks for the same meaning. Each catches things the other misses, so many systems use both.

Do I need to create embeddings myself for a support agent?

Not when you use a platform. You add sources and the platform embeds them when it trains. You still control the quality of the content that gets embedded.

Why does my agent miss a product code that is in my content?

Embeddings represent meaning, and a code has little meaning to match. Add a Q&A pair or a clear sentence that names the code and what it refers to, and test again.

Train an agent on your own help center

Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.

Keep reading

All articles
AI explainedreranking
Sep 9, 20245 min read

Reranking in RAG: what it does and when to add it

Retrieval finds candidates and reranking puts them in the right order. See how the second pass works, when it is worth the extra step and how to measure the gain.

Read article