StudyBrixFree worksheets, study guides and courses

Artificial intelligence · University

Embeddings, similarity and retrieval representations

An embedding represents an item as a vector learned or designed for a task. Nearby vectors reflect the representation’s notion of similarity, not universal meaning.

Make a worksheet

Prerequisites

Vectors, dot products and norms.

Study notes

Embedding

An embedding represents an item as a vector learned or designed for a task. Nearby vectors reflect the representation’s notion of similarity, not universal meaning.

Cosine

For nonzero vectors, cosine similarity is u·v/(norm(u)norm(v)). It compares direction and differs from Euclidean distance.

Retrieval

An embedding search retrieves candidates. Relevance, factual correctness and permissions still need additional checks.

Evaluation

Test representations on the intended language, domain and retrieval tasks. A low-dimensional visual projection can distort relationships.

Worked examples

For nonzero identical vectors, find cosine similarity.

The dot product equals the product of their norms.

1

Find cosine similarity of (1,0) and (0,1).

The dot product is zero.

0

Check your understanding

  1. Is ordinary cosine similarity defined for a zero vector without an extra convention?

    1. No
    2. Yes, always minus one
    3. Only in two dimensions
    4. Yes, always one
  2. Find the dot product of (2,3) and (4,−1).

  3. Why does a high embedding similarity not prove that a document supports a factual claim?

  4. What can a two-dimensional embedding plot hide?

    1. Distortion introduced by dimensionality reduction
    2. All uncertainty permanently
    3. Every exact original distance by definition
    4. Only the legend

Answers and marking guidance

Answers and marking notes
  1. No

    The norm product denominator is zero.

  2. 5

    2×4+3×(−1)=5.

  3. Similarity measures the modelled representation relationship, while support requires reading the relevant content and checking its meaning and reliability.

    Credit similarity versus evidence.

  4. Distortion introduced by dimensionality reduction

    Projection can change or obscure high-dimensional relationships.

Further reading and review references

These are reference links, not copied exercises, institutional endorsement or proof of independent review.

AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.