评测与研究
受TypeSafe Ai启发,向本地LLM提问,获得校准概率而非文本,输出结构化结果,无需生成或解析,支持MLX和Apple Silicon。
Inspired by TypeSafe Ai, Ask a local LLM typed questions, get calibrated probabilities instead of text. Structured output without generation or parsing. MLX / Apple Silicon.
Then: curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d @examples/support_ticket.json链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
取自 tests/test_with_model.py:80
a是/否Does the customer request a refund?
b是/否Is the customer angry?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
a: { type: 'boolean', instructions: 'Does the customer request a refund?' },
b: { type: 'boolean', instructions: 'Is the customer angry?' },
},
});