AI Strategy

How I Use a Decision Model in My Own Product

A field report from my book platform: three places I replaced chatty AI calls with Jev's typed decisions — quote verification, section quality rating, and collection sorting — and the code I got to delete.

By Dr. Sanju Abraham 17 min read
Editorial, product-forward hero illustration — a stylized cross-section of a book-platform pipeline on an off-white background. Left side: an open book spread with a highlighted sentence drawn as a thin emerald rule. A thin pipeline runs rightward from the highlighted sentence into three small labelled boxes stacked vertically — top box 'VERIFY: quote accurate?' with a green dot; middle box 'RATE: section quality 0–100' with a blue slider mark; bottom box 'CHOOSE: collection' with one of three radio labels filled. Each box emits a tiny typed value (0.93, 78, 'Craft'). Thin pale slate separators between zones. Palette: off-white background, pale slate grays, emerald green accent (#10b981), navy ink (#0f172a), one blue accent for the slider (#2563eb). Clean, flat, geometric. Linear or Stripe editorial feel. No AI robots, no neural networks, no faces, no brains.
Three places inside my book platform where a decision model does one small, typed judgment instead of writing a paragraph about it.

By Dr. Sanju Abraham, Fractional CTO, investor, multiple exits. Published October 3, 2026.

The short answer: I run a small book platform. Three of its AI touch points used to be chat-model calls that returned paragraphs. Today they are decision-model calls that return typed values. The platform is faster, cheaper, and, the part I did not expect, much easier to test.

The win I kept returning to is what I now call the deletion dividend. It is the parsing code, prompt scaffolding, and defensive retries that quietly disappeared the moment the AI stopped writing explanations and just gave me answers.

I keep getting asked what it is actually like to run a product on top of a decision model. Not the pitch, the day-to-day. So this piece is a field report from one of my own. It is a book-authoring and reader-facing platform I build and maintain, and it now routes three of its everyday judgments through TypeSafe AI’s Jev.

I use it to decide if a quote I surfaced really appears in the source book. I also use it to rate the craft of a section I am about to recommend, and to sort finished books into reader-facing collections. Three calls, three shapes, one pattern. For the primitives behind each, see what Jev is in plain English.

THREE DECISION CALLS INSIDE ONE BOOK PLATFORMOne state (a sentence, a section, a finished book). One typed answer. No parsing.VERIFY · NOULIs this quote in the book?Inputquote + book textQuestion“Does this quote appearverbatim in the book?”Returns0.93(very likely yes)RATE · SCOREHow polished is this section?Inputsection textRubricCraft 0–100, withanchors at 20/50/80Returns78confidence: 0.88CHOOSE · CHOICEWhich collection fits?Inputfinished book metaOptions[“Craft”,“Story”,“Field”,“Memoir”]Returns“Craft”confidence: 0.96
Three calls, three shapes, one pattern. Each one replaced a chattier, flakier version of itself.

Using a decision model in my product at a glance

This list sums up how I use a decision model inside my own book platform. It covers the three calls, what changed in the code and tests, and what stayed on a chat model. The sections below give the detail, the one published price and the figures I measured in my own code.

  • Product: A book-authoring and reader-facing platform that I build and maintain
  • Provider: TypeSafe AI’s Jev
  • Three calls: Verify whether a pulled quote is accurate, Rate a section’s craft on a 0–100 scale, and Choose one of four collections (Craft, Story, Field, Memoir)
  • Biggest win: The deletion dividend, meaning the parsing code, prompt scaffolding and defensive retries that disappeared
  • Testing: Tests became assertions on typed values, not fuzzy matches on paragraphs
  • Price: TypeSafe’s launch price is $0.042 per million input tokens, with output tokens free, per eesel’s coverage of the launch
  • Still on a chat model: Draft generation, author voice and reader-facing explanations
  • Measured results: Code shrank by 25%, 14% and 4% over three passes, and latency per call fell to around 100 ms, rarely above 300 ms

What am I actually using a decision model for?

I am using it for the small judgments my code was already making, just badly. Before, each of those judgments was a brittle keyword rule, a chat completion I had to parse, or a human doing something tedious in a dashboard. After, each is one typed call.

The platform does three things with books end to end. It helps authors draft and revise, it packages finished books for readers, and it surfaces quotes and recommendations. Dozens of tiny decisions happen inside those products every minute. The ones I eventually moved to Jev all had the same shape. Each was a question with a bounded answer, running at scale, and the answer fed another piece of code, not a human reading prose.

I picked which calls to move using the frame from five everyday business tasks a decision API can do today. The mindset shift is in why I stopped asking AI to write and started asking it to decide. This article is the view from inside the pipe once I did.

Example one: is this quote actually in the book?

My platform surfaces quotes from a book to promote it on social, in previews, and inside the reader app. For months I had a stubborn problem. A chat model would occasionally invent a quote and confidently cite a page number, and the quote would be nowhere in the source. The failure mode was always the same, and it was always embarrassing.

How does the quote check route its answers?

The fix was a Verify call. The input is the pulled quote plus the book’s full text. The question is a single Noul: “Does this quote appear verbatim in the book?” Jev returns a probability between 0 and 1, which my code compares against fixed thresholds.

Above 0.9, the quote is cleared for publishing. Between 0.6 and 0.9, it goes to a human reviewer through the “For Review” queue in the authoring dashboard, with the suspected source paragraph highlighted. Below 0.6, the system drops the quote and picks another candidate. Those two cutoffs leave every quote with one of three outcomes. I wrote about that three-way routing in why a confidence score is more useful than a plain “yes”.

What changed in the code?

The first thing I noticed was not the quality improvement, which was real. It was that the quote-check module stopped being a special case.

Before, it had its own prompt file and its own retry logic for malformed JSON. It also had a parser for the four or five ways the chat model wrapped its answer in markdown. After, it is one function with one return value. A teammate reviewed the diff and asked where the rest of the code went. That is the deletion dividend showing up in a pull request.

Example two: how good is this section, really?

My platform recommends sections across books for readers who want a sampler. The question I needed answered was uncomfortably subjective: on a scale, how well-crafted is this particular section? Not the whole book, the section. The answer feeds the sampler directly, so it has to be a number my code can compare against a cutoff.

How did I replace the chat-model rating?

Before Jev, I asked a chat model to “please rate this section from 1 to 100 and explain your reasoning in a short paragraph.” The paragraph was fine, but the number was buried in it. My parser was a disaster. The scale drifted every time I touched the prompt. Half the time the model would refuse the number and give me a vibe-check instead.

I replaced that with a Score call on a 0–100 rubric. The prompt carries anchors, which are short definitions of what a low, a middling and a strong section look like on this scale. The diagram above uses 20, 50, and 80 as example anchor points, not my production values. The model returns a single integer and a confidence number.

Sections scoring above a cutoff flow into the sampler. Sections below it get an explanation request, a separate chat-model call, only when a human is going to look at them. The Rate call runs on every section, but the explanation call runs on maybe three a day.

What did the Rate call do for testing?

The pleasant surprise was testability. I now have a small golden set of sections with known-good ratings, and it runs every time I change the prompt or move to a new model version. If my 0–100 average drifts by more than a few points on the golden set, I know. Testing a chat model’s prose version of the same thing is a theological question, not an engineering one.

Example three: which collection does this book belong in?

At publish time, a finished book has to land in exactly one reader-facing collection. I use four at the moment: Craft, Story, Field, and Memoir. I kept them small on purpose, because every reader-facing surface in the product depends on them being mutually exclusive and legible at a glance.

The old version of this was two humans in a Google Doc arguing about taxonomy. It worked, but slowly. The new version is a Choice call. The input is the book’s metadata: title, logline, chapter headings, and a short synopsis I already have for other uses. The options are the four collection names, and Jev returns one of them with a confidence score.

At my own cutoff of 75% confidence or higher, the system assigns the book and tells the editor it did. Between that cutoff and a lower floor, it proposes a collection and asks the editor to confirm with one click. Below the floor, which is rare, it leaves the book uncollected and pings me.

Which three details generalize?

Three details are worth naming, so here they are. Each applies well beyond my platform and the choices I made on it.

  • I resisted expanding the option list. The temptation to add a fifth collection whenever one book did not quite fit was constant. Every option you add makes the model’s job harder and the shelf browse worse. I treat the list as a product decision, not a labeling convenience.
  • I did not use parallel Verify calls. I could have asked Noul-style “is this a Craft book? / is this a Memoir?” questions in parallel, as the three-shapes guide describes. But I want one collection per book, and Choose enforces that in the type system. Verify would have let overlap sneak in.
  • The editor’s one-click confirm is a feature, not a workaround. The middle-confidence screen is where I learned where my Choose call is wrong. Its data is what I use to retune the rubric. Human-in-the-loop here is the quality lever, not the embarrassment.
Before and after infographic: for the Verify, Rate and Choose features, the chat-model version needed a prompt, a JSON parser, a retry loop and a human check, while the decision-model version goes from question to typed value to code
Before vs. after on the same three features. The code that disappeared is the point.

What got easier once the AI stopped writing explanations?

Four specific things got easier, all of them boring in a good way. Boring is a compliment when you are running production software. The four are the amount of code, the latency of each call, the bill, and the tests. Each traces back to the AI returning a typed value instead of a paragraph.

What got smaller, faster, and cheaper?

These three changes show up in the code, in the response times, and on the invoice, and each one is easy to check against your own pipeline.

  • Lines of code went down. The prompt files shrank, the parsers vanished, and the retry wrappers for “the chat model returned JSON wrapped in markdown wrapped in an apology” are gone. In my own repo, I trimmed in passes: the first reduced the code by 25%, the second by 14%, and the third by 4%.
  • Latency per call dropped. Short typed outputs come back fast, because a decision call does not spend tokens on a paragraph it does not need. Calls now take around 100 ms, and I almost never saw anything over 300 ms.
  • Costs dropped more than I thought. Decision models are priced on short structured outputs, which my workload is. TypeSafe’s launch price of $0.042 per million input tokens, with output tokens free, is published in eesel’s coverage of the launch. For a quote check running on tens of thousands of candidates a week, that is a line item that stopped mattering.

How did testing change?

Tests became assertions. I write checks like expect(call.confidence).toBeGreaterThan(0.9) and expect(call.collection).toBe("Craft"). Previously I wrote regular expressions over paragraphs and prayed. See the official OpenAI Structured Outputs guide and the Anthropic strict tool-use docs for the equivalent guarantees in those stacks. The principle is the same across vendors.

What is the deletion dividend?

Collectively, that is the deletion dividend. It is the engineering value you capture not by writing new code, but by deleting old scaffolding the moment the AI’s output is typed by construction. I think it is the single most under-sold reason to adopt a decision model. I missed it in my own planning until I was midway through the migration.

What I kept exactly the same

The piece most of my friends who build in this space get wrong is thinking a decision model replaces their chat model. It does not. I still use a frontier chat model for everything a reader actually reads. That includes draft generation when an author is unblocked, suggested rewrites on hover, and longform explanations in the authoring dashboard. It also writes the one-paragraph “why we recommended this” blurb at the top of the sampler.

The split in my head now is simple. If a human reads it, it is a chat problem. If a function reads it, it is a decision problem. For the full side-by-side of why that split works, see chatbot vs decision model. The quieter case for models that do not talk at all is in not every AI needs to talk.

What I would do differently if I started again

Three things, all of them things I did eventually but later than I should have. None of them are complicated, but the mistake was assuming they would come for free.

  • I would write the typed schema before any prompt. The hour I spent naming the collection enum (“Craft, Story, Field, Memoir: these four, forever”) was the highest-leverage hour of the migration. Everything downstream snapped into place.
  • I would build the human-review surface on day one. I shipped the auto-confirm path first and bolted on review when I found where the model was wrong. I should have built it first, because the review queue is the sensor that keeps the model honest.
  • I would audit calibration earlier. The model’s self-reported 0.9 was not always a real nine-in-ten chance. I did not spot that until the quote check started leaking two or three false positives a week. For the broader frame, see why a confidence score is more useful than a plain “yes” and the AI strategy for SMB owners piece on when to invest in that audit.

Frequently asked questions

These are the questions builders ask most often about putting a decision model inside a real product. The answers cover what a decision model is and why I moved off a chat model. They also cover what I rebuilt, what the deletion dividend means, whether other vendors work, how testing changed, and what to leave on a chat model.

What is a decision model and how does it fit inside a real product?

A decision model is an AI that returns a typed value, such as a label, a number, or a probability, instead of a paragraph. It fits anywhere a small bounded judgment currently runs on a human, a brittle keyword rule, or a chat model whose output your code has to parse. The three shapes it answers are Choose, Rate, and Verify.

Why did you move your book platform from a chat model to a decision model?

I moved the three calls where a human never read the AI’s output. The quote-accuracy check, the section-quality rating, and the collection assignment all fed downstream code, not readers. A typed answer was always what I wanted. I was just paying a chat model to generate prose I then threw away. So moving to Jev made each call faster, cheaper, and testable.

Did you have to rebuild your whole AI pipeline?

No. I kept my chat-model calls for every reader-facing surface, such as draft generation, hover rewrites, and longform explanations. I swapped only the three places where my code consumed the AI’s output. Each swap took a day or two: write the schema, call Jev, delete the prompt scaffolding, and delete the parser. The chat parts of the pipeline did not have to change.

What is “the deletion dividend”?

It is a name I use for the engineering value you capture by deleting code when you move an AI call from prose to typed output. Specifically, it is the prompt scaffolding, JSON parsers, markdown-stripping, and retry logic that existed only to coerce a chat model’s output into a shape your code could use. Those lines disappear once the output is typed by construction.

Can I do this on OpenAI or Anthropic instead of Jev?

Yes. The three shapes, Choose, Rate, and Verify, map onto OpenAI’s Structured Outputs, Anthropic’s strict tool use, and Google Gemini’s structured output. The vendors differ on vocabulary and pricing, but the pattern is the same. I use Jev where I want decisions as the primary product and chat models where I want prose.

How did your tests change after the switch?

Tests became assertions on values. Before, I fuzzy-matched paragraphs with regular expressions and marked test runs flaky when the chat model phrased things differently. Now I assert that the confidence is above a threshold, that the Choose returns an expected label on a golden input, and that the Rate falls inside a sanity range. The test suite stopped being an argument and became a build gate.

Should I move all my AI calls to a decision model?

No. Move only the calls where downstream code, not a human, consumes the output. If a user is reading the AI’s words, keep a chat model. If a function is reading the AI’s answer, a decision model will almost always be faster, cheaper, and easier to test. The split is the point.


If you are planning the first decision-model call inside a product you are already shipping, that call-site-by-call-site judgment is exactly what a Fractional CTO is paid to help with. One good hour on the typed schema and the review surface will save a quarter of engineering time. More pieces in this thread live in the AI Strategy archive.

  • #jev
  • #decision-api
  • #ai
  • #product
  • #builders
  • #case-study

Need a CTO without the headcount?

Schedule a 30-minute intro call. We'll listen first, recommend second.