TypeSafe AI 转发 Jev 推测性提问最佳实践
can’t get answers to questions you don’t ask! Jev first, figure it out later.
TypeSafe AI 转发 Allie the Icon 关于 Jev 的“推测性提问”模式:多数情况下把问题批量合并到单次调用更快也更省成本,即使还不确定是否需要这些答案;因为一次调用只按 token 计一次状态费用,且同一调用内问题之间互不影响准确率。
查看原帖学习 Jev 最重要的模式之一,就是我们有时称之为“推测性提问”的模式。 在大多数情况下,把问题批量合并到单次调用中会更快,甚至往往更便宜,*即使你还不确定自己是否需要这些答案!* 为什么?原因有很多: 速度!通常你可以在单次调用中完成整个任务,而不必在不同逻辑路径中进行多次顺序调用。 成本!你每次调用只需为状态中的 token 付费一次,因此批量提问也避免了为状态多次付费。当你的状态很大时,与重复状态的顺序调用相比,批量提问通常能节省成本。 问题之间永远不会影响同一次调用中其他问题的输出,因此准确率不会受到影响。
查看原文
One of the most important Jev patterns to learn is what we sometimes call "speculative questions". In the majority of cases, it's faster and even often cheaper to batch questions together in to a single call, *even when you don't yet know if you'll need the answers!* Why? Many reasons: Speed! Oftentimes you can accomplish the entire task in a single call, instead of multiple sequential calls in different logic paths. Cost! You only pay for tokens in state once per call, so batching questions also avoids paying for the state multiple times. When your state is large, batching questions often saves cost compared to sequential calls that duplicate state. Questions never affect the output of other questions in the same call, so accuracy will not suffer.
正文 · AI 翻译
不问问题就得不到答案!先上 Jev,之后再弄清楚。
来自 @allietheicon 的最新最佳实践