Book a free call

How Much Does Semantic Search Cost to Build?

Semantic search cost comes from embeddings, storage, indexing and queries. Learn what each part costs, when hosted beats self-hosted, and how to plan a budget.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How Much Does Semantic Search Cost to Build?
On this page

Short answer

Semantic search is search that matches meaning rather than exact words, and its cost comes from four parts: creating embeddings for your content, storing and indexing the vectors, serving queries, and keeping the index fresh. The total depends on content volume, query load and whether you host the system yourself or pay a vendor.

Semantic search is a way of finding content by meaning instead of by matching exact words. A query about "how to cancel a plan" can return a page titled "ending your subscription" because the system compares the meaning of the query with the meaning of each document.

The system works by turning text into embeddings, which are lists of numbers that capture meaning. A query is turned into an embedding the same way, and the system returns the documents whose embeddings are closest to the query embedding.

Semantic search is used in help centres, internal knowledge bases, product search and document retrieval for AI assistants. It is the retrieval step behind most retrieval-augmented generation systems, which is why it appears in vector database designs so often.

What are the parts of semantic search cost?

Semantic search cost splits into four parts, and each one scales with a different number. Knowing which part dominates your bill is the first step to controlling it.

Cost part What you pay for Scales with
Embedding Turning text into vectors Amount of content
Storage and index Holding vectors and the search index Number of vectors and their size
Query serving Answering each search request Queries per month
Freshness Re-embedding changed or new content How often content changes

Embedding is usually a one-off cost per document, while query serving is ongoing. Storage sits between the two: it grows as content grows and stays until content is removed. Freshness is the part teams forget, and it matters most for news, product catalogues and support content that changes weekly.

How much does hosted semantic search cost?

Hosted semantic search means paying a vendor to run the vector store and the query service. You send documents and queries over an API and the vendor handles scaling, backups and updates.

Vendor pricing usually has three pieces: a charge per million tokens embedded, a charge per stored vector or per gigabyte, and a charge per query or per month for the service tier. Entry tiers are often free for small indexes, and paid tiers start at a flat monthly rate with usage on top.

Exact prices change often, so check the vendor pricing page and treat any number here as a planning range; see vendor site for current prices.

As a planning range, a small help centre with 10,000 pages might cost a few tens of dollars a month on a hosted service, while a catalogue with millions of items and heavy query traffic can run into hundreds or thousands of dollars a month. The biggest driver is usually the number of vectors and the query volume, not the embedding model.

Hosted search is cheaper when your team is small, your content volume is modest, or you need to launch in weeks. You pay more per query than self-hosting, but you pay nothing in engineering time to run the system. Compare the options with vector database cost before deciding.

What does self-hosted semantic search cost?

Self-hosted semantic search means running the embedding model and the vector index on your own servers or cloud account. You pay for compute, storage and the engineering time to operate it, and you pay nothing per query to a vendor.

The main costs are a server or container that holds the index in memory, disk for the vectors and the source content, and GPU or CPU time for embedding new content. A small index of under a million vectors can run on one modest server. A large index needs more memory, replicas for availability and someone to watch it.

Self-hosting is cheaper at high query volumes, because the cost of the servers stops growing once the index fits, while a hosted bill keeps growing with every query. It is also the usual choice when data must stay inside your own network for legal or security reasons.

The hidden cost is operations. Index rebuilds, version upgrades, monitoring and incident response all take engineering time. A team that cannot spare at least part of one engineer's week for the search system will usually spend more self-hosting than it saves.

How do you estimate semantic search cost?

You estimate semantic search cost by counting content, queries and change rate, then pricing each part separately. A rough estimate built this way is more useful than a vendor quote based on guesses.

  1. Count your content. Count documents, then split them into chunks. A 1,000-word page usually becomes 3 to 5 chunks, and each chunk becomes one vector.
  2. Pick an embedding size. Common models produce 768 or 1,536 numbers per vector. Larger vectors cost more to store and search, so do not pick the largest by default.
  3. Estimate queries. Use current search logs or a guess based on users. Multiply by the hosted per-query price or check it against server capacity.
  4. Add the freshness cost. Multiply the share of content that changes each month by the embedding cost per chunk.
  5. Compare hosted and self-hosted. Price both for your numbers, including engineering time for self-hosting, and pick the cheaper one for the next year, not the next month.

Revisit the estimate after launch. Real query patterns are rarely what the plan assumed, and the first month of logs will show whether the index is too large, the chunks are the wrong size or the traffic is lower than expected. The database choice matters here, and vector database options differ in how they charge for storage and queries.

Example: a support site with 2 million documents

Example (hypothetical): a support site holds 2 million help articles, guides and forum answers. Each document splits into an average of 4 chunks, so the index holds 2,000,000 times 4, or 8,000,000 vectors.

With 768 numbers per vector and 4 bytes per number, one vector takes 768 times 4, or 3,072 bytes. Eight million vectors take 8,000,000 times 3,072, or about 24.6 billion bytes, which is roughly 24.6 GB of raw vector data. The search index adds overhead, so the team plans for about 40 GB of memory.

Embedding the content once costs 8 million chunks at a planning rate of 10 dollars per million tokens, with each chunk around 250 tokens. That is 8,000,000 times 250, or 2 billion tokens, at 10 dollars per million, which is 20,000 dollars for the first pass. The team cuts this by embedding only the 500,000 documents that get traffic, which is 2 million chunks, or 5,000 dollars.

Query traffic is 3 million searches a month. On a hosted plan with a planning rate of 1 dollar per 1,000 queries, that is 3,000 dollars a month. Self-hosting on two servers with 64 GB of memory each costs about 800 dollars a month in cloud spend plus part of an engineer's week, so self-hosting wins at this volume.

What are the common mistakes?

The most common semantic search cost mistakes are embedding everything, picking the largest embedding model by default, and forgetting the cost of keeping the index fresh.

  • Embedding content nobody searches. Old forum threads and archived pages inflate the index. Embed the content that gets traffic first.
  • Using the largest vector size. A 1,536-number vector costs about twice as much to store and search as a 768-number one, for a small gain in accuracy on most content.
  • Ignoring freshness. A catalogue that changes daily needs a re-embedding pipeline, or search results go stale within weeks.
  • Chunking badly. Chunks that are too long mix topics, and chunks that are too short lose context. Both hurt accuracy and inflate the index.
  • Comparing only the sticker price. A cheap hosted tier with a low query limit can cost more than a higher tier once traffic grows.

If the search system feeds an AI assistant, the retrieval design is part of retrieval-augmented generation development, where the same cost trade-offs apply to the whole pipeline.

Key takeaways

  • Semantic search cost splits into embedding, storage, queries and freshness
  • Hosted search is cheaper at low volume; self-hosting wins at high query load
  • Embed only the content that gets traffic, and re-embed it when it changes
  • Estimate from chunk counts and query logs, not from vendor examples
  • A 10,000-document sample shows whether the setup works before the full spend

Frequently asked questions

How is semantic search different from keyword search?

Keyword search matches the exact words in a query against the words in a document. Semantic search compares the meaning of the query with the meaning of each document, so it can return a page that uses different words for the same idea.

Do I need a vector database for semantic search?

Most teams do. A vector database stores embeddings and finds the closest matches quickly, which is hard to do well with a general-purpose database at scale. Small indexes can run inside an application, but they slow down as content grows.

What embedding model should I start with?

Start with a widely used hosted embedding model at 768 numbers per vector. It is accurate enough for most help, product and document search, and it keeps storage and query costs lower than the largest models.

How often should I re-embed content?

Re-embed a document whenever its text changes in a way that affects meaning, such as a new price, a changed procedure or a corrected fact. For fast-changing catalogues that means daily; for stable help pages it means only when the page is edited.

Can semantic search work without AI training data?

Yes. You do not train a model for semantic search. You use a ready-made embedding model, embed your own content, and search over the result. The only data you need is the content itself.

Why is my semantic search returning poor results?

The usual causes are bad chunking, stale content or a query that is too vague. Check whether the right document is in the index, whether it was embedded after its last edit, and whether splitting it into smaller chunks would separate mixed topics.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning semantic search and unsure what the first year will cost? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call