Blog 11 min read

B2B RAG stack cost modeling: Embed + Rerank + LLM

Method for exporters and B2B SaaS to model knowledge-base / support-agent RAG cost as Embed (ingest + query) + Rerank + Generation—unify $/1M tokens, free tiers, and Batch, then estimate cost per 1,000 tickets.

Knowledge-base bots and support agents on B2B inquiry sites almost never bill as “one LLM call.” Each ticket usually touches three meters: embedding (ingest + query), optional rerank, and generation. Teams that only model the chat model under-price the stack—or over-build retrieval that never pays for itself.

This method is for exporters, OEM portals, and B2B SaaS who want a RAG stack cost model they can defend in a spreadsheet: unify units, fill a per-1,000-tickets worksheet with your measured tokens, and soft-check public calculators. It is a planning framework—not a price list. Do not treat category examples as live vendor rates; always re-check official pricing pages before you commit budget.

Why “one LLM bill” misleads RAG planners

A support agent that answers from your catalog, FAQ, and past RFQ replies typically runs something like: chunk and embed documents → embed the inquiry → retrieve candidates → (often) rerank → generate a grounded reply. Each step can bill differently (tokens, free tiers, Batch). Modeling only generation is how teams are surprised when re-indexing a 50k-chunk knowledge base or when every ticket embeds a long email thread.

  • Ingest is bursty. First load and periodic re-embed dominate early months; steady-state is mostly query-side.
  • Query embed + rerank scale with tickets. Depth (chunks retrieved, documents scored) multiplies cost even when the answer model stays fixed.
  • Generation still dominates many stacks—but only after you write down retrieval assumptions; otherwise “cheap RAG” is hope, not math.

1. The three layers: Embed + Rerank + Generation

Keep one row family per layer. Name what you actually call in production; leave blank what you skip.

Layer What bills Typical drivers
Embed (ingest) Tokens (or chars→tokens) when you index / re-index the knowledge base Corpus size, chunk size, re-embed cadence, Batch vs interactive
Embed (query) Tokens to embed each inquiry (and sometimes follow-ups) Tickets / month, avg inquiry length, multi-turn re-embeds
Rerank Often tokens or “query × documents scored” style meters—check the vendor’s unit Tickets × candidates sent to the reranker; lite vs full models
Generation Input + output (and sometimes cached / thinking) tokens for the answer model Context packed from retrieved chunks, system prompt, reply length, Standard vs Batch

Sibling posts stay separate jobs: LLM API cost modeling for B2B / SaaS features meters a feature-level chat or rewrite button; this article meters the retrieval stack behind a knowledge / support agent. Aggregator quote comparison and machine-readable pricing cover buying and publishing prices—not RAG layer math.

2. Unify units before you add anything up

Quotes and dashboards mix per-1K, per-1M, free allotments, and Batch discounts. Normalize first:

  • $/1M tokens as the default column for embed and generation. Convert per-1K by ×1,000. If a reranker bills per request × documents, record that unit explicitly—do not pretend it is $/1M until you convert with your measured tokens-per-score.
  • Free tiers as a monthly (or lifetime) credit line you subtract only while they still apply. Footnote the end date; do not bake “forever free” into year-two runway.
  • Batch / deferred discounts only for jobs that can wait (nightly re-index, offline FAQ refresh). Interactive ticket replies usually need Standard (or equivalent) latency on query embed, rerank, and generation.

Category examples (illustrative shape only—verify on the vendor’s public pricing page before you budget): embedding vendors often publish a $/1M rate plus a free token allotment; some list Batch at a fraction of Standard (e.g. “pay ~67% of list” style footnotes). Rerank SKUs may be a separate $/1M or request-based meter. Generation follows the familiar input/output (and optional cached) table. None of those shapes are a quote in this post.

Soft-check token math with public calculators, then paste official rates into your sheet:

3. Worksheet: cost per 1,000 tickets / inquiries

One tab is enough. Pick a volume unit your ops team already tracks—support tickets, inbound RFQs, or chat sessions—and stick to it. Framework numbers below are for structure only; replace every token and rate cell with your measurements and the vendor’s current public table.

Input What to put Notes
Volume 1,000 tickets (or scale from your monthly P50 / P90) Keep “per 1k” as the reporting unit so finance can multiply
Ingest embed tokens Corpus tokens re-embedded in the same period ÷ periods that serve those 1k tickets Amortize first-load; do not pretend ingest is $0 after week one if you re-chunk monthly
Query embed tokens / ticket Avg inquiry (+ follow-up) tokens × embeds per ticket Measure from logs; long email RFQs dominate short chat pings
Rerank usage / ticket Candidates scored × tokens (or the vendor’s request unit) Cutting top-k from 50→20 often saves more than switching the chat model
Gen tokens in / out / ticket System + retrieved chunks + user → reply Separate input vs output; include tool/thinking if billed
$ / 1M (each layer) From public pricing for the path you will ship Standard for live tickets; Batch only where UX can wait
Free tier / credits Remaining monthly allotment allocated to this agent Zero the line when the promo or free band ends
Outputs Cost / ticket, cost / 1,000 tickets, monthly ceiling at P90 Ceiling = P90 tickets × cost/ticket (after free-tier burn-down)

Illustrative arithmetic shape (not a vendor quote): suppose each ticket uses ~800 query-embed tokens, rerank meters as “equivalent” ~4,000 tokens of scored context, and generation averages 3,000 input + 400 output tokens—plus a small amortized ingest line of 200 embed tokens per ticket. Your sheet becomes five multiplications against five $/1M cells you copied from public docs, minus any free-tier remainder. Change retrieval depth or chunk packing and re-run; do not ship on blog-post averages.

4. Decision rules for exporters and B2B SaaS

  1. Separate ingest budget from ticket budget. First-index and quarterly re-embed belong on a project line. Ticket P&L should show query embed + rerank + generation so support volume forecasts stay honest.
  2. Tune retrieval before you chase a cheaper chat model. If cost/ticket is high, try fewer chunks, a lite reranker, or shorter system prompts—then re-measure generation input tokens. Model downgrades are a last lever when quality SLAs allow.
  3. Use Batch only where latency is optional. Nightly corpus refresh and offline FAQ drafts are Batch-friendly. Live inquiry replies on an export site usually are not.
  4. Cap runaway tickets. Hard ceilings, smaller context packs for low-priority queues, and “retrieve less / escalate to human” paths protect margin when a viral SKU page spikes RFQ volume.
  5. Re-measure after prompt or corpus change. Adding CAD PDFs, multi-language FAQs, or tool calls shifts every layer. Treat the worksheet as living ops, not a one-time launch deck.

How this differs from other posts on this blog

Where Yizhan fits

Once stack economics are clear, buyers still need crawlable product-family, FAQ, and capability pages the agent (and humans) can ground on. Yizhan builds English B2B inquiry sites—semantic HTML, schema, FAQ, sitemap—so evidence pages stay readable for search and for retrieval corpora, with one admin for inquiries.

If you have a per-1,000-tickets worksheet and a knowledge corpus you want published as inquiry-ready pages, skim the platform overview, then leave a request with ticket volume assumptions, which layers you run (embed / rerank / generation), and the two or three page types you would index first. Bring real usage ranges; that makes scoping faster.

Model all three layers before you promise “AI support on every RFQ.” Ship the retrieval depth and latency path the margin can defend—and keep the evidence pages agents and buyers can still cite when the demo corpus grows.

Next step

Want a crawlable inquiry site for that topic?

Tell us the product, target market, and how many sites you need. We build English inquiry pages search engines and AI crawlers can read—then route buyer messages into one admin.