Jev 请求结构解析:State、Questions 与四种题型
讲清 Jev 一次请求怎么组成:state 是被判断的对象,questions 并行返回 Choice、Noul、Score、Box 四种结构化答案,可直接进 if 语句。
Anatomy of a Jev request! Wiring an LLM into code usually means asking for JSON, then handling every case where the output drifts from the schema. Jev, TypeSafe's decision model, doesn't write text at all. Every answer is one of the options you defined, with a probability attached, so the result goes straight into an if statement. A Jev request has two parts. The state is the thing being judged. It can be a customer message, a database record, or now a photo. The questions are the judgments you want back. You can send several in one request, and they all look at the same state and run in parallel. Each question has an instruction, which is the question written in plain words. Some questions also carry criteria, the set of answers Jev is allowed to return. There are four question types. 1) Choice picks one option from a list you define, like routing a ticket to billing, technical or sales. You get the option name plus a probability for every option. 2) Noul is a yes-or-no question. Instead of a hard yes or no, it returns the probability that the answer is yes, and your code decides the threshold. 3) Score places the state on an ordered scale you define, like how frustrated a customer sounds, from calm to very angry. The answer can land between two levels. 4) Box is new in the latest release. You ask where something is in an image, and it returns the four edges of a rectangle around it, as fractions of the image's width and height. Box always returns a rectangle, even when the thing isn't in the image. That's why it's usually paired with a Noul asking whether the object is there at all. Images come in through a new assets field. Each image gets a reference string, and wherever that string appears in the state, an instruction or the criteria, Jev sees the image instead. The full walkthrough, with the live demo and the code, is in my video quoted below on multimodal Jev. You can also watch it on YouTube: https://www.youtube.com/watch?v=ciQghn271rA
这条是引用着另一条写的:「Jev 多模态:用图像做手势与目标检测决策」