What are embeddings in AI?
What is it?
An embedding is a numerical representation of text. The model converts words or sentences into a list of numbers called a vector. That vector captures semantic meaning in a form computers can compare mathematically.
Simple intuition: computers do not "understand" language like humans. They need numbers. Embeddings turn meaning into numbers.
Why does it exist?
Keyword search only matches exact words. If a user asks about "servicing after half a thousand hours" and the manual says "500-hour maintenance," keyword search may miss the connection.
Embeddings capture that both phrases refer to similar ideas. Semantically similar text tends to produce vectors that are closer together in vector space.
How does it work conceptually?
- Text (a chunk or a question) is sent to an embedding model.
- The model returns a vector — often hundreds or thousands of numbers (dimensions).
- To compare two pieces of text, compute similarity between their vectors (e.g., cosine similarity).
- Higher similarity means closer meaning.
"500-hour maintenance" → [0.12, -0.45, 0.88, …]
"half thousand hour service" → [0.11, -0.43, 0.85, …] ← similar vectors
"weather forecast" → [0.91, 0.02, -0.33, …] ← different vectorYou do not need equations for the first pass — the key idea is similar meaning → similar vectors.
Where does it fit in a RAG pipeline?
Embeddings appear twice:
Indexing (offline):
Chunk text → Embedding model → Vector → Stored in vector databaseQuery (online):
User question → Embedding model → Query vector → Similarity search → Relevant chunksThe same embedding model family should be used for indexing and querying. Changing models without reindexing can cause dimension mismatch errors.
How this relates to Noulek
Noulek uses OpenAI embedding models (via the same API key as Settings → LLM) during the Embedding pipeline stage.
- Each document chunk is embedded when indexed.
- Vectors are stored in Weaviate (Settings → Vector DB).
- At query time, the question is embedded and compared against stored chunk vectors.
If embeddings fail, check your OpenAI API key and Activity log for embedding or retrieval errors. Dimension mismatches between old indexed data and a new embedding model require schema repair and reindexing — Noulek's retrieval error messaging references this scenario.
See What is semantic search? for how embeddings enable search at query time.