赞
踩
点击↑上方↑蓝色“编了个程”关注我~
这是Yasin的第 94 篇原创文章
最近AI大模型火出了圈,很多人惊叹它的智能程度。但大多数人都以为它的能力主要在“聊天”、“写文案”这方面。然而实际它能做的远远更多。
Chat GPT是当今世界上最智能的模型,它前段时间推出了“插件”的概念,其实就是AI工程化的一个基础能力。配合AI的能力,可以通过自然语言来搜索、购物、预定等等,AI从此不止局限于聊聊天。只是“插件”只能构建和运行在官网上,无法在更大范围的场景落地。
于是很多人加入了探索基于AI构建工程化的思路,笔者本人也是其中之一。最近GPT又开放了一个叫Function Calling的新能力,这篇文章主要介绍工程化的整体思路和Function Calling的一些调研、测试。
在Function Calling出现之前,一般是使用Prompt来让Chat GPT返回JSON内容供下游工程消费。核心的思路如图:
比如auto-gpt的prompt
- You should only respond in JSON format as described below
-
- RESPONSE FORMAT:
- {
- "thoughts":
- {
- "text": "thought",
- "reasoning": "reasoning",
- "plan": "- short bulleted\
- list that conveys\
- long-term plan",
- "criticism": "constructive self-criticism",
- "speak": "thoughts summary to say to user"
- },
- "command": {
- "name": "command name",
- "args":{
- "arg name": "value"
- }
- }
- }
-
- Ensure the response can be parsed by Python json.loads

langchian的prompt:
- response_schemas = [
- ResponseSchema(name="answer", description="answer to the user's question"),
- ResponseSchema(name="source", descri
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。