技巧精选

llm-typesafe 0.1a0 插件发布,为 LLM 接入 TypeSafe AI 的 Jev 模型

llm-typesafe 0.1a0

精选理由

Simon Willison 写了个 LLM 插件接入 TypeSafe AI 的 Jev 模型,专做分类、判断、打分这类结构化输出,配的示例直接能抄来用。

Simon Willison 发布了 llm-typesafe 0.1a0 插件,让 LLM 命令行工具支持 TypeSafe AI 的新模型 Jev。安装后通过 llm keys set typesafe 设置密钥即可使用。Jev 擅长三类结构化问答:返回 noul 概率值的 yes/no 判断、基于 criteria 的 choice 分类、以及按评分标准打分的 score 输出。示例包括判断消息是否明确要求退款,以及在 billing、technical、other 之间对客服消息做路由分类。

原文 · Simon Willison’s Weblog

llm-typesafe 0.1a0

Release: llm-typesafe 0.1a0 I built this new plugin for LLM to add support for TypeSafe AI's new Jev model . Install it like this: llm install llm-typesafe Then set an API key ( get one here , the waitlist seems to move pretty fast): llm keys set typesafe # Paste key And now you can ask yes/no "noul" questions like this: llm -m jev 'Please refund my last payment.' \ -s 'Does this message explicitly request a refund?' Output: {"type": "noul", "noul": 0.99} Or choice questions like this: cat message.txt | llm -m jev \ -s ' Which team should handle this message? If billing and technical issues both occur, choose billing. ' \ -o answer_type choice \ -o criteria ' { "billing":"Charges, invoices, payments, or refunds", "technical":"Problems installing or using the product", "other":"Neither category fits" } ' Or scoring questions like this: cat report.txt | llm -m jev \ -s ' How reproducible is the problem described in this report? ' \ -o answer_type score \ -o criteria ' [ "No reproduction instructions", "Some instructions, but important steps are missing", "Complete steps with expected and actual results" ] ' See the README for more details. Tags: projects , llm , jev