A referral drafting pipeline takes a request ("can you introduce me to someone at Acme?") and produces a short, personalized message. The value comes from personalization, which means the pipeline must retrieve context: who the referrer is, what they bought, who they know, what the double-sided reward currently is, and how the ask should be phrased.
Referral programs are a well-understood growth mechanic, and double-sided rewards (both referrer and referee get something) are the common default because reciprocity makes the ask feel like a gift rather than a transaction (Referral Factory, Voucherify). That matters for cost because a good draft must state the reward accurately, and the reward terms change. Any number the model writes about the reward has to come from retrieved context, not from the model's memory.
The standard architecture is retrieval-augmented generation: embed your documents, embed the query, retrieve the closest passages, and pass those passages to a generation model along with the request (Ready Tensor, K2view). Each stage has its own token bill, and they behave differently:
| Stage | What you pay for | Paid once or per ask | Scales with |
|---|---|---|---|
| Corpus embedding | Input tokens only, no output | Once per corpus build, then re-embed on change | Number of documents and their length |
| Query embedding | Input tokens only, tiny per query | Per ask | Number of asks and query length |
| Retrieval | Usually free at the token layer, but rerankers are not | Per ask | Passage count and rerank depth |
| Generation | Input (prompt plus retrieved passages) and output | Per ask | Passage count, prompt length, output length, retries |
The practitioner's insight is that only the last row moves much with volume. Embeddings have no output tokens at all, so their cost is purely input multiplied by volume (CostGoat). If you price a pipeline by staring at generation prices, you will overestimate embedding and underestimate retries.



