Building with AI

What is semantic search?

In short

Semantic search finds information by meaning instead of exact words. Asking 'how do I get my money back' finds the page titled 'Refund policy', even though no word matches.

Keyword search looks for the same letters. Semantic search turns text into embeddings, numbers that capture meaning, and finds the closest matches. The best systems combine both, so exact product codes and names are still found.

Mini course

3 short lessons, about 2 minutes in total

  1. Searching for meaning
  2. Hybrid is best
  3. The engine behind AI answers

Lesson 1

Searching for meaning

People rarely use the same words as the document they need. Keyword search fails when the customer writes 'broken' and the manual says 'defective'. Semantic search solves this by comparing meanings. Each text is turned into a list of numbers, an embedding, where similar meanings end up close together.

Question in your words
Behind the scenesEmbeddingVector database
Results by meaning
Both the question and the documents are turned into meaning-numbers, so search finds matches by meaning, not just by the exact words

Tap a box to open that concept

A search becomes: find the documents whose numbers are closest to the question's numbers.

Lesson 2

Hybrid is best

Semantic search can miss exact matches, such as article number 'AX-2041' or a person's name. The strongest setups run keyword and semantic search together and merge the results, sometimes followed by a reranking step that orders the top hits more carefully.

Many search tools and databases now offer hybrid search out of the box.

Lesson 3

The engine behind AI answers

When an AI assistant answers from company documents, semantic search usually picks which passages it gets to read. If the search finds the wrong passages, even the best model gives a poor answer. So improving search is often the fastest way to improve an AI assistant.

  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 systemsSemantic searchRAG (retrieval-augmented generation)AI agentMCP (Model Context Protocol)
  4. AI modelsThe models that understand and createLarge 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 Semantic search sits in a company's AI setup

Test with real questions and check whether the right document appears in the top three results.

An everyday example

An employee searches the intranet for 'working from abroad' and finds the policy called 'Remote work outside Sweden', which a keyword search missed.

How companies use it

Companies use semantic search on websites, help centers, intranets and product catalogs, and as the retrieval step that feeds AI assistants with the right documents (RAG).

Frequently asked questions

Is semantic search better than keyword search?

For questions in everyday words, yes. For exact codes and names, keyword search is still better. Use both together.

Does it work in Swedish?

Semantic search works in Swedish with multilingual embedding models. It can even match a Swedish question to an English document.

How does it relate to RAG?

Semantic search is usually the 'retrieval' part of RAG: it finds the passages the AI then answers from.

In depth: Semantic search

The full picture, about 4 minutes of reading

Searching by meaning, not by spelling

Semantic search finds information by what it means rather than by the exact words it contains. A customer who types "how do I get my money back" finds the page called "Refund policy", even though not one word matches. An employee who searches for "working from abroad" finds the policy named "Remote work outside Sweden".

Classic keyword search compares letters. Semantic search compares meanings. That one difference changes how useful a search box is, especially for people who do not know the official name of what they are looking for.

Why keyword search falls short

People rarely use the same words as the document they need. A customer writes "broken" and the manual says "defective". Staff ask about "time off" and the handbook says "leave". Someone writes in Swedish and the best document is in English. Keyword search misses all of these, or drowns the right answer among pages that happen to share a common word.

Companies have long worked around this with lists of synonyms and carefully chosen tags. That helps, but someone has to maintain the lists, and they never cover every way people phrase things. Semantic search removes much of that manual work by understanding that different words can mean the same thing.

How it works, step by step

The key idea is the embedding. An embedding is a long list of numbers that an AI model produces to represent the meaning of a piece of text. Texts with similar meaning get similar lists, so their numbers end up close together, as if placed near each other on a map of meaning.

First, every document, or every chunk of a long document, is run through an embedding model, and the resulting numbers are stored, often in a vector database, a database built to find the closest lists of numbers quickly. Second, when someone searches, their question is run through the same embedding model. Third, the system finds the stored texts whose numbers are closest to the question's numbers and returns them as results. All of this typically takes a fraction of a second, even across a large collection.

Multilingual embedding models place texts in different languages on the same map, which is why a Swedish question can find an English document.

Hybrid search and reranking

Semantic search has a weakness: it can miss exact matches. An article number such as "AX-2041", a rare product name or a person's name carries little "meaning" for the model, so a semantic search may return something similar instead of the exact item. Keyword search is very good at precisely those cases.

The strongest setups therefore combine both, which is called hybrid search. Keyword and semantic search run side by side, and their results are merged. Many systems then add a reranking step: a separate model reads the question together with each of the top results and orders them more carefully. Many search tools and databases now offer hybrid search as a standard feature.

Where it goes wrong

Semantic search can return results that are related but wrong, for example a page about refunds for a different product, because the topics are close in meaning. It can also struggle with very short queries, where there is too little meaning to go on, and with specialized jargon the embedding model has rarely seen.

Data problems matter as much as the method. Outdated pages, duplicates and long documents split in clumsy places all lead to poor results. And search must respect access rights: a semantic search across company files should only return documents the person is allowed to open. The best way to find these problems is to test with real questions and check whether the right document appears among the first few results.

Semantic search and AI assistants

Semantic search is the engine behind most AI assistants that answer from company documents. In a setup called RAG, short for retrieval-augmented generation, the assistant first uses search to find relevant passages, then a language model writes an answer from them. If the search picks the wrong passages, even the best model gives a poor answer. Improving search is therefore often the fastest way to improve an assistant.

What it means for a small business

For a small business, semantic search can make a website, help center or internal knowledge base much easier to use, because people find answers in their own words. Many website platforms, help desk tools and intranet products already include it, so the first step is often to check what is available and switch it on.

If you are building an AI assistant on your own documents, put effort into the search step: clean, current documents, sensible chunks, hybrid search and a test list of real questions. The quality of the answers will follow the quality of the search.

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

Book a call