返回资讯中心
外部精选
软件工程
#开发者实时流

To Make, or to Buy: The Economics of Decision Models

and decision models in particular have been the talk of the town. As

Hacker News 最新pncnmnp2026/10/18 · 2026/10/1830 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

In the past few weeks, Jev and decision models in particular have been the talk of the town. As things are cooling down a bit, I thought it would be fun to systematically explore and forecast where all of this leads to.

The magic, as we all would agree, seems to be in the output, of which there can be three kinds: choice, score and noul. With choice, we provide a fixed list of options and the output is a probability for each option, summing to 1. The score is for rating something against an ordered list of levels, using a probability-weighted average of those levels. And finally, the noul,

which some say is named after the Bernoulli trial, returns a number between 0 and 1: the probability that a given statement is true.

Here is an example using Jev 1.13 from OpenRouter:

REQUEST: { "model": "typesafe/jev-1.13", "state": "Some damn good curly fries - seasoning was something.", "questions": {"answer": {"type": "score", "instructions": "How enthusiastic is the reviewer?", "criteria": ["Lukewarm", "Happy", "Thrilled"] }}} RESPONSE: { "model": "typesafe/jev-1.13-20260917", "answers": {"answer": {"type": "score", "score": 1.48, "legend": {"0": "Lukewarm", "1": "Happy", "2": "Thrilled"}, "probabilities": {"0": 0, "1": 0.51, "2": 0.49}, "confidence": 0.27}}, ..... }

There are a couple of interesting consequences as a result of this model. First, it's a well-defined output! We state the possible answers before asking the question, and the model has to pick among them. Second, every answer carries odds. As we will see later, we can leverage this to do some interesting arithmetic on them. Third, as the expense is in reading the state and consuming the input tokens, the output tokens are essentially free. Case in point: I did some napkin math on the above example. Assuming that a regular LLM would require 250 input tokens and 50 output tokens to produce this response, and that we have 400,000 such queries to process, the resulting 100M input tokens and 20M output tokens would cost $13 on GPT-5 nano ($8.5 with cached tokens) vs. $4.2 via Jev. And finally, it is fast!

Perhaps the most exciting revelation I had, is that this gives rise to a new form of memory hierarchy, which I have labeled as decision hierarchy.

As a refresher, pick your favorite textbook and flip to its memory management page. Here is what Tanenbaum has to say about memory hierarchies in his Modern Operating Systems book:

These learnings can be applied in the realm of LLMs too. Assume that you have an L-cache consisting of a mixture of hand-written rules, and exact/semantic matching of past answers to the same question and its state. If so, Jev and Decision models can be imagined as the RAM, LLM as disk, and magnetic tapes as human beings. Each level handles what its confident about and passes the misses down to the level below.

But how do we decide on a confidence factor and pick a threshold? This is where Chow's rule from 1970 comes in. Let us motivate the idea first. Imagine a classifier (C) with (n) classes. For each input, the classifier generates a probability for each of the (n) classes. When the largest class has a probability close to 1, the model is sure about its decision, and mistakes are rare. However, when all the classes have equal probability, say (1/n), any answer is close to a guess. So, the errors come from the uncertain inputs. And to mitigate it, we need a higher form of intelligence - from decision models, to LLMs, and in the worst case humans. As I like to put it, the more “philosophically-NP” (not in a formal sense) a question is, the higher form of intelligence it needs to make a non-ambiguous judgement call.

But how do we decide whether we should give a response at a particular level or abstain from doing so?

A simple way would be using threshold (T). For each input, we look at the top probability, say (p_{max}). If (p_{max} \leq T), we reject and hand the input on to the next level. If (p_{max} \gt T), we answer with the top probability outcome. With this approach, we get a dial that moves from (T = 1/n) to (T = 1). The higher the dial, the more rejects we get and fewer errors on what we keep.

However, this simple threshold approach does not take into consideration the price of the outcome. Particularly,

what is the cost of us answering a question wrong at a level, and the cost of declining to answer at a level. Say, a wrong answer costs 1, rejecting costs a fraction (F), and a right answer costs 0. If we answer with class (k), we are wrong with probability of (1 - p_k). The probability of being wrong would be at its smallest for the top class, (1 - p_{max}). Therefore, a second approach would be to answer only if we beat the price of rejecting. In other words, answer when (1 - p_{max} \lt F).

Take an example where (F=0.2) and (p_{max}=0.6). As answering costs (1 - p_{max} = 0.4) on average and rejecting costs 0.2, we reject.

Next, we need to evaluate what rejection ((F)) really costs. When we are sending a decision to the next level, we need to take into consideration the cost of an error in that level ((NX_{errcost})), the cost we pay to evaluate any input in that level ((NX_{price})), and finally the error rate on the next level itself ((NX_{err})).

Consider this - say we have 100 software tickets to evaluate and make decisions upon. And we are working at the Jev and LLM layers. Imagine that for all our tickets, Jev is 60% sure about its decision ((p_{max} = 0.6)). A wrong routing costs $2. The LLM charges $0.01 per ticket ((NX_{price})) and is wrong 5% of the time ((NX_{err})). The LLM-level also incurs a $2 cost ((NX_{errcost})) when an error is produced at its level. What is the cost incurred in each extreme scenario?

Per ticket, that's $0.80 for answering versus $0.11 for handing on to the next level, so we hand on. Notice that we did not take Jev's fees into account. This is because it's paid in both options, so it can't change which one is cheaper.

Now let us derive (F) so that we can apply this in a more general scenario.

Remember that handing on to the next level charges us twice: we pay the fee and absorb the LLM's mistakes.

Therefore, (F = NX_{err} + NX_{price} / NX_{errcost}).

Substituting it in the original equation, we get Chow's rule: [1

  • p_{max} \lt NX_{err} + NX_{price} / NX_{errcost}]

For the above example, (1 - p_{max} = 1 - 0.6 = 0.4). And (NX_{err} + NX_{price} / NX_{errcost} = 0.05 + 0.005 = 0.055). As (0.4 \gt 0.055), we hand on to the next level, which is the same decision as $0.80 versus $0.11.

Notice that when errors are expensive, LLM's price barely matters. The only question is who's more accurate on this input. This is because (NX_{price} / NX_{errcost}) shrinks toward zero, so (F \sim NX_{err}). In other words, when errors are expensive, a cheaper LLM barely helps, but a more accurate one helps a lot.

However, when errors are cheap, (NX_{price} / NX_{errcost} \gt NX_{err}). Re-arranging it gives us - (NX_{errcost} \lt NX_{price} / NX_{err}). In other words, LLM's fee only matters more than its mistakes when a wrong answer costs under a certain amount. For our above example, that's $0.01 / 0.05 or 20 cents. Our tickets cost $2 per wrong answer, well above that, so accuracy decides.

To paraphrase Adam Smith, act only when what we gain from it is more than what we pay in return.

In our decision hierarchy, the LLM is selling one product - fewer mistakes. Each level is a supplier with 3 numbers: a price, an error rate, and the cost of each error it makes. The threshold we discussed above is a break-even point - the point where what the next level saves equals what it charges you.

So far, we have assumed that the decisions made at every level are noiseless. Chow's rule only escalates the inputs that a level is unsure about. However, in the real world, any level is capable of making confident mistakes. This is especially true when two levels share a similar training. One way to mitigate this is by using a random audit. Imagine a small random slice, say 1% of Jev's confident decisions, being sent to the next level anyway. This will help calculate a better estimate of the error rate, and tune the costs.

Chow's rule also assumes that every mistake costs the same. This does not hold up in the real world either. Say, a ticket that needed to be sent to the legal team got routed to the tech team instead. Depending on the circumstances, that can cost a lot more than a ticket that was supposed to be sent to the tech team, but got routed to data analytics instead.

Before we manipulate Chow's rule to mitigate this issue, notice how both (NX_{price}) and (NX_{err}) don't depend on any output category. As per (NX_{price}), the LLM charges the same fee for every ticket. Similarly, as long as we assume that LLM is equally accurate on every category, (NX_{err}) doesn't change. So, we only need (NX_{errcost}) to reflect the output category overhead. Given this, here is the update to Chow's rule:

Notice how if every category has the same (NX_{errcost}), then (C' = NX_{errcost}). In which case, we get back our original Chow's rule of (1 - p_{max} \lt NX_{err} + NX_{price} / NX_{errcost}).

To illustrate the new derivation, let us focus on 3 categories: tech, analytics, and legal. Assume that the LLM still charges us $0.01 ((NX_{price})), is wrong 5% of the time ((NX_{err})), and the output probability on an input is tech 0.6, analytics 0.25, and legal 0.15 respectively. Also assume that if the ticket really is tech, (NX_{errcost}) will cost us say $2 (same as before). Similarly, if the ticket really is analytics or legal, (NX_{errcost}) will cost us $2 and $100 respectively. As they say

  • “I was never ruined but twice - once when I lost a lawsuit, once when I won one.”

(C') would be (\sum_c p_c \times NX_{errcost}(c)), or (0.6 × $2 + 0.25 × $2 + 0.15 × $100), or $16.70. The max category is tech, so answering in tech costs us (C' - p_{max} \times NX_{errcost}(Tech)) = $16.7 - $1.2 = $15.5. Furthermore, handing on to the next level costs us, (NX_{err} \times C' + NX_{price}) = 0.05 × $16.70 + $0.01 = $0.835

  • $0.01 = $0.845.

As $15.50 > $0.845, we hand on to the next level. This is the same conclusion that we previously made; however, the 15% chance of a legal ticket makes answering nearly 20 times more expensive (15.5/0.8) than before.

Nonetheless, there is a catch with the new derivation. Till now, our decision at every level was based on - should the level answer with its top class or hand on? But with the introduction of a cost table, the top class is not always the cheapest answer. We can have scenarios where the new rule would hand on to the next level, when answering with a different category would be considered cheaper.

To see this, assume that we have the same cost table as before ($2, $2, $100), but the probability distribution has changed to tech 0.5, analytics 0.05, and legal 0.45. (C') would be (0.5 × $2 + 0.05 × $2 + 0.45 × $100), or $46.10. Handing on would cost $0.01 + 0.05 x $46.10 = $2.32. Answering with the max costs 0.05 × $2 + 0.45 × $100, or $45.10. Answering with legal costs $1.10. As $1.10 < $2.32, the best decision would be to route to legal. However, with max only - we would have decided to simply hand on to the next level.

One way to deal with this is by letting the math work out as intended - that is, we route to legal, when it's cheaper to do so. But the dilemma is that if we route too much, their queue grows, and it ends up turning into a dumping ground for tickets. This would certainly occur if the training of models at any level is subpar. One way to mitigate such issues is by relying on our audit trick. If legal is bouncing back lots of ticket

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →