Skip to content
All tutors

Word and sentence embeddings

Understand how meaning becomes vectors, compute similarity yourself and choose embeddings wisely

By Skill Lab Beginner NLP New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $5 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Word and sentence embeddings AI tutor following Skill Lab's plan
Student:

My search finds 'cheap flights' when I search 'not cheap flights'. Why?

Tutor:

Most embedding models capture the topic of a text much better than its logic. 'Not cheap flights' and 'cheap flights' share almost all their words and context, so their vectors land very close, and the small word 'not' barely moves the point. This is a known weakness with negation, exact numbers and constraints. Practical fixes: combine embedding search with keyword filters, rerank results with a model that reads query and document together, or handle constraints such as price as structured filters. Quick check: what would happen with 'flights under 200 euros' versus 'flights over 200 euros'?

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Explain the difference between one hot vectors and dense embeddings
  • Compute cosine similarity between small vectors by hand
  • Describe how contextual and sentence embeddings differ from static word vectors
  • Recognise bias in embeddings and test models on your own data

Lesson plan

6 lessons. Pick one to start there.

  1. 1 From one hot to dense vectors See why giving each word its own dimension fails and dense vectors work better. Start
  2. 2 Learning meaning from context Understand how word vectors are learned from the words around them. Start
  3. 3 Measuring similarity Compute cosine similarity and interpret scores sensibly. Start
  4. 4 Contextual and sentence embeddings See how modern models embed words in context and whole sentences for search. Start
  5. 5 Bias and limits Recognise social bias and other blind spots in embedding spaces. Start
  6. 6 Choosing and testing an embedding model Pick an embedding model by measuring it on your own queries and documents. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

For beginners who keep hearing about embeddings in search, chatbots and recommendations and want to know what they really are. You start with why one number per word is not enough, then see how word vectors learn meaning from the company words keep, including the famous analogy examples and why they are less tidy than they look. Next come contextual embeddings, where the same word gets different vectors in different sentences, and sentence embeddings used for semantic search. You will compute cosine similarity by hand, learn about bias inside embeddings, and finish by comparing embedding models on your own data rather than trusting leaderboards.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.