Skip to content
itsorted.online
AI guide

Embeddings and Vector Databases Explained (Without Maths)

Embeddings and vector databases are the plumbing behind most "chat with your documents" tools and AI website assistants. An embedding turns a piece of text into a list of numbers that captures its meaning, so a computer can find passages that mean the same thing even when the words differ. A vector database stores those lists and finds the closest ones fast. This guide explains both without maths, what they cost, the privacy points to check, and when ordinary keyword search is the better tool.

By IT Sorted teamReviewed 6 min readHow we write guides
in

Key takeaways

  • Embeddings let software search by meaning, not just matching words.
  • A vector database stores embeddings and returns the passages closest in meaning to a question.
  • Creating embeddings is cheap: OpenAI's small model handles about 62,500 pages per US dollar.
  • Embeddings of confidential text still need access controls; OWASP lists embedding leaks as a risk.
  • For exact codes, names and small FAQs, normal keyword search is often enough or better.
In this guide · 7 sections
  1. 01What an embedding is, without maths
  2. 02What a vector database does
  3. 03Where vectors are stored, and what it costs
  4. 04Privacy and security of stored embeddings
  5. 05When normal search is enough
  6. 06Do it yourself or get help?
  7. 07Frequently asked questions

Short answer

An embedding is a list of numbers representing what a piece of text means. A vector database stores those lists and finds the closest matches, so a search for "refund rules" also finds a passage titled "returns policy". It powers AI assistants that answer from your own documents.

What an embedding is, without maths

Imagine plotting every sentence in your documents on a huge map, where sentences about similar things sit close together. "How do I get my money back?" lands near "Our refund policy", far from "Opening hours on public holidays". An embedding is simply that sentence's coordinates on the map: a long list of numbers.

An embedding model produces those coordinates. OpenAI's embeddings guide says its text-embedding-3-small model returns 1,536 numbers per piece of text by default, and the larger model 3,072. You don't need to understand the numbers; what matters is that similar meanings get similar lists.

Keyword search findsMeaning-based (semantic) search also finds
"refund" only where the word "refund" appears"money back", "return an item", "cancel my order"
"MC" only as typed"medical certificate", "sick leave note"
Nothing for a misspelt queryClose matches despite typos and phrasing

What a vector database does

A vector database stores embeddings alongside the original text, and answers one question very quickly: which stored items are closest to this new embedding? That is how a document assistant works behind the scenes.

  1. Split documents into chunks

    Long documents are cut into passages of a few paragraphs each.

  2. Turn each chunk into an embedding

    An embedding model creates the list of numbers for every chunk.

  3. Store them in a vector database

    Each embedding is saved with its text, source document and who may see it.

  4. Embed the question

    When someone asks a question, the question is turned into an embedding too.

  5. Find the closest chunks

    The database returns the passages nearest in meaning.

  6. Hand them to the AI model

    The LLM writes an answer using those passages, ideally citing them.

That whole pattern is called retrieval-augmented generation (RAG); our RAG explained guide covers it in more depth, and fine-tuning vs RAG explains why RAG is usually the right choice for business knowledge. If the AI side is new to you, start with what an LLM is.

Where vectors are stored, and what it costs

You rarely need a separate product. The options for a small business, from simplest to most custom:

  • Built into an AI tool: ChatGPT projects, Claude projects, Copilot or a website chatbot platform handle embeddings and storage for you.
  • A vendor's hosted vector store: for example, OpenAI's file search stores and searches your files through its API.
  • Your existing database: the open-source pgvector extension adds vector search to PostgreSQL, so vectors can live next to your other data.
  • A dedicated vector database service: worth it for very large collections or high traffic.
  • Creating embeddings (OpenAI text-embedding-3-small)OpenAI's estimate at about 800 tokens a pageAbout 62,500 pages per US$1
  • OpenAI vector storage for file searchAcross all storesFree up to 1 GB, then US$0.10 per GB per day
  • pgvector in your own PostgreSQLYou pay for the database hostingFree software

Typical SME document set (a few hundred pages)Usually under US$1 to embed

Approximate, as of October 2026, from OpenAI's embeddings and retrieval guides. The bigger costs are set-up work and the AI model's answers, not the embeddings.

Anthropic doesn't sell its own embedding model; its embeddings documentation points to providers such as Voyage AI. Mixing vendors is normal: one company's embeddings, another's chat model.

Privacy and security of stored embeddings

It is tempting to think embeddings are anonymous because they are just numbers. They are not a safe way to hide data. The OWASP LLM08: Vector and Embedding Weaknesses entry lists unauthorised access and data leakage, cross-user leaks in shared databases, and embedding inversion attacks, where attackers try to recover the original text from the numbers.

Before you index company documents

When normal search is enough

Meaning-based search is not always better. It can miss exact identifiers and return "close enough" passages that are wrong.

Use keyword search when

  • People search for product codes, SKUs, invoice numbers or names
  • You have a small FAQ of 20 to 50 questions
  • Exact wording matters, such as clause numbers
  • Your website's built-in search already works well

Use embeddings when

  • Customers describe problems in their own words
  • Documents use different terms for the same thing
  • You are building an AI assistant over many documents
  • Questions come in several languages

Many good systems use both: keyword search catches exact matches, embeddings catch meaning, and the results are combined.

Do it yourself or get help?

For a team that wants to ask questions about a few dozen documents, a business plan of ChatGPT, Claude or Copilot with project files is the DIY route: no vector database to manage. Keep confidential files out of shared projects.

For a customer-facing assistant on your site, our AI Website Assistant (S$790) indexes your approved content only. If you need search across internal systems with per-user permissions, the Custom Tool or Dashboard (from S$1,990) is scoped in writing with a fixed price before work starts.

Frequently asked questions

An embedding is a list of numbers that represents the meaning of a piece of text, image or other content. Texts with similar meanings get similar lists, so software can compare them. Embeddings power semantic search, recommendations and AI assistants that answer questions from your own documents.

Not necessarily a separate one. Many chatbot platforms and AI tools store embeddings for you. If you build your own, the pgvector extension can add vector search to an existing PostgreSQL database. A dedicated vector database makes sense mainly for very large document collections or heavy traffic.

If embeddings are created from text containing personal data and can be linked back to that text or person, treat them with the same care as the source. OWASP lists embedding inversion, recovering text from vectors, as a known risk. Apply the same access controls, retention and deletion rules as the original documents. This is general information, not legal advice.

Very little for a small business. OpenAI's embeddings guide estimates about 62,500 pages per US dollar with its text-embedding-3-small model, assuming around 800 tokens a page, as of October 2026. Storage, set-up work and the AI model that writes the answers usually cost far more than the embeddings themselves.

It is better at matching meaning, such as finding a returns policy when someone asks about getting money back. It is worse at exact matches like product codes, names and invoice numbers. Many systems combine both methods so users get exact matches when they type identifiers and meaning-based matches when they describe a problem.

Rather have it done for you?

Fixed price, set up in your own accounts.

Order online, get a written scope, and keep full ownership of everything we set up. Questions first? Ask us in writing.