Course overview
02
Pathway 3 · Lesson 0260 min

Embeddings & Semantic Search

How AI represents meaning as numbers

Learning Objective

By the end of this lesson, you will be able to: Explain how text embeddings represent semantic meaning, describe cosine similarity, and identify three practical use cases for embeddings in your organisation.

1536

dimensions in a typical text embedding vector

Engage

"How does a computer understand that 'king minus man plus woman equals queen'? The answer — embeddings — is one of the most powerful ideas in modern AI."

Explore

A visual, intuitive explanation of how text embeddings work — from the mathematics to the magic.

Explain

What Are Embeddings?

An embedding is a way of representing text (words, sentences, documents) as a list of numbers — a vector in high-dimensional space. Similar meanings end up close together in this space.

The famous example:

Vector('King') - Vector('Man') + Vector('Woman') ≈ Vector('Queen')

This works because the model has learned that the relationship between 'king' and 'man' is similar to the relationship between 'queen' and 'woman' — and encoded that relationship as a direction in vector space.

Why this matters: Embeddings allow computers to find semantically similar content — not just keyword matches. 'Car' and 'automobile' have different words but similar embeddings. This powers semantic search, recommendation systems, and RAG.

📖

Cosine Similarity

The standard way to measure how similar two embeddings are. Cosine similarity measures the angle between two vectors: 1.0 = identical meaning, 0 = completely unrelated, -1 = opposite meanings. When you search a vector database, you're finding the documents whose embeddings have the highest cosine similarity to your query's embedding.

Practical Use Cases for Embeddings

Use CaseHow Embeddings HelpExample
Semantic SearchFind documents by meaning, not just keywordsSearch 'car problems' finds articles about 'vehicle maintenance'
RecommendationFind similar items to what a user likesRecommend similar products, articles, or courses
ClusteringGroup similar documents automaticallyCluster customer feedback by topic without manual labelling
DeduplicationFind near-duplicate contentIdentify similar support tickets to route to the same team
RAG RetrievalFind relevant context for AI responsesRetrieve the most relevant policy documents for a query
Try It · Reflect & Apply

Identify embedding opportunities: List 3 search or matching problems in your organisation that currently rely on keyword matching. How would semantic search (embeddings) improve each one? What data would you need to embed?

Your notes are saved in your browser for this session.

Evaluate · Knowledge Check
1 / 3

What does it mean for two text embeddings to have a high cosine similarity?

Builder Engineering Studio

Semantic Retrieval Engineering Studio

Architecture blueprint

Design the retrieval pipeline: source document → semantic chunk → embedding model → vector index → query embedding → similarity search → reranking → cited result.

Engineering trade-off

Smaller chunks improve retrieval precision but lose context; larger chunks preserve meaning but can dilute relevance. Test semantic chunks with 10–20% overlap against your real queries.

Quality gate

Create a golden set of 20–30 representative user questions. For each, define the expected source, acceptable answer, and relevance threshold before changing the model or index.

Evidence to measure

Measure Recall@k, precision of retrieved passages, latency, retrieval cost, zero-result rate, and the percentage of results users open or accept.

Build task

Write the data contract for one embedding collection: source owner, refresh frequency, metadata fields, chunking rule, retention period, and evaluation set.

External video references

Keep Learning on YouTube

Open in a new tab

Human-centred work design

Human Oversight Check

Use this original practice tool to test whether an AI-enabled workflow supports real human judgment, rather than merely placing a person at the end of an automated process.

Self-check

0/5

Start by making the work and decision rights explicit

Calibrate autonomy

Match AI freedom to consequence. Low-consequence drafting may run quickly; high-consequence decisions need explicit human approval.

Keep context visible

Make the objective, inputs, constraints, source material, and current system state easy to inspect before anyone approves an output.

Design active review

Review should require informed judgment, a plausible override, and the authority to act—not a symbolic sign-off after the fact.

Route exceptions clearly

Specify what uncertainty, conflict, missing evidence, or risk looks like—and who receives the escalation with enough context to decide.

Maintain human capability

Protect deliberate practice in the work that people may one day need to verify, challenge, or perform without AI assistance.

Apply it to one workflow

Ready to move on?

Mark this lesson complete and continue to "Vector Databases & RAG".