The support ticket that solves itself: log the prompt behind every AI event
A user says your AI feature "broke" on Tuesday. You have a charge for the call, a timestamp, and no idea what they asked or what the model said. The evidence existed for exactly one request - the one you didn’t log.
You meter the call but lose the conversation
Metering tells you a user spent 4,000 tokens at 14:32. It does not tell you that they pasted a French contract and got an English summary, which is the actual content of the support ticket in your inbox. Most teams either log nothing (undebuggable) or dump every prompt to their general logging stack (expensive, retention-unbounded, and now your logs are full of user content with no deletion story). The right home for the prompt is attached to the metering event itself - same user, same timestamp, same event id, fetched only when a human opens that specific event.
Two strings on the call you already make
Prompt logging is opt-in per app (a toggle in the dashboard), and once enabled, track / reserve / commit accept optional prompt and response strings. The reserve/commit split maps naturally onto the AI call lifecycle: the prompt exists before the call, the response after. Fields are capped at 32KB and truncated server-side, so a runaway context window cannot blow up a row.
const r = await vevee.reserve(userId, 'llm_tokens', 4000, undefined, {
prompt: userPrompt, // captured before the model runs
});
if (!r.allowed) return paywall();
const completion = await openai.chat.completions.create({ model, messages });
await vevee.commit(r.reservationId!, {
response: completion.choices[0].message.content ?? '',
actual: { quantity: completion.usage!.total_tokens },
});Deliberately off the hot path
The design constraint that makes this safe to enable: logs live in their own table and no usage query ever joins it. Charts, counters, canUse checks - none of them touch log rows. The only code that reads a log is the dashboard’s event-detail view, when a human clicks one specific event. That means enabling prompt logging changes your p99 by nothing, and a billion logged prompts cannot slow down the gate in front of your AI calls.
The Tuesday ticket, replayed
With logging on, the ticket workflow inverts. Search the user in the dashboard, open their event timeline, click the Tuesday event - and there is the prompt that produced the complaint and the exact response the model returned. Half the tickets dissolve immediately: the model was fine and the prompt was missing context, or the user hit a weaker model on the free tier, or the "garbage" was a truncated response from their own client code. The other half become real bug reports with a reproducible input attached. Either way you answered in minutes, from evidence, instead of asking the user to "try to remember what you typed".
Retention is a policy, not an accident
User content should expire on purpose. Vevee logs carry plan-based retention - 7 days on free, 30 on pro - enforced by a cleanup endpoint you trigger on your own schedule, so old prompts are deleted by design rather than discovered in a backup years later. Worth stating plainly in your privacy policy; "we keep AI prompts for 7 days for debugging" is an easy sentence to defend precisely because the system makes it true. And since logging is opt-in per app, the apps that never need it never store a byte of it.
Keep reading
Reading a split funnel
The funnel chart tells you how many got through. The split table under it tells you who. Here is a row by row reading of one, from a study app's mock month.
AnalyticsHybrid mode for privacy: put your own server in the middle
The browser never talks to Vevee. It talks to a forty-line route on the app's own server, which decides what leaves and what does not.