Build Once, Sell Twice: caching LLM analysis with pgvector

Dev.to AI
Generative AI AI Business AI Tools

A few months ago I was staring at a spreadsheet trying to figure out why our unit economics looked terrible. Every new AI feature was increasing revenue - and quietly destroying our margins. The product details don't matter but the shape will be familiar to anyone building AI-powered features. Imagine you're building an Instagram DM CRM that qualifies leads, scores intent, drafts follow-ups, and alerts sales reps when hot leads land. Customers pay per seat, plus add-ons like pipeline reports or lead reactivation audits. Each DM costs ~$0.02 to analyze with AI.