<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>RongYe.Liu</title>
        <link>http://rongyeliu.com/</link>
        <description>带你进入AIGC 世界</description>
        <lastBuildDate>Fri, 18 Jul 2025 09:41:24 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2025, RongYe.Liu</copyright>
        <item>
            <title><![CDATA[微博热点监控bot]]></title>
            <link>http://rongyeliu.com/工作流/110bee47-9834-8084-9adc-d7ca31b9857e</link>
            <guid>http://rongyeliu.com/工作流/110bee47-9834-8084-9adc-d7ca31b9857e</guid>
            <pubDate>Sun, 29 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[微博热点监控bot]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-110bee47983480849adcd7ca31b9857e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-111bee47983480158733f5d072282e5a" data-id="111bee47983480158733f5d072282e5a"><span><div id="111bee47983480158733f5d072282e5a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#111bee47983480158733f5d072282e5a" title="一、为什么有这bot"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、为什么有这bot</span></span></h2><ul class="notion-list notion-list-disc notion-block-111bee479834801b8dc1d59352b142c3"><li>现在热点时效性非常的高，所以营销一定要合适合理蹭热度。但是不是所有的热点都适合，一不留神都会变成负反馈。以前是需要用人工来处理这方面的工作，现在有AI+agent 结合，可以解放人力，而且能一劳永逸批量生成符合的文章</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-111bee47983480abad6cc38f28f7c893" data-id="111bee47983480abad6cc38f28f7c893"><span><div id="111bee47983480abad6cc38f28f7c893" class="notion-header-anchor"></div><a class="notion-hash-link" href="#111bee47983480abad6cc38f28f7c893" title="二、制作逻辑"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、制作逻辑</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-111bee479834806587e1fdab1ea0f545"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2Fbac3a16d-65b6-40ea-8e9c-5c1111845548%2Fimage.png?table=block&amp;id=111bee47-9834-8065-87e1-fdab1ea0f545&amp;t=111bee47-9834-8065-87e1-fdab1ea0f545&amp;width=707.96875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-111bee479834806cb293d7defc1d4222">如图</div><ul class="notion-list notion-list-disc notion-block-111bee47983480119333e65ed73f7303"><li>获取微博热榜</li></ul><ul class="notion-list notion-list-disc notion-block-111bee47983480bba85ffdfacc7eb636"><li>检阅热榜内容是否符合规范</li></ul><ul class="notion-list notion-list-disc notion-block-111bee47983480fcbb3dce2e9722ea03"><li>进行实时热点新闻软广、推文、评论等操作</li></ul><ul class="notion-list notion-list-disc notion-block-111bee4798348001bb47e06e13a9e9aa"><li>添加贴文配图</li></ul><ul class="notion-list notion-list-disc notion-block-111bee4798348069806dfdca9a5436b5"><li>平台发送</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-111bee47983480009975d9159e1991a9" data-id="111bee47983480009975d9159e1991a9"><span><div id="111bee47983480009975d9159e1991a9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#111bee47983480009975d9159e1991a9" title="三、实现效果"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、实现效果</span></span></h2><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-111bee47983480a4b144fc3b074b43a1" data-id="111bee47983480a4b144fc3b074b43a1"><span><div id="111bee47983480a4b144fc3b074b43a1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#111bee47983480a4b144fc3b074b43a1" title="四、后续拓展"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、后续拓展</span></span></h2><ul class="notion-list notion-list-disc notion-block-111bee47983480a49040e1233a1b8226"><li>这套逻辑可拓展性很高</li><ul class="notion-list notion-list-disc notion-block-111bee47983480a49040e1233a1b8226"><li>1，可以多账号联动性</li><li>2，添加前端和后台，能组成一完整产品</li><li>3，多个节点能组合拼装，例如：</li><ul class="notion-list notion-list-disc notion-block-111bee479834803a804de7c149aefe46"><li>热点能换成数据库，就能定时发送数据库内容</li><li>帖文换成评论、时评等</li></ul><li>4，丰富生成能力，能调用ai图片、ai视频 组成纯ai 高质产品</li></ul></ul><div class="notion-blank notion-block-111bee4798348011b105f8a126ea80a0"> </div><div class="notion-text notion-block-111bee47983480748761f3f5fa559725"><b>起号、养号、营销等操作，能更得心应手</b></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-111bee4798348050bd60ccce99adf59e" data-id="111bee4798348050bd60ccce99adf59e"><span><div id="111bee4798348050bd60ccce99adf59e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#111bee4798348050bd60ccce99adf59e" title="五、附录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、附录</span></span></h2><div class="notion-text notion-block-111bee479834807a8665c583259e20e4">1，热评bot 体验</div><div class="notion-text notion-block-111bee4798348045aedec595c39b3c3f">微博热评-bot—体验链接</div><div class="notion-text notion-block-111bee47983480e9a139e4ecf9ba89ae">2，相关指令和代码</div><ul class="notion-list notion-list-disc notion-block-111bee47983480d0ab45d73a3a5a7775"><li>Http请求（python）</li></ul><ul class="notion-list notion-list-disc notion-block-111bee479834807eae30d53ee3a3a22b"><li>参数提取器：</li></ul><ul class="notion-list notion-list-disc notion-block-111bee4798348034bb22c8963152f0db"><li>内容检阅</li></ul><ul class="notion-list notion-list-disc notion-block-111bee47983480cb9ebbe18aeb181856"><li>嘴替小明</li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[手动创建 Openai-O1]]></title>
            <link>http://rongyeliu.com/工作流/10cbee47-9834-809d-bc78-ccb7749ae843</link>
            <guid>http://rongyeliu.com/工作流/10cbee47-9834-809d-bc78-ccb7749ae843</guid>
            <pubDate>Wed, 25 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[手动创建 OpenAi-o1]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-10cbee479834809dbc78ccb7749ae843"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-10cbee47983480b29a77e53f5c1bf89f" data-id="10cbee47983480b29a77e53f5c1bf89f"><span><div id="10cbee47983480b29a77e53f5c1bf89f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#10cbee47983480b29a77e53f5c1bf89f" title="一、Openai-o1"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、Openai-o1</span></span></h3><div class="notion-text notion-block-10cbee47983480afb501ea590ca1ed7b">2024年9月12日，天空一声惊响，草莓（openai-o1前身）闪亮登场。鸽了半年，万众期待的🍓终于上线。OpenAI o1 能进行推理复杂人物，并解决比以前的科学、编码和数学模型更难的问题。那么怎么才能使用OpenAI o1 呢？有两种方式</div><ul class="notion-list notion-list-disc notion-block-10cbee47983480bdb937f8d55880c81d"><li>订阅chatGPT plus网页版，能选择使用 OpenAI-o1 30条/周，OpenAI-o1 mini 50条/周</li></ul><ul class="notion-list notion-list-disc notion-block-10cbee47983480ae9eaadf539e72f03f"><li>OpenAi-o1 开发者账户，每月api 请求量 1000$（7400¥） 以上能调用 1000次/分钟</li></ul><div class="notion-blank notion-block-10cbee47983480f086f8ffe07609ac42"> </div><div class="notion-text notion-block-10cbee47983480d9a553d86d7f43f691">这两种方式，对国内用户都不怎么友好，自从 OpenAi 封禁大陆网络之后情况更加严峻。</div><div class="notion-text notion-block-10cbee4798348004a3cef9354a498e69">在国内大模型厂商还没跟进 o1 全新的版本出相关模型之前，我们怎么体验 o1 的强大呢？</div><div class="notion-text notion-block-10cbee4798348047b045d38fdd1e2a76">在这里，将用 dify 平台和 Qwen2.1 70B 手搓一个 o1。</div><div class="notion-blank notion-block-10cbee4798348090b84ac477bd1a511d"> </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-10cbee47983480b2b12be15eb333f0d2" data-id="10cbee47983480b2b12be15eb333f0d2"><span><div id="10cbee47983480b2b12be15eb333f0d2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#10cbee47983480b2b12be15eb333f0d2" title="二、OpenAI-o1 原理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、OpenAI-o1 原理</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-110bee47983480efae8dc9ce9ce9153e" data-id="110bee47983480efae8dc9ce9ce9153e"><span><div id="110bee47983480efae8dc9ce9ce9153e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee47983480efae8dc9ce9ce9153e" title="（1）思维链"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">（1）思维链</span></span></h4><ul class="notion-list notion-list-disc notion-block-110bee479834808da21ac87d60cc2546"><li>要徒手实现一个 OpenAI-o1 ，首先得理解他原理，根据已经释放出来的数据和测试，OpenAI-o1 很有可能是由至少3个基础模型，经过 COT（思维链）方式。</li></ul><ul class="notion-list notion-list-disc notion-block-110bee4798348034bfd3f144c6a0eaae"><li>COT（思维链）是 prompt engineeing （提示词工程）一个技能，用于减少大模型的幻觉产生。自从提出来之后，经历了许多的变种。</li></ul><div class="notion-blank notion-block-110bee47983480aca14ae8e525ceda5f"> </div><div class="notion-text notion-block-110bee47983480889d59ece6bd2435c2">首先来看图</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee47983480bbbc7fca2f6f31adc9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F66669898-682f-42e2-9d01-1dce4096727a%2Fimage.png?table=block&amp;id=110bee47-9834-80bb-bc7f-ca2f6f31adc9&amp;t=110bee47-9834-80bb-bc7f-ca2f6f31adc9&amp;width=2674&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-110bee47983480f6aa53d9f443f358c3"><li>(IO）最左边的就是我们最经常与大模型交互的形式，直接对话⇒输出</li></ul><ul class="notion-list notion-list-disc notion-block-110bee47983480cd9094f93678f03d56"><li>(COT) 这就是，零样本COT，通过添加一句魔法词， let’s think step by step(让我们逐步思考）</li></ul><ul class="notion-list notion-list-disc notion-block-110bee47983480de9053c2526a16a9f7"><li>（COT-SC）自洽性COT，通过生成多个推理链路，选择出现频率最高的答案，以提高一致性和准确性</li></ul><ul class="notion-list notion-list-disc notion-block-110bee4798348022bea5cba590e813e2"><li>（TOT）思维树，将问题分为多个小问题，并且解决问题过程为树状，每个节点代表一个中间状态或者思考步骤，然后可以探索作中可能的解决路径，并抉择最佳的一个</li></ul><div class="notion-blank notion-block-110bee47983480c3add6dc8604b3f8ce"> </div><div class="notion-text notion-block-110bee47983480919833c4acec52ed74"><b>总的来说，思维链，就是给时间大模型，引导大模型进行思考</b></div><div class="notion-blank notion-block-110bee47983480738fc1e1c9f6e80507"> </div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-110bee4798348026b398f269542a7da5" data-id="110bee4798348026b398f269542a7da5"><span><div id="110bee4798348026b398f269542a7da5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee4798348026b398f269542a7da5" title="（2）OpenAI-o1 思维链路实现方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">（2）OpenAI-o1 思维链路实现方式</span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-10cbee47983480c8b888e99182cf929b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F57105df4-cfb3-4e65-b88b-4e4d7f40bd0b%2Fimage.png?table=block&amp;id=10cbee47-9834-80c8-b888-e99182cf929b&amp;t=10cbee47-9834-80c8-b888-e99182cf929b&amp;width=707.9921875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-110bee4798348054aedfd3a4bd2624f7"><li>由图得知，OpenAi-o1 的思维链（COT）的实现逻辑如下</li><ul class="notion-list notion-list-disc notion-block-110bee4798348054aedfd3a4bd2624f7"><li>获取用户输入，进行思考，解答（步骤1）</li><li>将步骤1，所有内容作为，步骤2输入</li><li>将步骤2，所有内容作为，步骤3输入</li><li>最后汇总分析，将分析结果输出，其他所有过程内容隐藏</li></ul></ul><div class="notion-blank notion-block-110bee47983480e1bbf7d8bbd728647c"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-110bee47983480dd827bf4726eaafcef" data-id="110bee47983480dd827bf4726eaafcef"><span><div id="110bee47983480dd827bf4726eaafcef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee47983480dd827bf4726eaafcef" title="三、Dify 构建OpenAI-o1"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、Dify 构建OpenAI-o1</span></span></h2><ul class="notion-list notion-list-disc notion-block-110bee479834801aa577f98ad8275e68"><li>使用dify 构建OpenAi-o1 工作流，我这里选用基础模型是，GPT-4o，当然也可以选择免费版本（Qwen2-70B、Llama3.1 405B）也有不错的效果。</li></ul><ul class="notion-list notion-list-disc notion-block-110bee4798348040807cdbc40008c0d5"><li>实现的指令集和 工作流 DLS 会放在文章末尾</li></ul><div class="notion-blank notion-block-110bee4798348097b2ead6b364dbb867"> </div><ul class="notion-list notion-list-disc notion-block-110bee47983480c0ae83cda13cf8502d"><li>整体实现链路如下</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee47983480ba9a6fd24066510a01"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F54a538b2-76a5-4c87-94b3-a94ec4e689bc%2Fimage.png?table=block&amp;id=110bee47-9834-80ba-9a6f-d24066510a01&amp;t=110bee47-9834-80ba-9a6f-d24066510a01&amp;width=2288&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-110bee4798348049945dc2f6fb1c4cf1"> </div><ul class="notion-list notion-list-disc notion-block-110bee479834800e91bce80b2a97c32d"><li>具体逻辑如下</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee47983480daa2b7c1fc425699e4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2Fcdf0c9f0-19eb-4a73-a61b-e71db881456a%2Fimage.png?table=block&amp;id=110bee47-9834-80da-a2b7-c1fc425699e4&amp;t=110bee47-9834-80da-a2b7-c1fc425699e4&amp;width=2312&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-110bee47983480299e57c2f829ccbaf3"><li>对用户的问题进行分解，然后将每个小问题进行解答，最后把问题+小问题答案汇总分析解答。</li></ul><div class="notion-blank notion-block-110bee4798348094b947f7a6f98be8c0"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-110bee47983480208591ea3977bd1d0b" data-id="110bee47983480208591ea3977bd1d0b"><span><div id="110bee47983480208591ea3977bd1d0b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee47983480208591ea3977bd1d0b" title="四、测试效果"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、测试效果</span></span></h2><div class="notion-blank notion-block-110bee4798348072bd1ff92e503411d6"> </div><ul class="notion-list notion-list-disc notion-block-110bee47983480d29d26e6fa4730558e"><li>经典小数问题</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee47983480b78652df9449c13eb2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2Fd5401506-a41b-4e89-9d04-e9458abbbe5b%2Fimage.png?table=block&amp;id=110bee47-9834-80b7-8652-df9449c13eb2&amp;t=110bee47-9834-80b7-8652-df9449c13eb2&amp;width=707.9921875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-110bee4798348095aa25f851275c7544"> </div><ul class="notion-list notion-list-disc notion-block-110bee47983480a6a1ece9b821f5f6f4"><li>草莓（strawberry）文本问题</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee479834806fb635ed1cf1467a11"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F0cc8bad9-8358-48da-ab6b-39dcd9d2ebf4%2Fimage.png?table=block&amp;id=110bee47-9834-806f-b635-ed1cf1467a11&amp;t=110bee47-9834-806f-b635-ed1cf1467a11&amp;width=708&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-110bee47983480938967cdfa70c7930c"> </div><ul class="notion-list notion-list-disc notion-block-110bee47983480adb6eefe42f368df70"><li>鸡兔同笼问题</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-110bee4798348015bcf0d357121808d6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F2e665b95-bdb5-4e20-bf31-99333c6bd0d7%2Fimage.png?table=block&amp;id=110bee47-9834-8015-bcf0-d357121808d6&amp;t=110bee47-9834-8015-bcf0-d357121808d6&amp;width=707.9921875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-110bee479834809eaf29cd559fb7b0ed"> </div><ul class="notion-list notion-list-disc notion-block-110bee4798348006a53ae86db1f56138"><li><b>由此可见，思维链（COT）结合模型基座，回答质量提升不少</b></li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-110bee4798348064bbb9e2771e3e9753" data-id="110bee4798348064bbb9e2771e3e9753"><span><div id="110bee4798348064bbb9e2771e3e9753" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee4798348064bbb9e2771e3e9753" title="五、附录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、附录</span></span></h2><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-110bee47983480489204c770014b1408" data-id="110bee47983480489204c770014b1408"><span><div id="110bee47983480489204c770014b1408" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee47983480489204c770014b1408" title="1，Dify OpenAI-o1 工作流，直接导入即可"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1，Dify OpenAI-o1 工作流，直接导入即可</span></span></h4><div class="notion-file notion-block-110bee47983480118a79f77920e2de45"><a target="_blank" rel="noopener noreferrer" class="notion-file-link" href="https://file.notion.so/f/f/b5b09254-95b8-4653-a32b-7cdfd008e7e3/d2a9a5f0-0db0-4a78-9bd1-3862a7829b53/Openai-o1.yml?table=block&amp;id=110bee47-9834-8011-8a79-f77920e2de45&amp;spaceId=b5b09254-95b8-4653-a32b-7cdfd008e7e3&amp;expirationTimestamp=1752854400000&amp;signature=jn82EbVnqO3J3nwlc-DhdtUVK51WXNx13ma3PSYsv9M"><svg class="notion-file-icon" viewBox="0 0 30 30"><path d="M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z"></path></svg><div class="notion-file-info"><div class="notion-file-title">Openai-o1.yml</div><div class="notion-file-size">13.0KB</div></div></a></div><div class="notion-blank notion-block-110bee47983480aabcc1ea5187922f3c"> </div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-110bee47983480c4b0fcc3424f781089" data-id="110bee47983480c4b0fcc3424f781089"><span><div id="110bee47983480c4b0fcc3424f781089" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee47983480c4b0fcc3424f781089" title="2，体验入口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2，体验入口</span></span></h4><div class="notion-text notion-block-110bee47983480e787c8f22b001d0f81"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://dify.bluefocuslibrary.com/chat/jvslJBHZExaIlOxy">Dify-OpenAI-o1</a></div><div class="notion-blank notion-block-110bee47983480c9af41c9999280d2ac"> </div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-110bee479834807bb327d177aa0e4a82" data-id="110bee479834807bb327d177aa0e4a82"><span><div id="110bee479834807bb327d177aa0e4a82" class="notion-header-anchor"></div><a class="notion-hash-link" href="#110bee479834807bb327d177aa0e4a82" title="3，指令集"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3，指令集</span></span></h4><div class="notion-text notion-block-110bee479834804d9083ccdcdc310f1f">（1）问题步骤拆分</div><div class="notion-blank notion-block-110bee479834802d89bbf3ae236e3fcb"> </div><div class="notion-text notion-block-110bee479834803387dcc87702ef90da">（2）步骤分析推理</div><div class="notion-blank notion-block-110bee47983480ef9487cf1de152af36"> </div><div class="notion-blank notion-block-110bee47983480a19527e2b7d059772d"> </div><div class="notion-text notion-block-110bee47983480ceaab0cd600683118d">（3）问题+上下文答案+最后解惑</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Super Prompt]]></title>
            <link>http://rongyeliu.com/指令集工程/10abee47-9834-8052-b667-faf827045879</link>
            <guid>http://rongyeliu.com/指令集工程/10abee47-9834-8052-b667-faf827045879</guid>
            <pubDate>Mon, 23 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[超级指令集]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-10abee4798348052b667faf827045879"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[写好prompt的六种策略]]></title>
            <link>http://rongyeliu.com/指令集工程/prompt-base-6</link>
            <guid>http://rongyeliu.com/指令集工程/prompt-base-6</guid>
            <pubDate>Wed, 28 Aug 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[写好prompt 的6种策略]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-864820529027468bbe02686ca4abbfdd"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-07bf0b6cac1a440b9816ef4bf70cfbac" data-id="07bf0b6cac1a440b9816ef4bf70cfbac"><span><div id="07bf0b6cac1a440b9816ef4bf70cfbac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#07bf0b6cac1a440b9816ef4bf70cfbac" title="一、为什么需要好的 prompt"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、为什么需要好的 prompt</span></span></h2><div class="notion-text notion-block-e8ee09303f544fef8b264f8654126476">虽然 LLM 无论你输入什么都能得到反馈，但是要获取想要的答案，还是需要一番功夫，目前 LLM 还有这样那样的一些缺点：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-4ed1174c9e8d404eb4117e20c06468f2"><li>数据偏见：因为预训练模型，不可避免具有主观的数据</li></ul><ul class="notion-list notion-list-disc notion-block-597d408d8553403496d4b91fd8fc3d5a"><li>缺乏理解：这点在一些小参数量的模型上尤为显著，说话上下文不连贯，而且意思不理解</li></ul><ul class="notion-list notion-list-disc notion-block-355fa380b7434bc696cf98a11906c24e"><li>时间理解局限性：这个很好理解，训练数据是有时效性的，所以不可避免理解不到最新的数据</li></ul><ul class="notion-list notion-list-disc notion-block-a047cd73b9e24f70bf8cb62b903568cc"><li>生成幻觉：这是 LLM 最重要的缺点，目前很多方面的技术，都在避免 LLM 产生幻觉</li></ul></div></div><div class="notion-text notion-block-98485fc2d22a441885df268a33d0548a">所以，prompt engineer （指令集工程）应允而生，llya （openai CTO已离职）也曾豪言说，以后的编程只剩下英语（自然语言）</div><div class="notion-blank notion-block-d3c18166a0be4501bdebca006a00e03c"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2ef1507c337e44d693711b6741a55ad3" data-id="2ef1507c337e44d693711b6741a55ad3"><span><div id="2ef1507c337e44d693711b6741a55ad3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2ef1507c337e44d693711b6741a55ad3" title="二、写好 prompt 的 6个原则"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、写好 prompt 的 6个原则</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-e0ca1209d28e4c228ee604d1d2bee8a4" data-id="e0ca1209d28e4c228ee604d1d2bee8a4"><span><div id="e0ca1209d28e4c228ee604d1d2bee8a4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e0ca1209d28e4c228ee604d1d2bee8a4" title="1，明确清晰的需求说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1，明确清晰的需求说明</span></span></h3><ul class="notion-list notion-list-disc notion-block-f73458c0433449a299dfad4717d42b6a"><li>不要客气，直接描述需求内容</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-46f4a6eb262d43d7b29a9ba094d0c0c4" data-id="46f4a6eb262d43d7b29a9ba094d0c0c4"><span><div id="46f4a6eb262d43d7b29a9ba094d0c0c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#46f4a6eb262d43d7b29a9ba094d0c0c4" title="2，提供参考文本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2，提供参考文本</span></span></h3><ul class="notion-list notion-list-disc notion-block-5a72a4537b094b1eb97d304f9b85acbd"><li>我们可以为模型提供与当前查询相关的可信信息，那么我们可以指示模型使用提供的信息来编写其答案。</li></ul><div class="notion-blank notion-block-f841c624aa9f4a8884bd05e43ab71811"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-546a4f9af0d943c1855f507422ab0977" data-id="546a4f9af0d943c1855f507422ab0977"><span><div id="546a4f9af0d943c1855f507422ab0977" class="notion-header-anchor"></div><a class="notion-hash-link" href="#546a4f9af0d943c1855f507422ab0977" title="3，将复杂的任务拆分为简单的小任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3，将复杂的任务拆分为简单的小任务</span></span></h3><ul class="notion-list notion-list-disc notion-block-21b7b4b7dc0542d2b1d5d88a89afcdf5"><li>需要独立指令来处理不同情况的任务，需要确定哪些是有益的</li></ul><ul class="notion-list notion-list-disc notion-block-19ce2dc5024048efb982e526f90ee7fb"><li>也可以将任务分解成一系列任务</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-435cd40337804af5a8151986ee5ed4ac" data-id="435cd40337804af5a8151986ee5ed4ac"><span><div id="435cd40337804af5a8151986ee5ed4ac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#435cd40337804af5a8151986ee5ed4ac" title="4，给模型时间”思考“"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4，给模型时间”思考“</span></span></h3><ul class="notion-list notion-list-disc notion-block-ba0a84ec60174cfebbaad73ded3a3d5b"><li>在匆忙得出结论前，制定模型制定自己的解决方案</li></ul><ul class="notion-list notion-list-disc notion-block-214d730805e44ddf8245e722fa5a08f1"><li>明确指示模型在得出结论之前从第一性原理进行推理时，会得到更好的结果</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-e311c3088dd74ca08694af36caf2297b" data-id="e311c3088dd74ca08694af36caf2297b"><span><div id="e311c3088dd74ca08694af36caf2297b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e311c3088dd74ca08694af36caf2297b" title="5，使用外部工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5，使用外部工具</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-ab961470086f44cf8d9d490b9c97d7b5" data-id="ab961470086f44cf8d9d490b9c97d7b5"><span><div id="ab961470086f44cf8d9d490b9c97d7b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ab961470086f44cf8d9d490b9c97d7b5" title="6，系统的测试更改"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6，系统的测试更改</span></span></h3><div class="notion-blank notion-block-8c1df289c3774f2c834c88f2f4c05db3"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[gpt 配置认知]]></title>
            <link>http://rongyeliu.com/指令集工程/prompt-config</link>
            <guid>http://rongyeliu.com/指令集工程/prompt-config</guid>
            <pubDate>Fri, 05 Nov 2021 00:00:00 GMT</pubDate>
            <description><![CDATA[怎么配置gpt 相关设定，和相关概念解释]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1455bcd4b37d4af1ac986e0f0144d16a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b7745a5388c343e8a7894241a51ab295" data-id="b7745a5388c343e8a7894241a51ab295"><span><div id="b7745a5388c343e8a7894241a51ab295" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b7745a5388c343e8a7894241a51ab295" title="一、GPT认知"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、GPT认知</span></span></h2><div class="notion-text notion-block-1306e8bd06f9415fb83551d1852c19c8"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://chatgpt.com/">ChatGPT</a> 是指网页版本对话，跟GPT 模型调用是不同的关系，账号也不通用。</div><div class="notion-text notion-block-50ab838f62ca4b0e83714235d6555161">ChatGPT plus 是网页版GPT 会员，能有更多的对话次数，和del3 的使用。</div><div class="notion-text notion-block-75b84cba0e9c4d4db11390abcbe46120">简单来说：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-2fd20fb843dc4989a5e8ea347b22da24"><li>ChatGPT 网页版GPT，对话聊天、Dell3 图片生成、语音返回；</li></ul><ul class="notion-list notion-list-disc notion-block-b68483e913b84bbf945c3ab2df0bc172"><li>GPT 模型 ，是需要 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://platform.openai.com/docs/api-reference/chat/create">platform</a> 平台调用，按照使用的模型，输入、输出的token 量来计费</li></ul></div></div><div class="notion-blank notion-block-fa353f0cc88349d49e9357e3406d0f6e"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-c081bca4366749f3bcbc8c7f62bb6387" data-id="c081bca4366749f3bcbc8c7f62bb6387"><span><div id="c081bca4366749f3bcbc8c7f62bb6387" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c081bca4366749f3bcbc8c7f62bb6387" title="二、GPT接口配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、GPT接口配置</span></span></h2><div class="notion-text notion-block-c75bcb8e39634c2282ce51266389455d">指令集工程配置，绕不开 LLM 先祖 openai 的接口， 他最开始统一了 LLM 调用接口结构，后续的LLM api 都遵循这个结构，以便能更好的复用；</div><div class="notion-blank notion-block-a39cde627fe640c18cb1260eb38691eb"> </div><ul class="notion-list notion-list-disc notion-block-96c91ae7f06d4d22bcdbf17eb647c6c9"><li>首先看看openai 官网的 api 文档，<b><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://platform.openai.com/docs/api-reference/chat/create">Create chat completion</a></b><b> 这个接口，现在已经有【default、image input、Streaming 、functions、Logprobs】功能</b></li></ul><ul class="notion-list notion-list-disc notion-block-4c6929c688ef4924bee7e650f4b04274"><li>最基础的 Default：</li></ul><div class="notion-blank notion-block-1a7f8be357474b86b9a96572e7f32ee0"> </div><div class="notion-text notion-block-cff8c14d0f924c23994f2d5f64471d3b">request：</div><ul class="notion-list notion-list-disc notion-block-e816439320594a8baf45a5137e8f760d"><li>着重讲讲 message 的参数</li><ul class="notion-list notion-list-disc notion-block-e816439320594a8baf45a5137e8f760d"><li>role分为三个角色</li><ul class="notion-list notion-list-disc notion-block-ffcc99bdf0dc41b59738d3d9d8821221"><li>system ：系统指令集，也就是指令工程地方</li><li>user：用户输入</li><li>assiatant：模型回复</li></ul></ul></ul><div class="notion-text notion-block-b667621a0cc741188c09b56868451a1b">response：</div><div class="notion-blank notion-block-4ad3becd104f4a4ba1f3a9c40899ae30"> </div><div class="notion-text notion-block-b694528d01724025aad25c08bc2a03e4">config:</div><div class="notion-text notion-block-6df51c1e15a841f598401a0b657cf514"><b>这里抽取最常用的几个配置说明</b><div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-90dbc94b725545a78e2c1380d625ea2c"><li>template : 越低，确定性越高，越高，随机性越强，标准 0.7 （0～1）</li></ul><ul class="notion-list notion-list-disc notion-block-b41f97d3ddbb4343b9e739339124062e"><li>top_p: 温度采样技术，核采样。例如，0.1表示只有10%会考虑之前的token。默认为1 。</li></ul><div class="notion-text notion-block-668a6693bfd94f4bb28fc6ba4567b823"><b>template 和top_p 只改动一个</b></div><div class="notion-blank notion-block-3e9388b0fbe04be88e49bcb40379ad17"> </div><ul class="notion-list notion-list-disc notion-block-aafffe66267d44be9ce33e1d51a69f89"><li><b>max_tokens：停止生成之前，生成的最大 token 数。跟选择的模型相关</b></li></ul><ul class="notion-list notion-list-disc notion-block-d75c741c95de40829bd2b1cd726beb85"><li>stop ：让模型停止生成的 4 字符</li></ul><ul class="notion-list notion-list-disc notion-block-c10ba0852c1d4d13a84401ffb34e2652"><li><b>frequency_penalty：频繁生成令牌惩罚，正值会根据新生成的token跟新频率惩罚，降低模型逐字重复的可能性（-2.0～2.0）</b></li></ul><div class="notion-blank notion-block-594c0bd16bae48cc8d4893364c4677f2"> </div></div></div><div class="notion-text notion-block-79abe4da01844559b4400003e644cc4a"><b>这些是api 接口调用的常用配置，但通常已经分装好的可以直接配置</b></div><div class="notion-blank notion-block-5f0784963d1342488d0c68b54196f450"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-eeab88abd9ee420098907a27df560143" data-id="eeab88abd9ee420098907a27df560143"><span><div id="eeab88abd9ee420098907a27df560143" class="notion-header-anchor"></div><a class="notion-hash-link" href="#eeab88abd9ee420098907a27df560143" title="三、token 是什么"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、token 是什么</span></span></h2><ul class="notion-list notion-list-disc notion-block-b7290270ed4e44aa9e1a58dbdf0064c2"><li>由于机器理解不了自然语言，例如中文。所有我们创作了utf-8 这种字符规则，token也是这样，模型理解内容的格式为向量（embedding），所以需要把输入的文本分割成单个元素，通常是单词、子词、符号。</li><ul class="notion-list notion-list-disc notion-block-b7290270ed4e44aa9e1a58dbdf0064c2"><li>例如：我爱学习，可以分割成三个tokens ： “我”，“爱”，“学习”；</li></ul></ul><ul class="notion-list notion-list-disc notion-block-f7da231b05654a2e963dbf10c7e6bc2e"><li>在处理文本时候，分词工具会把连续的文本转换为tokens ，这个过程称为向量化，具体可参考 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://platform.openai.com/tokenizer">Openai Tokenize</a></li></ul><ul class="notion-list notion-list-disc notion-block-8399530578644fa6a6761b19bbfc6061"><li>LLM 可以读取上下文中tokens 的内容，顺序和组合对模型理解和生成能力具有影响</li></ul><div class="notion-blank notion-block-01f8ba1d2de245959165c577465755e0"> </div><div class="notion-text notion-block-96b025c7d203423fab46d6f0ce2a5a4a"><span class="notion-orange"><b>token 就是人工智能中的基础单位</b></span><span class="notion-orange"> </span></div><div class="notion-blank notion-block-d751fb75524c449cb5d897098f28fff1"> </div><div class="notion-blank notion-block-9959605a5d1a4cddbb8063c045f848a6"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-8b92bffc5a544a588c522240ff258559" data-id="8b92bffc5a544a588c522240ff258559"><span><div id="8b92bffc5a544a588c522240ff258559" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8b92bffc5a544a588c522240ff258559" title="四、指令集工程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、指令集工程</span></span></h2><div class="notion-text notion-block-29a3ce317a6146c898019694cf0dac00"><b>提示词（Prompt）是用户发送给大语言模型的问题、指令或请求，</b>来明确地告诉模型用户想要解决的问题或完成的任务，是大语言模型理解用户需求并据此生成相关、准确回答或内容的基础。对于大语言模型来说，提示词就是用户输入给大语言模型的文本信息</div><div class="notion-blank notion-block-e98bb1afa540454abb748239bf85ea94"> </div><ul class="notion-list notion-list-disc notion-block-6ad3b54730b34a39a5caa6d03bb257ee"><li>通常 prompt 会写在，system_prompt 中，也就是上文接口中system 角色</li></ul><div class="notion-blank notion-block-ae31daab22504905958e8d02c3d7eb37"> </div><div class="notion-text notion-block-222428c146b546e1a40e3b71a72d02ef">以上就是就是指令集工程，相关的概念和配置介绍，后面会展开讲解，指令集工程相关内容：</div><ul class="notion-list notion-list-disc notion-block-ab55c0ba378b4a8fa9738ae6777aad47"><li>指令集工程</li><ul class="notion-list notion-list-disc notion-block-ab55c0ba378b4a8fa9738ae6777aad47"><li>基础规则</li><li>额外功能</li><li>进阶能力</li></ul></ul><ul class="notion-list notion-list-disc notion-block-ddea59d05d27470797d859e04ac8f04e"><li>markdown 语法结构</li></ul><ul class="notion-list notion-list-disc notion-block-4cf0e1d5997143f0b2a30cf943732933"><li>指令集框架</li></ul><ul class="notion-list notion-list-disc notion-block-b02d5e2d3709407d81187918abf82741"><li>指令集骇客</li></ul><ul class="notion-list notion-list-disc notion-block-eacad300b4a046c2ad941fc6dacf6f66"><li>减少偏差</li></ul><div class="notion-blank notion-block-9d8d3fd968494a0380fde869a80a4d97"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4⃣️工作流创作rag机器人]]></title>
            <link>http://rongyeliu.com/Dify 技术流/dify-rag-workflow</link>
            <guid>http://rongyeliu.com/Dify 技术流/dify-rag-workflow</guid>
            <pubDate>Mon, 26 Aug 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[使用工作流，和知识库创作rag机器人]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-c338907c5db84c86a6201e90fdcf0308"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a645d6f5e50e4906825d6caf86b4a0d1" data-id="a645d6f5e50e4906825d6caf86b4a0d1"><span><div id="a645d6f5e50e4906825d6caf86b4a0d1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a645d6f5e50e4906825d6caf86b4a0d1" title="一、工作流是什么"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、工作流是什么</span></span></h2><div class="notion-text notion-block-c9f17be3ec6348e799d4795786f607e9">在使用 LLM 处理复杂流程，和需要遍历迭代的流程时候，就需要使用工作流，能将使用步骤，通组件、工具方式，拖拉填写，就创立出一个完整的 Ai Bot。</div><div class="notion-text notion-block-8d6f39492fa84ba89bcfedef6ed3f3d8">可以说，工作流是，Dify 的核心功能，也是所有ai-agent 平台的核心功能，dify 工作流功能强大，几乎能实现用需要 llm 实现的工作。</div><div class="notion-blank notion-block-8a2436d40c4047b7875c9edbfaee5fbc"> </div><div class="notion-text notion-block-cbe2cb1b7c0745f0a8d920ebdec4cb94"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-0212e7740f1d45b9b764c002147d98b9" data-id="0212e7740f1d45b9b764c002147d98b9"><span><div id="0212e7740f1d45b9b764c002147d98b9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0212e7740f1d45b9b764c002147d98b9" title="二、工作流面板"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、工作流面板</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1132d75fc6f34dca99e10251227d4c1f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F869d9355-c70a-4a8b-8b1e-4aa6e0f2507a%2Fimage.png?table=block&amp;id=1132d75f-c6f3-4dca-99e1-0251227d4c1f&amp;t=1132d75f-c6f3-4dca-99e1-0251227d4c1f&amp;width=2864&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-c8af545a5f154beab4c8f0ef62924257">点击创建空白应用，通过工作流编排、工作，工作流，即可创建工作流</div><div class="notion-blank notion-block-5bd09ed49c4c4dde92ceb4cfd38c3e4a"> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-770433e33c894621b3cce3fd478d0a0b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F7c6b6abb-afa7-4a6c-bf3c-3c19aacbd0d0%2Fimage.png?table=block&amp;id=770433e3-3c89-4621-b3cc-e3fd478d0a0b&amp;t=770433e3-3c89-4621-b3cc-e3fd478d0a0b&amp;width=2870&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-2576789869544ed4b53b306f9ecb9b97"> </div><div class="notion-text notion-block-b29836032cc843f6be3ce87792a3306a">在这里先介绍下dify 工作流面板中各个节点的概念、和功能（详细可以查看<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://docs.dify.ai/v/zh-hans/guides/workflow/node">官方文档</a>）：</div><div class="notion-blank notion-block-817632bae7bd430fb1f9083c42f990c9"> </div><ul class="notion-list notion-list-disc notion-block-6206467742234621aeec893fea80d681"><li>基础</li><ul class="notion-list notion-list-disc notion-block-6206467742234621aeec893fea80d681"><li>LLM ： 大脑，可以选择已配置的模型（模型相关配置可以参考我之前的<a class="notion-link" href="/1455bcd4b37d4af1ac986e0f0144d16a">文章</a>）</li><li>知识检索：使用知识库功能</li><li>直接回复：在聊天助手-工作流编排 中，可以根据 LLM 处理情况，中途回复</li><li>结束：在 工作流 中，是最后的输出</li></ul></ul><ul class="notion-list notion-list-disc notion-block-6462dcb83847457da0f7b3bb3483fb32"><li>问题理解</li><ul class="notion-list notion-list-disc notion-block-6462dcb83847457da0f7b3bb3483fb32"><li>问题分类：能使用 LLM 来判断用户输入的内容，属于那些类型</li></ul></ul><ul class="notion-list notion-list-disc notion-block-eee7781ea34a4ec2bb59d28c06f13b8a"><li>逻辑</li><ul class="notion-list notion-list-disc notion-block-eee7781ea34a4ec2bb59d28c06f13b8a"><li>条件分支：类似程序编码中的 if / else</li><li>迭代：类似程序编码中的for 循环</li></ul></ul><ul class="notion-list notion-list-disc notion-block-3166ba51364c456cb9ee21bce6c0a7c8"><li>转换</li><ul class="notion-list notion-list-disc notion-block-3166ba51364c456cb9ee21bce6c0a7c8"><li>代码执行：可以执行沙盒中的，python、node 代码，有限功能</li><li>模板转换：能将输入使用 jinja2 模板格式输出（用于整理数据结构）</li><li>变量聚合器：可将多个聚合成组，或者一个变量</li><li>变量赋值：能中途操作变量，有覆盖、追加、清空功能</li><li>参数提取：使用 LLM 从内容中提取信息（多用于结构内容提取、LLM 内容信息总结等）</li><li>HTTP请求：可以发送HTTP请求，实现调用外部api 功能</li></ul></ul><div class="notion-blank notion-block-8a2fd832f9754f9898272eb49b7ef602"> </div><div class="notion-text notion-block-054b7e1b58db441fb443b370bab30f5f">点击每一个节点，可以单独运行、查看说明文档、复制、删除等功能</div><div class="notion-blank notion-block-b7cc700a507a4b15aa15bb08d546ab29"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b033ba64da43468bb99856001599ba19" data-id="b033ba64da43468bb99856001599ba19"><span><div id="b033ba64da43468bb99856001599ba19" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b033ba64da43468bb99856001599ba19" title="三、知识库创建"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、知识库创建</span></span></h2><div class="notion-text notion-block-a5f2031ba1204c5782e892d9a7298758">发现知识库，短短一段讲不明白，可参考这篇，<a class="notion-link" href="/cf413e9c94a442f9980b57ade74bee1d">知识库创建</a></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-21afb204ea9b4e80ac8d629d859ec22f" data-id="21afb204ea9b4e80ac8d629d859ec22f"><span><div id="21afb204ea9b4e80ac8d629d859ec22f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21afb204ea9b4e80ac8d629d859ec22f" title="四、创建rag 应用工作流"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、创建rag 应用工作流</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9016ddd4cff046a8951d8f2b0d041ca0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F2afb67c5-909f-41e8-9f19-6b99ad73b20e%2Fimage.png?table=block&amp;id=9016ddd4-cff0-46a8-951d-8f2b0d041ca0&amp;t=9016ddd4-cff0-46a8-951d-8f2b0d041ca0&amp;width=2864&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2d7e371f74c54f82b728a3e7fb0ceb72">填写好指令集，将知识库检索的内容作为上下文，放入指令集、或者User 回答中。</div><div class="notion-blank notion-block-bf3bf6f9cf0246918a54bbb467e8a46d"> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-66e060f04fc04b02b9ff3ffdd67005e1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fb5b09254-95b8-4653-a32b-7cdfd008e7e3%2F30e1b172-3e5e-47ef-bc5b-7d1bed057177%2Fimage.png?table=block&amp;id=66e060f0-4fc0-4b02-b9ff-3ffdd67005e1&amp;t=66e060f0-4fc0-4b02-b9ff-3ffdd67005e1&amp;width=2866&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-4ce70e56ac6740eb855e3204180b2ab6">测试工作流：<div class="notion-text-children"><div class="notion-text notion-block-ba1cb6b77267497c8572d9b1c77a8029">从图中可以看出，我们提问书中的内容，也确实得到书中的回答。但是，并没有得到想要的答案。</div><div class="notion-text notion-block-52fc53f367a74922b9105824b0f37d18">这是为什么呢，看图知识检索过程，发现根据问题获取的，相似度文段，只有短短一段，并没有完整的文段。</div><div class="notion-text notion-block-aeb2b30239874a758403765ca9170935">这就需要重新清洗知识库数据，查看分割文段设置</div><div class="notion-blank notion-block-e6958c1cd6854c05956434fb8a2e54bd"> </div><div class="notion-blank notion-block-b88b12bca887482ba1a2deccd1ddf9f5"> </div><div class="notion-blank notion-block-3d09bf0756dd4bc99766ec64a577e815"> </div><div class="notion-blank notion-block-16549d3c53e74b86acd66eb076791405"> </div></div></div><div class="notion-text notion-block-867d02c6fcd44c13a114447bfcf64103"><b>总而言之，这就是创建一个工作流的流程，后续我们来创建 agent 应用</b></div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>