DAILY PRACTICEBuild your AI engineering skills, one problem at a time.Try today's challenge
InferenceAIStart learning path

Generative AI · Beginner

Embeddings

Embeddings map objects such as text or images into vectors that can be compared or used by downstream models.

TRY IT YOURSELF

Explore vector similarity

Compare a fixed unit vector with a second unit vector at the angle you choose.

cosine similarity0.707
−1 opposite · 0 perpendicular · +1 aligned

How it works

An embedding model maps an input into coordinates. Similarity functions such as cosine can rank candidate vectors, but what counts as similar depends on the model and its training.

A concrete example

A retrieval system embeds a query and documents with a compatible model, then searches for nearby document vectors.

Watch for this

An embedding is not a factual guarantee. Domain mismatch, chunking, and model changes can make retrieval fail.

Try it yourself

Compare aligned and opposite vectors below, then explain why relevant passages may still be missed.

Continue to practice →

Read the source: Google: embeddings ↗

Related concepts

Tokenization →

Prompt engineering →

Fine-tuning →