JEV: A LLM que não escreve texto, decisões tipadas para código


Toda vez que eu preciso que um modelo faça um julgamento que o meu código vai consumir, eu caio no mesmo problema: eu tenho um sistema gerador de texto, e estou forçando ele a cuspir algo estruturado.
Aí vem a ginástica conhecida. Você escreve um prompt pedindo JSON. O modelo coloca a resposta dentro de um bloco de código. Você faz um parse. O parse quebra porque veio uma vírgula sobrando. Você adiciona um zod ou um json.loads dentro de un try/except. Você reza para o modelo não ter "alucinado" um campo que não existe. No fim, você gastou 800 tokens e 2 segundos para descobrir que o ticket é de pagos; informação que o seu if já sabia usar, mas precisava de três camadas de validação para chegar até ele.
O JEV é a resposta da TypeSafe para esse desalinhamento. E ele é interessante o suficiente para eu escrever sobre ele.
O JEV é o modelo principal (flagship) da TypeSafe AI, empresa de San Francisco fundada em 2024, e é o primeiro modelo da categoria "System One".
A ideia central: em vez de você adaptar um gerador de texto para produzir decisões, você usa um modelo que foi treinado para produzir decisões diretamente. Nada de geração de texto. Nada de parsing. Ele avalia um state e devolve valores tipados e distribuições de probabilidade que o seu código pode usar em if, ordenar e rotear.
O nome vem do livro Thinking, Fast and Slow, do Daniel Kahneman. O "Sistema 1" é o pensamento rápido e intuitivo; o "Sistema 2" é o lento e deliberado. A proposta aqui é a mesma: julgamentos rápidos e focados, não raciocínio estendido.
A TypeSafe deixa isso explícito na documentação: o JEV não escreve respostas, não produz código e não gera explicações do seu raciocínio. Ele responde. Ponto.
Em vez de um único endpoint que faz "tudo", o JEV expõe três primitivos, cada um faz uma pergunta diferente e devolve um tipo diferente de resposta:
| Primitivo | Pergunta | Devolve |
|---|---|---|
| Choice | Escolha uma opção de uma lista | choice, probabilities, confidence |
| Score | Avalie o state numa rubrica ordenada | score, probabilities, confidence |
| Noul | Essa afirmação é verdadeira? | noul (0–1) |
O Noul é o mais curioso do trio. Ele não devolve true/false, devolve a probabilidade de ser sim, um número contínuo entre 0 e 1. Isso é muito mais útil do que um booleano, porque você decide onde cortar.
O Score recebe um array criteria ordenado, do nível mais baixo para o mais alto. Os níveis são numerados pela posição no array (0, 1, 2...), e o modelo recebe apenas as descrições, nunca os números.
Um detalhe importante: o score devolvido pode cair entre dois níveis. Se você tem uma escala de 0 a 2 e o modelo devolve 1.4, isso não é um bug, é a posição dele no espectro.
{ "state": "O botão de exportar quebra a página de configurações no Safari. Funciona no Chrome, mas alguns clientes só usam Safari.", "model": "jev-latest", "questions": { "bug_severity": { "type": "score", "instructions": "Qual a severidade do problema reportado?", "criteria": [ "Cosmético; sem impacto na funcionalidade", "Funcionalidade quebrada ou degradada, mas existe workaround", "Bloqueante; não existe workaround" ] } } }
O Noul aceita um criteria opcional com descrições de true e false, útil quando "sim" e "não" são ambíguos e você precisa delimitar a fronteira:
{ "state": "Já pedi três vezes. Posso falar com uma pessoa de verdade?", "model": "jev-latest", "questions": { "is_human_escalation": { "type": "noul", "instructions": "O cliente está pedindo para falar com um atendente humano?" }, "is_repeat_contact": { "type": "noul", "instructions": "O cliente já entrou em contato sobre isso antes?", "criteria": { "true": "Menciona uma tentativa anterior, ticket, ou que já perguntou antes", "false": "Nenhum sinal de contato prévio" } } } }
E a resposta vem limpa:
{ "model": "jev-1.13.0", "answers": { "is_human_escalation": { "type": "noul", "noul": 0.99 }, "is_repeat_contact": { "type": "noul", "noul": 0.93 } }, "usage": { "input_tokens": 360, "output_tokens": 39 } }
Perceba: não existe texto para fazer parse. Isso é o ponto inteiro.
Esse é o pedaço que eu acho mais interessante de engenharia, e onde muita gente vai ler "type-safe" e pensar em TypeScript. Não é (só) isso.
O que a TypeSafe chama de type-safe é: você define o espaço de respostas possíveis antes da chamada. No Choice, o criteria é um mapa de opções; no Score, é um array de níveis. O modelo só pode responder dentro daquele conjunto.
Compare os dois mundos:
# Abordagem "LLM como classificador" prompt = """Classifique o ticket abaixo em uma das categorias: pagos, tecnico, acesso. Responda APENAS com a categoria.""" raw = llm.generate(prompt + ticket) # "A categoria é: pagos." label = raw.strip().lower() # "a categoria é: pagos." if label not in VALID: # não bateu — agora? label = fuzzy_match(label) # heurística frágil # ... e se nada funcionar, cai no default e você não fica sabendo
# Abordagem com JEV from typesafe_sdk import Choice, TypeSafeClient with TypeSafeClient() as client: response = client.system_one( state=ticket, questions={ "department": Choice( instructions="Qual time deve tratar isso?", criteria={ "pagos": "Cobranças, faturas, problemas de pagamento", "tecnico": "Bugs, erros, comportamento inesperado", "acesso": "Acesso, senha, permissões", }, ), }, ) answer = response.answers["department"] # answer.choice já é uma das três chaves. Sempre.
A diferença não é cosmética. Na primeira abordagem, quando o modelo sai do script, o seu código não sabe que ele saiu do script. O if label not in VALID silenciosamente cai num default, e você descobre o problema semanas depois olhando logs. Na segunda, o espaço de resposta é fechado por construção, e ainda vem com uma medida de incerteza anexada.
Todo Choice e Score devolve, além da resposta, um probabilities (a distribuição sobre as opções ou níveis) e um confidence, um número de 0 a 1 que colapsa o formato daquela distribuição.
A intuição é direta:
confidence perto de 1.confidence perto de 0.O confidence é 1 quando toda a probabilidade está em um resultado e 0 quando está distribuída uniformemente. É uma estatística calculada a partir das probabilidades que a resposta já te dá; a TypeSafe só faz a conta para você.
E aqui está o pulo do gato arquitetural: um sistema que não consegue expressar incerteza honesta não é confiável. O JEV te dá esse mecanismo de graça, e você usa assim:
action = response.answers["action"] confidence = action.confidence if confidence < 0.5: # O modelo está genuinamente em dúvida. Não adivinhe. route_to_human(user_message) elif action.choice == "check_balance": # Baixo risco. Mostrar a tela errada é recuperável. show_balance(account_id) elif action.choice == "approve_transfer": if confidence > 0.9: # Alto risco, alta confiança. Execute com confirmação. confirm_then_execute(account_id) else: # Alto risco, confiança moderada. Verifique antes. ask_user_to_confirm(account_id)
O detalhe que eu gosto: o threshold não é um número só. A mesma confidence de 0.8 é suficiente para mostrar um saldo e insuficiente para aprovar uma transferência. O código codifica a tolerância a risco, não o modelo. Isso é a coisa certa no lugar certo.
Esse é o princípio de design mais importante do JEV, e é onde a cabeça de quem vem de prompt engineering precisa mudar.
O JEV funciona melhor quando cada pergunta é uma coisa só, bem delimitada. A própria documentação sugere o critério: pense em cada pergunta como um gut-check, o tipo de julgamento que uma pessoa muito experiente faria em poucos segundos, dado o contexto certo.
Se a sua pergunta exigir raciocínio estendido ou pesar múltiplos fatores independentes, decomponha.
Em vez de:
"Avalie este pitch de startup" → score: 7.2 (e agora? o que é 7.2?)
Faça:
market_size → Score
technical_feasibility → Score
differentiation → Score
...e combine você mesmo:
score = ( 0.5 * answers.market_size.score + 0.3 * answers.technical_feasibility.score + 0.2 * answers.differentiation.score )
Isso te dá três coisas que um prompt monolítico nunca te dá:
0.5 para 0.6; não reescreve um prompt.E tem um bônus de performance que não é óbvio: todas as perguntas de uma chamada são avaliadas em paralelo e em isolamento contra o mesmo state. Adicionar perguntas quase não muda o tempo de resposta, e como cada pergunta é avaliada independentemente, não existe context rot; a pergunta número 12 não é pior que a pergunta número 1.
O JEV não substitui um LLM. Ele substitui o uso errado de um LLM. Os casos onde ele brilha são aqueles em que você precisa de um julgamento semântico repetido muitas vezes, dentro de um fluxo que o seu código controla.
Classificar intenção, domínio, dificuldade ou risco para decidir qual LLM (ou qual caminho de código) recebe cada requisição. Um router customizado, com regras e thresholds seus.
Colocar checagens semânticas em toda entrada, saída e tool call de outro sistema de IA. Detectar jailbreak e prompt injection. Identificar violação de política e exposição de dado sensível. Detectar erro de tool call em tempo real. Como o custo é uma fração do custo da chamada do LLM, você consegue verificar tudo em vez de amostrar.
Como o custo é muito menor, você processa datasets que antes eram inviáveis: classificar traces de agente em massa, buscar informação relevante em corpus gigantes, extrair features para alimentar modelos clássicos. A TypeSafe cita o padrão de treinar um modelo clássico downstream nas probabilidades do JEV; o JEV vira o rotulador, não o produto final.
Substituir ou complementar embeddings com busca semântica, scoring e ranking. Pontuar relevância query-candidato, reranquear com comparações pareadas, selecionar o contexto útil para o próximo passo do pipeline.
A latência é citada na casa dos 150ms, mais rápido que a percepção humana. Isso abre casos que um LLM simplesmente não atende: tomar decisão embutido numa UI, ou rodar lógica de jogo.
Triar papers contra critérios de inclusão e exclusão. Rotular passagens de transcrições e respostas abertas de survey. Checar se um trecho citado realmente sustenta a afirmação que o paper ou o resumo gerado faz. Sinalizar metodologia faltante.
O fio condutor: o código controla o fluxo; o JEV faz os julgamentos semânticos.
Se você chegou até aqui achando que isso substitui o seu LLM principal, não substitui. Vale ser explícito:
state.state, as regras de domínio e casos de borda vão no instructions e no criteria.confidence como sinal, não como certificado.confidence ao rotear.state mais todas as perguntas combinadas; 32k para o state mais a pergunta mais longa.E um ponto que merece destaque, porque é uma escolha de design e não um detalhe de billing: você é cobrado por token de entrada, e os tokens de saída são grátis. Isso é coerente com a tese inteira; a saída do JEV é minúscula (um número, uma chave, um float). Não há texto para gerar, então não há o que cobrar. O modelo é vendido por quanto ele lê, não por quanto ele escreve.
Sobre disponibilidade: a API hospedada abriu em setembro de 2026, junto com uma rodada seed de US$ 40 milhões liderada pela DCVC. Os rate limits estão sendo ajustados dinamicamente enquanto a demanda é acomodada, então vale checar a documentação atual antes de dimensionar algo em produção. Os SDKs fazem retry com backoff e respeitam o header retry-after por padrão.
O JEV é interessante menos por ser "mais um modelo" e mais por ser uma correção de categoria. Durante os últimos anos, a indústria inteira tratou geração de texto como a interface universal dos modelos, e depois passou muito tempo construindo andaimes para arrancar decisões estruturadas de dentro desse texto.
O System One inverte a premissa: se o consumidor da resposta é o código, então o tipo da resposta deveria ser a interface. choice, score, noul e confidence não são um formato de serialização que você negociou com o modelo via prompt; são o contrato.
Na prática, isso significa que eu paro de escrever try/except em volta de um json.loads para descobrir se un ticket é de pagos. E, mais importante, que eu paro de fingir que meu sistema é determinístico quando eu não faço ideia da confiança daquela classificação.
Vale testar no próximo lugar onde você tiver um LLM fazendo trabalho de classificador. Se o padrão for "manda texto, recebe texto, faz parse, torce", o JEV provavelmente encaixa melhor.
Every time I need a model to make a judgment that my code will consume, I hit the same wall: I have a text-generation system, and I'm forcing it to spit out something structured.
Then comes the familiar dance. You write a prompt asking for JSON. The model wraps the answer in a code fence. You parse it. The parse breaks because of a trailing comma. You bolt on a zod schema or a json.loads inside a try/except. You pray the model didn't hallucinate a field that doesn't exist. In the end, you burned 800 tokens and two seconds to learn that the ticket belongs to payments; information your if statement already knew how to use, but needed three validation layers to reach.
JEV is TypeSafe's answer to that mismatch. And it's interesting enough that I wanted to write about it.
JEV is the flagship model from TypeSafe AI, a San Francisco company founded in 2024, and it's the first model in the "System One" category.
The core idea: instead of bending a text generator into producing decisions, you use a model trained to produce decisions directly. No text generation. No parsing. It evaluates a state and returns typed values and probability distributions your code can branch on, sort by, and route with.
The name comes from Daniel Kahneman's Thinking, Fast and Slow. System 1 is fast, intuitive thinking; System 2 is slow and deliberate. The pitch here is the same: fast, focused judgments, not extended reasoning.
TypeSafe is explicit about this in the docs: JEV does not write replies, produce code, or generate explanations of its reasoning. It answers. Full stop.
Rather than a single endpoint that does "everything," JEV exposes three primitives, each asks a different kind of question and returns a different type of answer:
| Primitive | Question | Returns |
|---|---|---|
| Choice | Pick one option from a list | choice, probabilities, confidence |
| Score | Rate the state on an ordered rubric | score, probabilities, confidence |
| Noul | Is this statement true? | noul (0–1) |
Noul is the odd one out. It doesn't return true/false, it returns the probability that the answer is yes, a continuous number between 0 and 1. That's far more useful than a boolean, because you decide where to cut.
Score takes an ordered criteria array, from the lowest level to the highest. Levels are numbered by their position in the array (0, 1, 2...), and the model receives only the descriptions, never the numbers.
One important detail: the returned score can fall between two levels. On a 0-to-2 scale, getting back 1.4 isn't a bug, it's the model's position on the spectrum.
{ "state": "The export button crashes the settings page in Safari. It works in Chrome, but a few of our customers only use Safari.", "model": "jev-latest", "questions": { "bug_severity": { "type": "score", "instructions": "How severe is the reported issue?", "criteria": [ "Cosmetic; no impact to functionality", "Broken or degraded feature, but workaround exists", "Blocking issue; no workaround exists" ] } } }
Noul accepts an optional criteria object with true and false descriptions, useful when "yes" and "no" are ambiguous and you need to draw the boundary:
{ "state": "I have asked three times now. Can I please just talk to a real person?", "model": "jev-latest", "questions": { "is_human_escalation": { "type": "noul", "instructions": "Is the customer asking for a human agent?" }, "is_repeat_contact": { "type": "noul", "instructions": "Has the customer contacted support about this before?", "criteria": { "true": "Mentions a prior attempt, ticket, or that they have asked before", "false": "No sign of any previous contact" } } } }
And the response comes back clean:
{ "model": "jev-1.13.0", "answers": { "is_human_escalation": { "type": "noul", "noul": 0.99 }, "is_repeat_contact": { "type": "noul", "noul": 0.93 } }, "usage": { "input_tokens": 360, "output_tokens": 39 } }
Notice: there is no text to parse. That's the entire point.
This is the engineering piece I find most interesting, and where people will read "type-safe" and assume TypeScript. That's not (only) it.
What TypeSafe means by type-safe is: you define the space of possible answers before the call. In Choice, criteria is a map of options; in Score, it's an array of levels. The model can only answer inside that set.
Compare the two worlds:
# The "LLM as classifier" approach prompt = """Classify the ticket below into one of these categories: payments, tech, access. Reply with ONLY the category.""" raw = llm.generate(prompt + ticket) # "The category is: payments." label = raw.strip().lower() # "the category is: payments." if label not in VALID: # no match — now what? label = fuzzy_match(label) # fragile heuristic # ... and if nothing works, it silently falls to a default
# The JEV approach from typesafe_sdk import Choice, TypeSafeClient with TypeSafeClient() as client: response = client.system_one( state=ticket, questions={ "department": Choice( instructions="Which team should handle this?", criteria={ "payments": "Charges, invoices, payment problems", "tech": "Bugs, errors, unexpected behavior", "access": "Access, passwords, permissions", }, ), }, ) answer = response.answers["department"] # answer.choice is one of those three keys. Always.
The difference isn't cosmetic. In the first approach, when the model goes off-script, your code doesn't know it went off-script. The if label not in VALID silently falls through to a default, and you find out weeks later while reading logs. In the second, the answer space is closed by construction, and it arrives with an uncertainty measure attached.
Every Choice and Score returns, alongside the answer, a probabilities distribution over options or levels, plus a confidence value, a number from 0 to 1 that collapses the shape of that distribution.
The intuition is direct:
confidence near 1.confidence near 0.confidence is 1 when all probability sits on one outcome and 0 when it's spread evenly. It's a statistic computed from the probabilities the answer already carries; TypeSafe just does the math for you.
And here's the architectural payoff: a system that cannot express honest uncertainty is not trustworthy. JEV hands you that mechanism for free, and you use it like this:
action = response.answers["action"] confidence = action.confidence if confidence < 0.5: # The model is genuinely unsure. Don't guess. route_to_human(user_message) elif action.choice == "check_balance": # Low stakes. Showing the wrong screen is recoverable. show_balance(account_id) elif action.choice == "approve_transfer": if confidence > 0.9: # High stakes, high confidence. Proceed with confirmation. confirm_then_execute(account_id) else: # High stakes, moderate confidence. Verify first. ask_user_to_confirm(account_id)
The detail I love: the threshold isn't a single number. The same confidence of 0.8 is enough to show a balance and not enough to approve a transfer. Your code encodes the risk tolerance, not the model. That's the right thing in the right place.
This is JEV's most important design principle, and it's where anyone coming from prompt engineering has to rewire their instincts.
JEV works best when each question asks one specific, well-scoped thing. The docs offer a good test: think of each question as a gut-check, the kind of judgment a highly knowledgeable person could make in a few seconds given the right context.
If your question would require extended reasoning or weighs multiple independent factors, decompose it.
Instead of:
"Rate this startup pitch" → score: 7.2 (and now what? what is 7.2?)
Do this:
market_size → Score
technical_feasibility → Score
differentiation → Score
...then combine them yourself:
score = ( 0.5 * answers.market_size.score + 0.3 * answers.technical_feasibility.score + 0.2 * answers.differentiation.score )
That buys you three things a monolithic prompt never gives you:
0.5 to 0.6; you don't rewrite a prompt.There's also a performance bonus that isn't obvious: every question in a call is evaluated in parallel and in isolation against the same state. Adding questions barely changes response time, and because each question is evaluated independently, there's no context rot; question twelve is no worse than question one.
JEV doesn't replace an LLM. It replaces the wrong use of an LLM. It shines in cases where you need a repeated semantic judgment inside a flow your code controls.
Classifying intent, domain, difficulty, or risk to decide which LLM (or which code path) receives each request. A custom router, with your rules and your thresholds.
Placing semantic checks on every input, output, and tool call of another AI system. Detecting jailbreaks and prompt injection. Identifying policy violations and sensitive-data exposure. Detecting tool-call errors in real time. Because the cost is a fraction of the LLM call, you can verify everything instead of sampling.
Because the cost is so much lower, you can process datasets that were previously impractical: classifying agent traces at scale, searching giant corpora for relevant information, extracting features to feed classical models. TypeSafe cites the pattern of training a downstream classical model on JEV's probabilities; JEV becomes the labeler, not the final product.
Replacing or supplementing embeddings with semantic search, scoring, and ranking. Scoring query-to-candidate relevance, reranking with pairwise comparisons, selecting useful context for the next pipeline step.
Latency is cited at around 150ms, faster than human perception. That opens cases an LLM simply can't serve: making decisions embedded in a UI, or running game logic.
Screening papers against inclusion and exclusion criteria. Labeling passages in transcripts and open-ended survey responses. Checking whether a cited passage actually supports the claim a paper or generated summary makes. Flagging missing methodology.
The through-line: code owns control flow; JEV handles the semantic judgments.
If you've read this far thinking it replaces your main LLM, it doesn't. Worth being explicit:
state.state, domain rules and boundary cases go in instructions and criteria.confidence as a signal, not a certificate.confidence when routing.state plus all questions combined; 32k for the state plus the single longest question.One point deserves emphasis because it's a design choice, not a billing detail: you're charged per input token, and output tokens are free. That's coherent with the whole thesis; JEV's output is tiny (a number, a key, a float). There's no text to generate, so there's nothing to charge for. The model is sold on how much it reads, not how much it writes.
On availability: the hosted API opened in September 2026, alongside a $40M seed round led by DCVC. Rate limits are being adjusted dynamically as demand is absorbed, so check the current docs before sizing anything for production. The SDKs retry with backoff and honor the retry-after header by default.
JEV is interesting less as "yet another model" and more as a category correction. For the past few years, the entire industry treated text generation as the universal model interface, and then spent a lot of time building scaffolding to yank structured decisions back out of that text.
System One inverts the premise: if the consumer of the answer is code, then the answer's type should be the interface. choice, score, noul, and confidence aren't a serialization format you negotiated with the model via prompt; they're the contract.
In practice, that means I stop writing try/except around a json.loads to figure out whether a ticket is payments. And, more importantly, that I stop pretending my system is deterministic when I have no idea how confident that classification was.
Worth trying at the next place you have an LLM doing a classifier's job. If the pattern is "send text, receive text, parse, hope," JEV probably fits better.