---
title: "What are embeddings? Text vectors for search and RAG"
description: "Embeddings turn text into vectors of numbers so that similar meanings sit close together. How they work, how to compare them, and where they fit in RAG."
url: https://broadrouter.com/glossary/embeddings/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Embeddings

Updated 2026-11-14

Embeddings are lists of floating-point numbers (vectors) that a model produces to represent a piece of text, an image or other input. Inputs with similar meaning get vectors that are close together, so distance between vectors can rank search results, cluster documents or find related items.

Also called: text embeddings, vector embeddings, embedding vectors, embedding model, sentence embeddings

An embedding is how a computer measures meaning: two texts that say similar things get two vectors that point in similar directions.

## How it works

You send text to an embedding model and get back one fixed-length vector. OpenAI’s guide puts it plainly: “An embedding is a vector (list) of floating point numbers.” The length is fixed per model. OpenAI’s text-embedding-3-small returns 1,536 numbers by default and text-embedding-3-large returns 3,072.

To compare two texts, you compare their vectors. OpenAI recommends cosine similarity. Its vectors are normalised to length 1, so a plain dot product gives the same ranking. A query vector compared against millions of stored vectors is the core of semantic search. Doing that fast at scale is the job of a [vector database](https://broadrouter.com/glossary/vector-database/).

Embedding models are a different kind of model from chat models. They read a whole input and return numbers; they do not generate text. They are billed per input [token](https://broadrouter.com/glossary/token/), and there is no output text to pay for.

## Why it matters

-   **Retrieval.** Embeddings are the usual first step of [retrieval-augmented generation](https://broadrouter.com/glossary/rag/): embed your documents once, embed each question, fetch the closest chunks and pass them to the chat model.
-   **Model choice changes results.** The MTEB benchmark tested 33 models across 8 task types, 58 datasets and 112 languages and found that “no particular text embedding method dominates across all tasks.” Test on your own queries, especially for Arabic or mixed-language text.
-   **Lock-in.** Vectors from one model cannot be compared with vectors from another. Switching embedding models means re-embedding the whole corpus.

## On BroadNet Inference

BroadNet’s docs list `/v1/chat/completions`, `/v1/audio/transcriptions` and `GET /v1/models` (a model list). There is no embeddings endpoint. For a search or RAG system, pair a separate embedding model (a hosted API or an open model you run yourself) with a BroadNet chat model for the answer. The [Arabic RAG guide](https://broadrouter.com/blog/arabic-rag-search/) shows this split with a multilingual embedding model.

If your documents fit, a long context window can sometimes skip retrieval entirely. The trade-offs are in [long context vs RAG](https://broadrouter.com/blog/long-context-vs-rag/).

## Common mistakes

-   Mixing vectors from two embedding models in one index.
-   Embedding whole documents instead of chunks. One vector for 50 pages blurs every topic in it.
-   Normalising documents but not queries, or the reverse. Apply the same text cleaning to both.

## Questions

### Are embeddings the same as tokens?

No. A token is a piece of text the model reads. An embedding is the vector the embedding model outputs for a whole input, such as a sentence or a paragraph.

### How many dimensions does an embedding have?

It depends on the model. OpenAI's text-embedding-3-small returns 1,536 numbers by default and text-embedding-3-large returns 3,072, and both can be shortened with a dimensions parameter.

### Does BroadNet Inference have an embeddings endpoint?

No. BroadNet's docs list only /v1/chat/completions and /v1/audio/transcriptions. Use a separate embedding model for retrieval and BroadNet for the generation step.

## See also

-   [RAG (retrieval-augmented generation)](https://broadrouter.com/glossary/rag/) (term)
-   [Vector database](https://broadrouter.com/glossary/vector-database/) (term)
-   [Token](https://broadrouter.com/glossary/token/) (term)
-   [Context window](https://broadrouter.com/glossary/context-window/) (term)
-   [OpenAI-compatible API](https://broadrouter.com/glossary/openai-compatible-api/) (term)
-   [Hybrid search](https://broadrouter.com/glossary/hybrid-search/) (term)
-   [Reranking](https://broadrouter.com/glossary/reranking/) (term)
-   [Use the OpenAI Python SDK with BroadNet Inference](https://broadrouter.com/guides/openai-python-sdk/) (guide)
-   [Arabic RAG: normalisation, chunking and retrieval that works](https://broadrouter.com/blog/arabic-rag-search/) (article)
-   [Long context vs RAG: when 1M tokens replaces a vector DB](https://broadrouter.com/blog/long-context-vs-rag/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-embeddings&utm_content=page-cta) ·

**Sources**

-   [OpenAI, vector embeddings guide (dimensions, cosine similarity, pricing per input token)](https://developers.openai.com/api/docs/guides/embeddings)
-   [Muennighoff et al., MTEB: Massive Text Embedding Benchmark (arXiv)](https://arxiv.org/abs/2210.07316)
-   [BroadNet Inference API reference, model IDs and endpoints](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-embeddings&utm_content=sources#models)
