Skip to main content

Confirm

Are you sure?

Glossary

Embeddings

How a search for "cancel my plan" finds the paragraph titled "Ending a subscription".

By · Last updated: September 2026

TL;DR

An embedding is a list of numbers — a vector — that a model produces to represent the meaning of a piece of text. Texts with similar meanings get vectors that are close together, so comparing vectors finds related passages even when they share no words. Embeddings power semantic search and retrieval for RAG.

Free plan, no credit card. 1,000 credits a month.

How it works

How they work

An embedding model reads a text and outputs a fixed-length vector, typically hundreds to a few thousand numbers. Nothing in it is readable on its own; what matters is distance. Cosine similarity between two vectors near 1 means the texts are about the same thing.

Retrieval-augmented generation uses this in two steps. Ahead of time, split documents into chunks, embed each and store the vectors in an index. At question time, embed the question, find the nearest chunks and put them in the prompt.

Nearest chunk to a question
import numpy as np

def cosine(a, b):
    return float(np.dot(a, b) / (np.linalg.norm(a) * np.linalg.norm(b)))

question = embed("How do I cancel my plan?")      # your embedding model
best = max(chunks, key=lambda c: cosine(question, c["vector"]))
print(best["heading"])                             # "Billing > Ending a subscription"

In practice

What makes web-page embeddings good or bad

  • Clean input. A chunk that is half navigation embeds as "a website", and matches everything weakly.
  • Focused chunks. One topic per chunk gives a sharp vector; a whole page averages its topics into mush.
  • Stable input. If the same page converts differently each time, every re-fetch re-embeds it.
  • One model. Vectors from different embedding models are not comparable; re-embed everything when you switch.

URLpipe

URLpipe's part

URLpipe does not produce embeddings — use the embedding model you already use. What it provides is the text to embed: /markdown returns a rendered page's main content, headings intact, and the same page always converts to the same Markdown, so an unchanged page never needs re-embedding. /keywords is the complement for exact-term filters next to vector search.

Embedding the whole of a long page as one vector is the common mistake: its topics average into a vector close to nothing in particular, and a question about one section matches it weakly. Embed per section, keep the page URL and heading as metadata on each vector, and cite them back when the chunk is used in an answer.

FAQ

Frequently asked questions

What is the difference between embeddings and keywords?
Keywords are words from the text, matched exactly. Embeddings represent meaning, so they match paraphrases and related concepts. Many search systems use both.
Do I need a vector database for embeddings?
Not to start: a few thousand vectors fit in memory and a brute-force comparison is fast. A vector index pays off at larger scale.
Can I compare embeddings from different models?
No. Each model has its own vector space; mixing them gives meaningless distances.

See it on your own pages.

Free plan, no card. Confirm your email and your API key is live — you'll be making real requests in minutes.