Week 07 · lesson

Lab: Compare Token Representations

Mission

Run the local Embedding Similarity Lab. Compare the same three tokens under one-hot and supplied dense vectors, reproduce cosine calculations, and export an Embedding Similarity Record.

Guided start

  1. Run One-hot vectors with query robot.
  2. Record that both different-token cosine values are 0.
  3. Switch only the representation to Supplied dense vectors.
  4. Run again and preserve every vector, dot product, norm, and cosine.
  5. Explain why token spelling stayed fixed while measured similarity changed.

Procedure

  1. Preserve both one-hot comparisons.
  2. Predict which dense token will be closer to robot.
  3. Recalculate both dense cosine values.
  4. Compare the sign and magnitude without inventing axis meanings.
  5. Preserve your first semantic claim and write a bounded correction.
  6. Complete Observation, Measurement, Decision, and Limitation.
  7. Export the record and confirm it names ai-for-beginners-embedding-similarity-lab.

Success criteria and boundary

  • both vector representations remain visible;
  • each dense cosine can be reproduced from its operands;
  • representation change is separated from token change;
  • the correction follows only supplied geometry; and
  • the limitation rejects synonymy, truth, fairness, causation, and other-model claims.

Use only supplied tokens and vectors. The Lab retrieves no text, profiles no person, and contacts no service.

Robotnix Lab · contract v1

Embedding Similarity Lab

Compare one-hot and dense token vectors with explicit cosine calculations and bounded interpretation.

Help and boundaries

A deterministic browser simulation uses invented teaching vectors and contacts no embedding service.

No personal data, private prompts, or API keys. This Lab makes no hidden remote writes and does not persist your work after the page session.

No result profiles a person, retrieves content, or authorizes action.

Lab draft is active for this page session only.

Objectives

  • Trace tokens through vocabulary IDs and vectors.
  • Calculate dot products, norms, and cosine similarity.
  • Explain why vector closeness depends on representation and training context.

Procedure

Workbench

Compare the representation before interpreting similarity.

Select a representation and calculate. The same three supplied tokens are used in both runs.

Boundary: These invented teaching vectors demonstrate geometry only. Similarity does not establish synonymy, truth, fairness, causation, or performance in another embedding model.

Text and static fallback

Every token, vector, dot product, norm, cosine value, and boundary appears in accessible text and tables.

One-hot cosines are zero. Dense robot-machine cosine is about 0.994; robot-banana is about -0.645.

Evidence record

Record only the evidence requested. Do not enter names, personal information, private prompts, or credentials. This draft stays in memory only unless you explicitly export it.

Success criteria

  • Both vector forms remain explicit.
  • Every cosine operand is preserved.
  • The revision follows supplied geometry only.
  • The limitation rejects unsupported semantic and general claims.

Complete every procedure step and required evidence field before export.

Vocabulary lab

Flip the idea, not just the card

Explain the term before you reveal the back. Then compare your explanation with the definition, example, and warning.

1 / 5
Read all terms without animation
dot product
The sum of matching vector-component products. Example: 0.9 times 0.8 plus 0.8 times 0.9 equals 1.44. Do not confuse it with: It is not normalized for vector magnitude.
vector norm
A vector's Euclidean length. Example: The norm of 0.9,0.8 is about 1.204. Do not confuse it with: Length alone does not state semantic importance.
dense vector
A representation with values in most positions rather than one active identity position. Example: Machine is represented as 0.8,0.9. Do not confuse it with: Dense does not guarantee meaningful or fair structure.
representation dependence
The fact that measured relationships change when the chosen representation changes. Example: Robot-machine cosine changes from zero to about 0.993. Do not confuse it with: The token spellings did not change.
Embedding Similarity Record
Evidence preserving vectors, calculations, interpretation, and limitations. Example: The Lab export. Do not confuse it with: It is not evidence from a live embedding model.