Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
GlossaryNovember 22, 20263 min read

What are embeddings?

An embedding is a list of numbers that captures what a piece of text means. Similar meanings get similar numbers, which lets an app search by meaning instead of exact words.

Startbase Team
Editorial ink illustration of books placed as dots on a star chart in connected clusters, one book-dot in ember orange

Key takeaways

  • An embedding is a vector (a list of hundreds or thousands of numbers) that represents the meaning of a text, image or other item.
  • Items with similar meaning get vectors that are close together, measured with cosine similarity or a similar distance.
  • Apps use embeddings for semantic search, "related items", duplicate detection, and retrieval for RAG.

Embeddings are numerical representations of content, usually text, produced by an AI model as a list of numbers called a vector, arranged so that pieces of content with similar meaning end up with similar numbers. They let software compare meaning with arithmetic: "how close are these two vectors?" stands in for "how related are these two ideas?"

An everyday picture is a map of a city's restaurants. Two sushi bars sit near each other in one district, pizza places cluster in another, and a fusion spot sits between them. Embeddings place every sentence on a map like that, except the map has hundreds of directions instead of two, and "near" means "about the same thing".

How they work in practice

  1. 01Embed your content. Send each item (a help article, a product description, a paragraph of a long document) to an embedding model and get back a vector, for example 1,024 numbers. Store it next to the item.
  2. 02Embed the query. When a user searches "my card got declined", embed that sentence the same way, with the same model.
  3. 03Find the nearest. Compare the query vector with the stored ones, usually by cosine similarity, and return the closest items. "Payment failed: what to do" comes back first, even though it shares almost no words with the query.

Long documents are split into chunks first (a few paragraphs each is a common starting point), because one vector for a 40-page manual blurs everything together.

What apps use them for

  • Semantic search: a recipe app where "something warm for a rainy night" finds soups and stews.
  • Related items: "you might also like" for articles, listings or courses, without hand-tagging.
  • Duplicate and near-duplicate detection: spotting the same support question asked in different words.
  • Clustering: grouping thousands of feedback comments into themes.
  • Retrieval for AI answers: finding the passages a language model should read before answering (what RAG is).

Embeddings in an app built with Startbase

Startbase Cloud gives your app a Postgres database (database docs). Postgres has a widely used extension, pgvector, that stores vectors in a column and finds nearest neighbors with an index, and Supabase supports it. Creating the vectors needs an embedding model from an AI provider; keep that provider's key in your project's Secrets so it is used only by server-side functions (API keys and secrets). Ask the agent to plan the setup first, since the right chunk size and refresh strategy depend on your data.

Plan semantic search for the recipes table. When a recipe is created or edited, a server function should create an embedding of its title, ingredients and description using my embedding API key from Secrets, and store it in a vector column. The search box should embed the query the same way and return the 10 closest recipes, with a fallback to plain text search if the embedding call fails. Tell me what tables, indexes and functions you will add before building.

Common confusions

  • Embeddings vs keyword search. Keyword search matches words; embeddings match meaning. Many good search boxes combine both, because exact names and codes still need keyword matching.
  • Mixing models. Vectors from two different embedding models are not comparable. If you change models, re-embed everything.
  • Embeddings are not the text. You cannot reliably read the original back out of a vector, but treat vectors of private data as sensitive anyway.
  • Embeddings vs an LLM. An embedding model outputs numbers for comparison; a language model outputs text. RAG uses both.

Frequently asked questions

Do I need a separate vector database?

Not for most apps. A Postgres extension such as pgvector handles many thousands to millions of vectors well. Dedicated vector databases make sense at very large scale or with special needs.

Are embeddings expensive?

Creating embeddings is typically much cheaper per token than generating text, and you embed each item once. Searching is just a database query.

On this page

  • How they work in practice
  • What apps use them for
  • Embeddings in an app built with Startbase
  • Common confusions

Keep reading

More in Glossary
Editorial ink illustration of a hand-cranked music box drum plucking a metal comb, the crank handle in ember orange
GlossaryNovember 22, 2026

What is a game loop?

Every real-time game runs one repeating cycle: read input, update the world, draw it. Here is what that cycle looks like and why it decides how your game feels.

3 min read
Editorial ink illustration of a brass stopwatch beside a small wind-up toy car, the second hand in ember orange
GlossaryNovember 22, 2026

What is delta time?

Delta time is the number that keeps your game the same speed on every screen. Here is how to use it, where it breaks, and how to spot a game that forgot it.

3 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.