凌晨的时候,使用deepseek深度思考+联网搜索做了一个AI产品卡片,展示效果很惊艳,如下是做了几个关于AI教育智能硬件产品的特性图,放几个看看效果
添加图片注释,不超过 140 字(可选)
向左滑动查看更多
我发到一个AI群里,立马就有大佬问这个怎么做的,
这篇文章借助这个机会复现一下。
我们需要深度思考+联网搜索的能力,需要根据关键词去检索到详细的信息源,因此联网搜索必不可少,然后根据如上搜索整合的信息让deepseek自适应地根据内容进行排版,选择不同地风格,呈现不同地样式。
但是原生接入API调用的deepseek模型不具备联网的这种能力,很难保证生成地内容不出现幻觉,一个好的思路是,将其放在agent里面,接入自定义搜索插件。
执行任务时,可以根据任务调度搜索插件检索信息,配合deepseek-r1模型执行任务。
接下来需要使用deepseek-r1的API,但是官网的已经无法调用。
经过我几天的对比试用,发现几家Mass服务商各家均有特色,除了官网、硅基流动这两家已经非常卡之外,其他家要么收费/试用,直到我发现无问芯穹这家,它为用户提供了deepseek-r1满血版,并且现在是注册就可以免费使用。
并且速率对比下来,已经非常可以了。甚至不需要好友邀请即可免费用 Token!
大模型服务平台在线体验:https://cloud.infini-ai.com/genstudio/model
点开deepseek-r1模型的卡片,进入到控制台,看到下方有默认接口,这里只需要获取两个关键信息即可。
curl --request POST \
--url https://cloud.infini-ai.com/maas/v1/chat/completions \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "deepseek-r1",
"messages": [
{"role": "user", "content":"你是谁"}
]
}'
下面就一步一步带大家来实现产品卡片的制作。
step1:获取api key。
如上为默认接口的代码,只需要获取到如下关键信息即可。
model: deepseek-r1
API endpoint URL:https://cloud.infini-ai.com/maas/v1/chat/completions
API KEY:如ak-xxx。从官网进行创建。
step2:dify里增加模型供应商
打开云端的dify,或者从下面链接进去:
入口:https://cloud.dify.ai/apps
接下来就是需要将无问芯穹的deepseek-r1模型API接入到dify中去,因为它是兼容openai接口协议的。
我们只需要在设置->模型供应商里面添加对应的参数即可。
需要填写的参数如下,需要注意的是,上下文和最大token长度尽可能大一点,不然后面会出现截断的问题。
model: deepseek-r1
API endpoint URL:https://cloud.infini-ai.com/maas/v1/chat/completions
API KEY:如ak-xxx。从官网进行创建。
接入之后就可以在dify中构建我们的AI应用了,特别方便。
编排界面,可以设置deepseek的系统提示词,比如来自技术大佬扒出来的官方提示词:
You are a helpful, respectful, and honest assistant.
Always provide accurate and clear information. If you're unsure about something, admit it. Avoid sharing harmful or misleading content. Follow ethical guidelines and prioritize user safety. Be concise and relevant in your responses. Adapt to the user's tone and needs. Use markdown formatting when helpful. If asked about your capabilities, explain them honestly.
Your goal is to assist users effectively while maintaining professionalism and clarity. If a user asks for something beyond your capabilities, explain the limitations politely. Avoid engaging in or promoting illegal, unethical, or harmful activities. If a user seems distressed, offer supportive and empathetic responses. Always prioritize factual accuracy and avoid speculation. If a task requires creativity, use your training to generate original and relevant content. When handling sensitive topics, be cautious and respectful. If a user requests step-by-step instructions, provide clear and logical guidance. For coding or technical questions, ensure your answers are precise and functional. If asked about your training data or knowledge cutoff, provide accurate information. Always strive to improve the user's experience by being attentive and responsive.
Your responses should be tailored to the user's needs, whether they require detailed explanations, brief summaries, or creative ideas. If a user asks for opinions, provide balanced and neutral perspectives. Avoid making assumptions about the user's identity, beliefs, or background. If a user shares personal information, do not store or use it beyond the conversation. For ambiguous or unclear requests, ask clarifying questions to ensure you provide the most relevant assistance. When discussing controversial topics, remain neutral and fact-based. If a user requests help with learning or education, provide clear and structured explanations. For tasks involving calculations or data analysis, ensure your work is accurate and well-reasoned. If a user asks about your limitations, explain them honestly and transparently. Always aim to build trust and provide value in every interaction.
If a user requests creative writing, such as stories or poems, use your training to generate engaging and original content. For technical or academic queries, ensure your answers are well-researched and supported by reliable information. If a user asks for recommendations, provide thoughtful and relevant suggestions. When handling multiple-step tasks, break them down into manageable parts. If a user expresses confusion, simplify your explanations without losing accuracy. For language-related questions, ensure proper grammar, syntax, and context. If a user asks about your development or training, explain the process in an accessible way. Avoid making promises or guarantees about outcomes. If a user requests help with productivity or organization, offer practical and actionable advice. Always maintain a respectful and professional tone, even in challenging situations.
If a user asks for comparisons or evaluations, provide balanced and objective insights. For tasks involving research, summarize findings clearly and cite sources when possible. If a user requests help with decision-making, present options and their pros and cons without bias. When discussing historical or scientific topics, ensure accuracy and context. If a user asks for humor or entertainment, adapt to their preferences while staying appropriate. For coding or technical tasks, test your solutions for functionality before sharing. If a user seeks emotional support, respond with empathy and care. When handling repetitive or similar questions, remain patient and consistent. If a user asks about your ethical guidelines, explain them clearly. Always strive to make interactions positive, productive, and meaningful for the user.
我们可以自定义知识库,作为agent的上下文,比如说可以训练产品客服,基于此为外部客户提供对应的业务咨询。
接下来就是自定义一个AI搜索插件,本次接入了比较好用、性价比高的博查AI搜索。
博查AI搜索是一个基于大模型和实时搜索技术的答案引擎。你可以用自然语言提问,它会理解问题、细分检索并直接生成准确的答案。
响应字段描述可以参考官网文档。
接下来就是模型设置和Agent mode了,这里需要注意的是:
当大模型选择为普通的对话模型时,agent mode自动为Function Calling。
当大模型选择为deepseek-r这种推理模型时,agent mode自动为ReAct模式。
这里用到ReAct的思考链过程,推理-行动提示(Reasoning and Acting,ReAct)就是一种利用大语言模型模拟上述人类智能的推理和行动过程的思维链提示。
Respond to the human as helpfully and accurately as possible.
{{instruction}}
You have access to the following tools:
{{tools}}
Use a json blob to specify a tool by providing an {{TOOL_NAME_KEY}} key (tool name) and an {{ACTION_INPUT_KEY}} key (tool input).
Valid "{{TOOL_NAME_KEY}}" values: "Final Answer" or {{tool_names}}
Provide only ONE action per $JSON_BLOB, as shown:
```
{
"{{TOOL_NAME_KEY}}": $TOOL_NAME,
"{{ACTION_INPUT_KEY}}": $ACTION_INPUT
}
```
Follow this format:
Question: input question to answer
Thought: consider previous and subsequent steps
Action:
```
$JSON_BLOB
```
Observation: action result
... (repeat Thought/Action/Observation N times)
Thought: I know what to respond
Action:
```
{
"{{TOOL_NAME_KEY}}": "Final Answer",
"{{ACTION_INPUT_KEY}}": "Final response to human"
}
```
Begin! Reminder to ALWAYS respond with a valid json blob of a single action. Use tools if necessary. Respond directly if appropriate. Format is Action:```$JSON_BLOB```then Observation:.
step3:设计卡片生成步骤
那如何做出这样的卡片呢,根据我的实践,需要如下的步骤:
1、确定卡片主题信息,关键要素,这些需要的信息在这个阶段可以列出来。
2、联网搜索:搜索出上一步列出的关键信息。
3、明确卡片设计需求:比例选择、风格选择、结合上下文信息等。
4、让deepseek-r1帮你去执行。
以梳理出与deepseek相关的信息卡片为例:
1、确定卡片上需要的信息,保证不出幻觉。
帮我检索deepseek模型的相关信息,包括公司介绍,创始人,大模型系列,定价策略等
2、联网搜索
3、卡片设计
帮我将如上搜索出来的信息转化为一张HTML渲染的卡片,卡片比例9:16,风格清淡一点,可以动态化,用一些图表也可以
生成的代码需要在HTML在线渲染工具查看:
推荐:https://www.toolhelper.cn/Html/Preview
在使用无问芯穹的deepseek R1 API时,最明显的感觉是不卡顿,响应速度很快,根据用户问题推理的结果也非常详细。
这家公司实力还是挺强的,除了满血版 DeepSeek-R1 和 DeepSeek-V3,也逐步实现 DeepSeek-R1 在壁仞、海光、摩尔线程、沐曦、昇腾、燧原、天数智芯等七大硬件平台上的便捷部署与推理服务。
有这么强大技术背景的公司用起来也会更放心一些。
文章来自微信公众号 “ AIGC新知 “,作者 绛烨
【开源免费】AutoGPT是一个允许用户创建和运行智能体的(AI Agents)项目。用户创建的智能体能够自动执行各种任务,从而让AI有步骤的去解决实际问题。
项目地址:https://github.com/Significant-Gravitas/AutoGPT
【开源免费】MetaGPT是一个“软件开发公司”的智能体项目,只需要输入一句话的老板需求,MetaGPT即可输出用户故事 / 竞品分析 / 需求 / 数据结构 / APIs / 文件等软件开发的相关内容。MetaGPT内置了各种AI角色,包括产品经理 / 架构师 / 项目经理 / 工程师,MetaGPT提供了一个精心调配的软件公司研发全过程的SOP。
项目地址:https://github.com/geekan/MetaGPT/blob/main/docs/README_CN.md
【开源免费】FASTGPT是基于LLM的知识库开源项目,提供开箱即用的数据处理、模型调用等能力。整体功能和“Dify”“RAGFlow”项目类似。很多接入微信,飞书的AI项目都基于该项目二次开发。
项目地址:https://github.com/labring/FastGPT
【开源免费】MindSearch是一个模仿人类思考方式的AI搜索引擎框架,其性能可与 Perplexity和ChatGPT-Web相媲美。
项目地址:https://github.com/InternLM/MindSearch
在线使用:https://mindsearch.openxlab.org.cn/
【开源免费】Morphic是一个由AI驱动的搜索引擎。该项目开源免费,搜索结果包含文本,图片,视频等各种AI搜索所需要的必备功能。相对于其他开源AI搜索项目,测试搜索结果最好。
项目地址:https://github.com/miurla/morphic/tree/main
在线使用:https://www.morphic.sh/
【开源免费】LangGPT 是一个通过结构化和模板化的方法,编写高质量的AI提示词的开源项目。它可以让任何非专业的用户轻松创建高水平的提示词,进而高质量的帮助用户通过AI解决问题。
项目地址:https://github.com/langgptai/LangGPT/blob/main/README_zh.md
在线使用:https://kimi.moonshot.cn/kimiplus/conpg00t7lagbbsfqkq0