金磊 发自 凹非寺
量子位 | 公众号 QbitAI
最新版本Mathematica Wolfram,正式引入大语言模型(LLM)。
这也就意味着,现在搞科学计算,只需要一个“说”的动作。

例如想要做个图,就直接说:
Draw a red and a green semicircle.
画一个红色和绿色的半圆。

基于此,可以进一步用自然语言提出更多要求:
I want filled semicircles next to each other. And no axes.
我想要彼此相邻的填充的半圆。没有坐标轴。

继续用自然语言做修改:
Make these so the flat sides form a vertical diameter.
让这些平坦的侧面形成一个垂直直径。

最后让这两个半圆拼凑在一起,只需要说:
Make these part of the same circle, without a space in between.
把这两个部分连成一个圆,中间不要有空隙。

不难看出,用自然语言来做科学计算,可谓是相当的便捷。
用Mathematica Wolfram官方的话来说就是:
即使你没有先验知识、不会Wolfram语言,也可以轻松搞定科学计算。

网友们看到这个新功能后表示:
买买买!

还会自己纠错
我们再用一个例子来体验下引入LLM的Mathematica:
Make a table of the first 20 twin primes.
制作一张表,列出前20个双素数。
同样的,基于自然语言的描述,Mathematica“唰唰”地开始了自己的工作。

不过在这期间,Mathematica发现了自己代码写的有误,于是开始承认错误并改正:
抱歉,我似乎高估了前50个素数中的双素数。让我们调整代码,找到前20个没有预定义限制的双素数。

即使它自己没有编写一段代码,它也非常擅长解释生成错误时会发生什么:

官方表示,为了适配新引入的LLM,Wolfram语言中添加了各种新的结构。
例如在Chat Notebook中,设置了聊天单元(chat cell)和聊天块(chatblock)。

为了方便使用LLM,官方还设置了“Wolfram提示存储库”(Wolfram Prompt Repository)。
提示存储库主要包含两大类:
第一种是个性化,用于“样式”并以其他方式通知聊天交互。第二种是函数提示和修饰符提示。函数提示是为了让LLM做一些具体的事情,比如总结一段文本,或者建议一个笑话(目前不是很擅长)。
修饰符提示用于确定LLM应如何修改其输出,例如翻译成不同的人类语言,或将其保持在一定的长度。

更多更新内容
引入LLM,还只是13.3版本更新的内容之一。
例如新集成的“线积分”和“曲面积分”,可以允许用户对直线和曲面上的标量、矢量函数进行积分。

用官方的话来说,这个功能为数学计算开辟了全新的可能性。
除此之外,13.3版本在更多函数和可视化方面也做了更新。

详情可以戳下方链接链接一下。
参考链接:[1]https://writings.stephenwolfram.com/2023/06/llm-tech-and-a-lot-more-version-13-3-of-wolfram-language-and-mathematica/[2]https://twitter.com/stephen_wolfram/status/1674120239435456514[3]https://news.ycombinator.com/item?id=36529610
— 完 —
量子位 QbitAI · 头条号签约
关注我们,第一时间获知前沿科技动态