LyraLearn AI Learning Platform
Exams
← Module 4 Β· Embeddings
🎧 Listen

What Embeddings Are

An embedding is a list of numbers that captures the meaning of a piece of text. Feed a sentence to an embedding model and you get back a fixed-length array of floats β€” a vector β€” that places that sentence at a specific point in a high-dimensional space. Text with similar meaning lands near other similar text; unrelated text lands far away. That single property is what makes semantic search, RAG, and recommendation systems possible.

Sentences are converted into fixed-length number vectors and placed as points in a meaning space where similar texts cluster together.

A vector of meaning, not keywords

Traditional search matches keywords: "annual leave policy" only finds documents containing those exact words. An embedding matches meaning: "how many vacation days do I get?" lands near a document titled "Paid Time Off Entitlements" even though they share no words. The model has learned, from vast amounts of text, that vacation, leave, PTO, and time off all occupy roughly the same region of meaning-space.

Concretely, an embedding is a dense vector β€” every position holds a real number, and the whole array together encodes the meaning. It is not human-readable; no single number means "is about HR." Meaning is distributed across all the numbers at once. In LyraLearn, each lesson chunk you read is turned into a 768-number vector by a local nomic-embed-text model, and that vector is what the AI Tutor actually searches over.

Fixed length, regardless of input

A crucial property: the vector is always the same length no matter how long the input is. A three-word question and a 400-word lesson paragraph both come out as exactly 768 numbers (for this model). That fixed shape is what lets you:

The number of positions in the vector is its dimensionality β€” 768 here, 1536 for some Azure OpenAI models, 384 for smaller local models. More dimensions can capture finer distinctions but cost more storage and compute. The next lesson goes deeper on what those dimensions are.

Where embeddings fit in an enterprise system

In a public-sector or .NET enterprise stack, embeddings are the bridge between unstructured text and a database you can query. The typical flow:

  1. Take documents (policies, case notes, lessons) and split them into chunks.
  2. Run each chunk through an embedding model to get a vector.
  3. Store the vector alongside the original text and metadata.
  4. At query time, embed the user's question and find the nearest stored vectors.

Everything downstream β€” the AI Tutor's grounded answers, a "find similar cases" feature, a semantic helpdesk β€” rests on this one idea: meaning becomes geometry, and geometry is something a database can search.

🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.