Embeddings
Words made simple
A few useful meanings before you read the explanation.
- Embedding
- A list of numbers that represents the meaning of some content. Similar meanings can produce nearby lists of numbers.
- Vector
- An ordered list of numbers. An embedding is a vector used to represent content for tasks such as similarity search.
- Semantic search
- Searching by meaning rather than only matching exact words. A search for damaged car may also find vehicle accident documents.
More words from this lesson
- Retrieval
- Finding and fetching information that is useful for the current question.
- Cosine similarity
- A measure comparing the directions of two vectors. It is often used to estimate how similar two embeddings are.
Beginner — Explain an embedding.
- It is a numerical vector that represents useful features of content, often meaning.
- Similar wording or meaning tends to produce nearby vectors, enabling retrieval of “vehicle collision” for a query about “car accident.”
Intermediate — What does cosine similarity tell you?
- It compares vector direction and helps rank related content.
- A high score is not a probability that the passage is true or sufficient.
- I use a compatible metric and calibrate thresholds on domain-specific queries.
Senior — How do you upgrade embedding models?
- I version models and index data, re-embed the intended corpus into a separate compatible space, evaluate filtered retrieval, and switch query/index routing together.
- I preserve source data and support rollback instead of mixing arbitrary old and new vectors.
Scenario — Policy-code search fails despite good semantic search. What do you do?
- I add exact identifier fields and lexical/hybrid retrieval.
- Embeddings may not preserve rare codes or precise numbers well.
- I test actual identifiers and keep them intact during query rewriting and text preprocessing.
Can you explain it without the notes?
Embeddings
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Beginner — Explain an embedding.
Turn this concept into a clear answer.
Practice this conceptAdapted from 13_AI.MD · “29.4 Embeddings”. Examples are study fragments; framework behavior can depend on your version.