I've found that using structured outputs solves this problem much better. Instead of letting a model generate only "A", "B" or "C" and looking at the probs, have it directly generate "Legitimate", "Spam" or "Phishing" or any other pre-defined option from a set of multi-token sequences. Behind the scenes it boils down to something quite similar, but you're not running into the risk that the model actually wanted to say "A phishing attempt seems likely, so answer (C) is correct.", which would lead "A" to have the highest probability in the first token. You can even use a reasoning budget this way either via inherent reasoning or a free-form part preceding the remaining output structure. You can also have it assign probabilities (either in words or numbers) using more complex output structures, but I would not rely on them much more than the token logprobs (they can still be quite good though).
Jev in 25 Lines of Python (nobodywho.ai)
sigmoid10 12 hours ago
_flux 12 hours ago
Actually to me it sounds it could be benchmarked if this kind of effect exists in the first place.
sigmoid10 12 hours ago
_davide_ 12 hours ago
To completely squash the issue, a few cheap LoRa iterations will do the trick just fine.
wongarsu 12 hours ago
I think we can all agree that Jev is not rocket science. It's a good idea executed well, with marketing that might have been a tad too bold
porridgeraisin 12 hours ago
wongarsu 11 hours ago
And further down "TypeSafe computes confidence from how the probability is spread across the options. All of it on one option gives 1.0; the more evenly it spreads, the lower the confidence. This demo uses (3 × largest probability − 1) / 2 to approximate confidence for three options."
So while we don't know the exact formula they use, it is just a function over the probabilities
I am open to the argument that this does not work well if you just plug in a qwen model instead of a model that is trained to output more statistically useful token distributions
porridgeraisin 11 hours ago
we agree then, that is the entirety of my argument. Getting a deep net especially one that is anywhere near even SLM size to be calibrated is tough, especially across domains. They claim calibration across a variety of datasets which is interesting.
kantahayashi 8 hours ago
It means confidence is just a converted max probability and not an independent signal.
ainch 12 hours ago
I ran some tests using GPT-4 to do some basic classification a couple years ago. On ambiguous options which had to be escalated to a human, the LLM would regularly output something like a 99.8% probability, compared to 99.99% for a correct answer.
nautilus50 12 hours ago
https://til.simonwillison.net/llms/llama-cpp-python-grammars
porridgeraisin 12 hours ago
petesergeant 12 hours ago
dchftcs 11 hours ago
dTal 11 hours ago
I got this technique to work extremely reliably last year. However there were a bunch of caveats: 1) Firstly, you must institute a check that the multiple choice tokens dominate the output distribution. They should sum to 95% or more, ideally 99%, or the LLM is not following instructions properly. This is also the problem with constrained decoding - if the LLM really doesn't want to output a valid answer, the one you extract will not be high quality. 2) You need to ask it multiple times, permuting which option corresponds to which letter, and average the results. LLMs are surprisingly biased towards picking "A", especially if they're otherwise not sure. 3) For the same reason, performance improves if you frame the prompt as if it were the middle of a quiz. "Question 1" carries baggage that "Question 12" doesn't. 4) You must be exceedingly careful with tokenization.
But when all was said and done, I got a general purpose A/B classifier that gave high resolution quantitative output for the cost of a couple dozen tokens ingested and a couple inference passes.
TeMPOraL 10 hours ago
GP pointed at a causal explanation for this: almost every sentence in English that's a statement will start with "A" or "An", so "biased towards picking ''A''" will include most attempts at saying anything long-form for any reason.
dTal 9 hours ago
Meanwhile, the bias could be as much as 70% in favor of A in ambiguous cases - a signal completely drowning the <1% inclination to violate the format.
podocarp 8 hours ago
LoganDark 8 hours ago
sigmoid10 9 hours ago
The whole point of my argument is that neither is good, but from a technical perspective logprobs is probably the worst unless you train a model on specific outputs. In which case you'd throw out the generality again, so when I think about it more, it's actually the worst overall. In my experiments, having the model simply assign "high" or "low" probability in a structured output generally performs best. You can try numbers, but you will never get anything close to what you could expect from traditional ML. And most certainly not from logprobs.
nostrebored 3 hours ago
boredumb 7 hours ago
Not nearly as sophisticated as myself who would mutter "When in doubt - Charlie out" before marking C.
dragonwriter 6 hours ago
Also, Jev/laya do it in one forward pass, for multiple questions about the same state, rather than multiple passes for one question about that state. Well, for the usual multilingual configuration, two forward passes through different small models for laya, but that's because one is the router which chooses which model should do the real work, but still.
dTal 2 hours ago
I contribute my experience here only because I've seen a lot of chatter lately about doing exactly this sort of thing, and I thought I'd share how I made it work for me. There are a lot of ways it can silently fail and give bad numbers if you aren't careful, and I wouldn't want people to think it doesn't work just because they used a vibe coded GitHub project from the last 48 hours that doesn't take these things into account.
foo12bar 9 hours ago
Prompt part: "What is better, toast or bread?"
Incomplete answer part: "The answer to this question is "
and then have the LLM finish the answer. I did this with subtitle translation using llama.cpp (with Python) and had great success. Just past 5 already translated subtitles as the incomplete answer, and the LLM infallibly just continues to translate. No markdown, and usually no talkback if the subtitles contain nasty subjects like bioweapons or nuclear stuff. It just works.
ActivePattern 8 hours ago
There, I fixed your problem.
Onavo 3 hours ago
antirez 11 hours ago
Another trick that works is to repeat the question two times: "I'm repeating the task and labels for clarity: ..."
ThePhysicist 10 hours ago
techterrier 10 hours ago
xyzsparetimexyz 10 hours ago
_superposition_ 10 hours ago
UpsideDownRide 9 hours ago
SeriousM 10 hours ago
lgas 8 hours ago
peterleiser 7 hours ago
tanseydavid 7 hours ago
linuxrebe1 2 hours ago
rzzzt 36 minutes ago
mlmonkey 5 hours ago
0x20cowboy 2 hours ago
busfahrer 7 hours ago
starik36 4 hours ago
I am glad there is an actual reason.
__jf__ 5 hours ago
Payroll sends you an email with a link to a Youtube video that plays a song.
Options after body:
Average probabilities:
Rickroll 0.5158 ( 51 wins)
Phishing 0.4561 ( 47 wins)
Spam 0.0281 ( 2 wins)
Joke 0.0000 ( 0 wins)
Legitimate 0.0000 ( 0 wins)
Options before body: Average probabilities:
Rickroll 0.9293 ( 94 wins)
Joke 0.0549 ( 5 wins)
Phishing 0.0140 ( 1 wins)
Spam 0.0018 ( 0 wins)
Legitimate 0.0000 ( 0 wins)
This was Gemma4-26B-A4B-NVFP4 by the way.EDIT
Gemma4-12B-it-NVFP4 seems way less sensitive to option/body ordering:
Options after body:
Average probabilities:
Rickroll 0.9867 ( 99 wins)
Phishing 0.0133 ( 1 wins)
Joke 0.0000 ( 0 wins)
Spam 0.0000 ( 0 wins)
Legitimate 0.0000 ( 0 wins)
Options before body: Average probabilities:
Rickroll 0.9401 ( 93 wins)
Phishing 0.0336 ( 3 wins)
Spam 0.0250 ( 4 wins)
Joke 0.0010 ( 0 wins)
Legitimate 0.0002 ( 0 wins)
Anyway, this for-looping stuff doing 100 calls to even a local VLLM API takes around 5 seconds in total, so this isn't anywhere close to sub-second Jev territory.stellalo 3 hours ago
visarga 2 hours ago
So you might ask: how do I obtain the training examples? Just collect samples and use a coding agent to classify them as match or no match. From time to time you can add more examples to the dataset to have your concept adapt to changes in input distribution. It's all automated, but it only uses LLMs to train concept vectors, after that it works like a regular embedding model with a calibrated classifier on top. It's also 20-30x faster than Jev, free, and runs on CPU.
An illustration of how it defines a concept as opposed to simple cosine similarity: https://github.com/horiacristescu/semlabel/raw/main/images/c...
Oscalemor 18 minutes ago
yipinwong an hour ago
Still good. In practice for Jev the devils in the details. As you all know by now, it's easy to write PoC and understand with AIs (or even manually, which is now a prestious practice).
That demo will get you 80% there
Getting to that 100% or even 99% to JEV level will be hard with all the edge cases, infra, API, communications, etc.
Still a good article.
philipbk 8 hours ago
jdiaz97 7 hours ago
>calls an api
ok
betenoire 5 hours ago
chpatrick 4 hours ago
vonStackelberg an hour ago
no-name-here 12 hours ago
But then at the end it says it’s parody. Maybe HN title should say it’s a joke.
est 12 hours ago
you can swith to a better model for lower error rate.
ricardobeat 12 hours ago
baobabKoodaa 10 hours ago
Somehow the HN crowd has a bunch of "professionals" who don't care about error rates and think that a Qwen model running on a potato is frontier intelligence.
alxmths 10 hours ago
TeMPOraL 10 hours ago
(For more realistic solution, surely someone must be working on optronics - these models just beg to have their weights cleverly etched into stacked sheets of plastic, so they can do inference for free on a beam of light.)
zer00eyz 7 hours ago
Non deterministic systems have furthered the "brain rot" in our industry.
Lots of people were happy to ignore the code in their "supply chain" before LLM's - but suddenly not reading the LLM's output is a problem. I get they are different but we're in the same realm.
The lack of real data on performance of what ever application that one is trying to pitch is getting appalling. It's a lot of "trust me bro" this works better hand waving. And it's getting gross.
And how do we even measure nondeterministic systems? Because if I told you that Anthropic was spending millions of dollars having 1000's of agents "pre solve" benchmarks to build into their next version of the system you would scream they were cheating. Every one is focused on the "hacking" in the hugging face incident and no one is looking why they were even playing with those benchmarks in the first place.
"Trust me Bro"...
0123456789ABCDE 4 hours ago
here's 7 lines
import os
import dspy
lm = dspy.LM("openrouter/z-ai/glm-5.3-flash", api_key=os.environ["OPENROUTER_API_KEY"])
jev = dspy.Predict('email:str -> choice:Literal["Legitimate", "Spam", "Phishing"]')
email = "Payroll asks for your password on a non-company sign-in page."
pred = jev(email=email, lm=lm)
print(pred.choice)
there are other options, obviously. you can choose to give it some tools, maybe some reasoning stage before picking a choice, and that's on top of the "reasoning" the llm model already does api sideamai 4 hours ago
0123456789ABCDE 4 hours ago
the example uses an external api, and i don't think they return probabilities from those anyway.
0123456789ABCDE 2 hours ago
it is the latency that makes it significant
zeroq 8 hours ago
1. draw a circle
2. import the rest of the owljorisw 11 hours ago
Ends with referring to a product, and saying "this is a parody post", after pretending to make a serious point.
alun 9 hours ago
In real life, a human doesn't do classification tasks with the System One part of their brain, they use System Two. So by definition what Jev does isn't System One thinking.
If anything, regular programming that automatically executes based on logic, without requiring "thinking" would be "System One".
orsorna 9 hours ago
"System One" and "System Two" were coined in some pop science book...so back to its usage being a marketing ploy.
Matticus_Rex 9 minutes ago
Topfi 9 hours ago
kylecazar 9 hours ago
Either way it's an analogy that's bound to be loose as Kahneman's modes are about humans.
xg15 8 hours ago
Huh? I guess that depends on the exact definition of "classification", but I think the bulk of basic classification tasks we make every day to make sense of our surroundings, such as object recognition is definitely done using system 1. So is higher-level "stereotyping" or anything you could described with "I know it when I see it".
Because those responses can be incorrect or even harmful, you would sometimes make use of system 2 to correct them - but that doesn't change that the initial response is from system 1.
ActivePattern 8 hours ago
perlgeek 4 hours ago
I'd argue that most human classification is pre-conscious / System One. You see a table, you recognize it as a table without asking yourself "is this a table?"
I guess their marketing implies that it moves classification into system one response time.
hadlock 3 hours ago
I think you answered your own question. Executives are going to ask two questions, 1) how is this different/why does it matter and 2) how will i use it to make money?
Leya came to market more than a year before Jev, and failed because nobody understood how to use it, and he was unable to market it properly. Jev used this strategy and did not fail.
tducret 3 hours ago
Here is an archive: https://web.archive.org/web/20260923122959/https://www.nobod...
onion2k 12 hours ago
If you're comparing with something, you need to state 'fast' in relative terms. Jev is definitely fast, and if this Python takes the same time to get a decision then it's also fast. If it's 100* slower than Jev though, you shouldn't be calling it 'fast', because relatively speaking it's really, really slow.
_davide_ 12 hours ago
So, fast in the LLM space and comparable with Jev.
ActivePattern 8 hours ago
bruhhhhhh 8 hours ago
Keyframe 8 hours ago
KaiserPro 7 hours ago
sanderjd 7 hours ago
My base case is that this will probably be pretty useful, and also not as useful as the current hype suggests.
Keyframe 6 hours ago
garciasn 8 hours ago
> But their example is classification but that would also be possible and faster with a classic BERT model.
With BERT, you need a large, labeled dataset, and you have to train/fine-tune the model. Jev is pitched as a zero- or 'few-shot' model. You define the schema in code, give it instructions, and it works without a traditional training pipeline.
> So their pitch is a task specific smaller model or am I completely misunderstanding the whole thing?
Yup; that about sums it up: it is more or less an optimized, task-specific small model with the flexible understanding of a traditional LLM.
prometheus1992 8 hours ago
garciasn 7 hours ago
cochne 7 hours ago
I think they were responding to this. You can use BERT to provide zero shot classification predictions.
garciasn 6 hours ago
0x445442 5 hours ago
Foobar8568 8 hours ago
idz 8 hours ago
Not particularly. There is still the problem of hallucinations and varying results across runs.
That's more of what type-safety means for their team. Every run gives the same results. It's type-safe
kantahayashi 7 hours ago
sanderjd 7 hours ago
pasteleft 2 hours ago
For three choices problem (A,B,C), what Jev guarantees is that it will give the choice in a defined schema (type-safe). It never guarantees that the choice is correct (hallucination).
killerstorm 8 hours ago
As far as I understand, the idea of Jev is zero-shot or few-shot classifier: it learns a lot of stuff at pre-training, but unlike a classic LLM it doesn't need to learn how to chat, so it can be much smarter at a particular size
sanderjd 7 hours ago
If you accept the premise that there are use cases where you might ask a frontier model a classification-shaped question and expect an ok enough answer, rather than creating a purpose specific classifier on some dataset that you have, then it follows that this is quite an inefficient thing to do, because you're doing extra work to turn the output tokens into a structured output and mostly throwing them away. So then if you could instead train a frontier level model that skips the output tokens and directly returns the structured classification information, that would be more efficient, and that's what jev seems to be.
But a lot rides on that initial premise of whether this is a use case that makes sense. But if you find yourself asking a model like Opus arbitrary yes/no questions and then maybe you switch to a faster and cheaper model because it's too slow and expensive, it seems like jev might be a great replacement for that.
wodenokoto 7 hours ago
- By not being a optimised for chat, it can deliver confidence for answer and not for how an answer should be phrased
- Speed. It can take seconds for OpenAI to compile schemas, jev can respond before openAI has even begun thinking
- Token efficiency and price. I think its the output token they don't even charge for because they are negligible, and the tokens they do charge for are at a fraction of a comparable model.
If you are using structured output, I think those 3 together is a really big deal.
>But their example is classification but that would also be possible and faster with a classic BERT model.
I believe the things you can classify with ChatGPT without any tuning or training is way beyond what BERT can do.
dhsysusbsjsi 13 hours ago
jpnc 12 hours ago
DrewADesign 11 hours ago
c7b 10 hours ago
dhsysusbsjsi 9 hours ago
c7b 9 hours ago
DrewADesign 7 hours ago
ramon156 12 hours ago
While technically correct, it's not the same thing
pjerem 11 hours ago
estetlinus 11 hours ago
baobabKoodaa 10 hours ago
hbrn 7 hours ago
All we have is a company that claims to have created one, with no proof.
baobabKoodaa an hour ago
baobabKoodaa 10 hours ago
hartator 10 hours ago
baobabKoodaa 10 hours ago
armcat 9 hours ago
hununu 7 hours ago
chpatrick 4 hours ago
jimmyl02 4 hours ago
Ultimately Jev claims to have a data advantage which is likely where the future lies. They'll have a unique edge in improving general purpose classification / decisioning.
kccqzy an hour ago
cupofjoakim 12 hours ago
v18a 12 hours ago
leecarraher an hour ago
is a legal cya a la "Nathan For You" 's Dumb Starbucks
kjshsh123 3 hours ago
I guess it's due to the calibrated decision part (and that's what LLMs tell me).
But I figure some supervised classification post training would still improve the model.
davidfekke 5 hours ago
rgbrgb 3 hours ago
just found this one https://huggingface.co/spaces/multimodalart/jev-decision-ind...
fzysingularity 5 hours ago
p(y = next thinking+decision token | x = question) != p(y = next decision token | x = question)
The former is what LLMs are trained for, the latter is what Jev was likely trained on (likely used thinking alignment as an auxiliary loss, but not explicitly included in the probability calibration).
nlpnerd an hour ago