Skip to content

The same AI workload, before and after routing + caching

Twelve customer reviews, one sentiment label each, run twice over. The baseline sends every review to the connection's big model (gpt-5). The optimized copy says what kind of job it is (taskClass: sentiment), lets the routing profile pick the cheapest model that can do it (gpt-5-nano), and turns on the response cache, so asking the same question again costs nothing. The usage ledger shows both bills side by side. The model is a stand-in in the demo stack, so there is no key and no bill; the routing, pricing and caching are the platform's own.

The pipeline

This is the actual graph the template creates — 2 steps.

Connects to

  • PostgreSQL
  • AI model

Also includes

  • 2 pipelines

How you know it worked

Run both pipelines once, then run demo-ai-cost-routing-cache-optimized a second time. Each run labels the same twelve reviews: 1, 4, 6, 8 and 11 positive; 3 and 10 neutral; the rest negative.

Try this template

Used in: Retail & e-commerce

Stop moving data by hand.

Start free with three projects, or talk to us about running it across your organisation.