Use Cases + Implementation

How do you reduce the cost of document Q&A with model routing?

Document Q&A cost has two halves: retrieval (embedding and index upkeep) and generation (context plus answer). Embed once and reuse vectors, retrieve fewer and better chunks, and route question types to tiers — lookups and confirmations cheap, synthesis and multi-document reasoning strong. Trim retrieved context ruthlessly, because context is paid for on every question.

Key facts

Router modelplugsky-fusion escalates per question across tiers (live)
EmbeddingsLive embeddings API; embed documents once and query with the same model
Context controlRetrieve fewer chunks and deduplicate before generation
Models30+ models; lookup questions run cheap, synthesis escalates
PricingFlat monthly self-serve plans with no per-token charges on self-serve
Free tierplugsky-micro and plugsky-lite on the free plan, no card required
Long contextplugsky-longctx for wide synthesis when many passages are required
RoadmapFiles and batch endpoints are coming soon; keep ingestion in your pipeline

TL;DR

  • Embed documents once; never re-embed unchanged content.
  • Retrieve fewer, better chunks — context is paid on every question.
  • Route factual lookups cheap and synthesis strong.
  • Cache embeddings of frequent questions to skip retrieval work.
  • Measure cost per answered question at fixed answer quality.

How it works, step by step

  1. Split questions into types: lookup, comparison, synthesis, troubleshooting.
  2. Embed the corpus once with a fixed model and store vectors plus metadata.
  3. Tune chunk size and top-k together, measuring retrieval recall and context size.
  4. Deduplicate retrieved passages and drop anything below a relevance threshold.
  5. Route lookup questions to cheap tiers and synthesis to stronger tiers or plugsky-longctx.
  6. Cache question embeddings and common answers where freshness allows.
  7. Track cost per answered question and citation accuracy after each change.
1Split questionsinto types: lookup,comparison,2Embed the corpusonce with a fixedmodel and store3Tune chunk size andtop-k together,measuring retrieval4Deduplicateretrieved passagesand drop anything5Route lookupquestions to cheaptiers and synthesis6Cache questionembeddings andcommon answers

Try it yourself

Open the RAG cost calculator →

Retrieval versus generation spend

Embedding a corpus is a one-time cost that only repeats when documents change; answering questions is the recurring cost. Teams often optimise the wrong side by chasing embedding savings while every question sends five long passages into a frontier model. Discipline in retrieval pays every time.

Two numbers determine generation cost: how many chunks you retrieve and how large they are. Tune both against recall. Larger chunks improve context but multiply cost on every question; more chunks increase the chance of including the answer and the chance of including noise. Measure recall and cost together, not separately.

Routing question types

Not every question deserves the same model. Factual lookups, confirmations and single-passage questions run well on cheap tiers with tight context. Comparisons across documents and open-ended synthesis need stronger models and sometimes a long-context model that can hold many passages at once.

  • Cheap tier: single-fact lookups, yes/no confirmations, status questions.
  • Mid tier: multi-passage summaries and comparisons.
  • Strong tier: reasoning across documents and ambiguity resolution.
  • Long-context model: when synthesis genuinely needs many passages rather than better ones.

Caching, indexing and measurement

Question traffic repeats: the same policies, the same product questions, the same edge cases. Cache question embeddings so near-duplicate questions reuse retrieval, and cache answers with a short time-to-live where documents change slowly. Re-embed only changed documents, tracked by hash, and keep the index lean by removing retired content.

Measure cost per answered question at a fixed quality bar — citation accuracy and refusal quality on a golden set. A pipeline that answers cheaply but cites the wrong document is not saving anything. Start on the free plan with plugsky-micro and plugsky-lite, then evaluate stronger tiers and plugsky-longctx during the 14-day full-access trial; the live pricing page lists plans.

Honest comparison

Q&A choiceRouted Q&A on PlugskyFrontier model for every questionCheap model for every question
Lookup questionsCheap tier, tight contextFrontier price for factsAdequate
SynthesisEscalated or long-context modelNative strengthShallow answers
Context sizeDeduplicated, thresholded chunksOften oversizedOften oversized
Repeat questionsCached embeddings and answersPaid againPaid again
EvidenceCitation accuracy per tierRarely measuredRarely measured

Frequently asked questions

What dominates document Q&A cost?

Generation with retrieved context, because it repeats on every question. Embedding is largely a one-time cost for unchanged documents, so retrieval discipline and query tiering matter most.

How many chunks should I retrieve?

Start with a small top-k and measure recall against known answers. More chunks raise the chance of including the answer but also the cost and the noise on every question.

Should simple questions use a cheap model?

Yes. Single-fact lookups and confirmations do not need a frontier model. Escalate comparisons and synthesis, and evaluate quality per question type before widening.

When should I use a long-context model?

When synthesis genuinely needs many passages at once. plugsky-longctx lets you widen context deliberately rather than routinely on every question.

Can I cache answers?

Cache question embeddings always, and cache answers with a time-to-live where the underlying documents change slowly. Invalidate on document updates.

How do I keep the index affordable?

Embed once, re-embed only changed documents by hash, and remove retired content. Index upkeep should be proportional to change, not to query volume.

How do I measure Q&A quality?

Track citation accuracy, answer correctness and refusal quality on a golden question set, and compare cost per answered question at the same quality bar.

Can I start for free?

Yes. plugsky-micro and plugsky-lite are on the free plan with no card, and the 14-day full-access trial covers stronger and long-context models.