<?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>NotionNext BLOG</title>
        <link>https://qftie.vercel.app//</link>
        <description>这是一个由NotionNext生成的站点</description>
        <lastBuildDate>Sun, 08 Sep 2024 16:40:32 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 2024, MapleTx</copyright>
        <item>
            <title><![CDATA[问题出现我再告诉大家【Word论文格式】]]></title>
            <link>https://qftie.vercel.app//article/word</link>
            <guid>https://qftie.vercel.app//article/word</guid>
            <pubDate>Fri, 02 Jul 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-f3d0524223b2426ea4b3ec8c4f1ce28b"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-539182ee4cc343f4ab0c33c8f1efcf98">记录一些毕设格式相关问题：</div><div class="notion-text notion-block-2ba6c4fca93d4b2bad25f82575096fc0">问题1：endnote 无法将引用转为论文内可跳转的格式</div><div class="notion-text notion-block-11fe2cec2f5d48378667cac42e18e006">解决方案：</div><ol start="1" class="notion-list notion-list-numbered notion-block-98a8a9b9c50540d2ad9c82300df8416a"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.howsci.com/endnote-word-links.html">EndNote 在 Word 中的引文点击直达参考文献 | 科研动力 (howsci.com)</a></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-4d0b6d6a99724ac1896303d9c81ff0f6"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wenku.baidu.com/view/93b56257915f804d2b16c1f3.html?_wkts_=1713513203149">用EndNote插入参考文献无法格式化解决方案 - 百度文库 (baidu.com)</a></li></ol><div class="notion-blank notion-block-476ed380938a420d9644d56c80063a59"> </div><div class="notion-text notion-block-da328eeb766447d88ae71cb85a33b066">问题2：word转PDF，如何既保证高清又保留</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[问题出现我再告诉大家【深度学习】]]></title>
            <link>https://qftie.vercel.app//article/question-dl</link>
            <guid>https://qftie.vercel.app//article/question-dl</guid>
            <pubDate>Fri, 02 Jul 2021 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-a047bb12a7a746e68797bbabf059c410"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-26df183f0e5b453d8c1c07500eefecef"><b>问题1：</b>显卡有显存占用，但使用率为0，但看不到可以杀的进程</div><div class="notion-text notion-block-8d680107dc9845fa9ad2c0586f87d2f1"><b>解决：</b>将特定显卡的进程全部杀掉，包括僵尸进程不能直接使用 PID 杀的进程等</div><div class="notion-blank notion-block-91b033dddc924611bb2e57443a78f575"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[【科技爱好者季度文摘】2024Q1]]></title>
            <link>https://qftie.vercel.app//article/tech-lover-2024-q1</link>
            <guid>https://qftie.vercel.app//article/tech-lover-2024-q1</guid>
            <pubDate>Fri, 02 Jul 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2b6cdfade7df4340a94fb7e77f9a87b6"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-86c3920b0bda4a45b008fffc3d655b17" data-id="86c3920b0bda4a45b008fffc3d655b17"><span><div id="86c3920b0bda4a45b008fffc3d655b17" class="notion-header-anchor"></div><a class="notion-hash-link" href="#86c3920b0bda4a45b008fffc3d655b17" title="言论 &amp; 文摘"><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">言论 &amp; 文摘</span></span></h3><ul class="notion-list notion-list-disc notion-block-cf5e2a00fd2440faa231fc75593af5e2"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.businessweekly.com.tw/management/blog/3014278">解决团队分歧的四种方式</a></li></ul><div class="notion-text notion-block-6937f39eda634008921065f4f69bed60">团队成员之间，经常会因为不同意见发生分歧。</div><div class="notion-text notion-block-891b369b17074153b98395837603e898">有些分歧，最终会达成一致意见；另一些分歧，谁也无法说服谁，难以达成一致。</div><div class="notion-text notion-block-a38483ee4fbc44f1b78da75fe02a3c55">团队内部无法达成一致时，可能会出现四种决策方式。</div><div class="notion-text notion-block-0d00f9e710bd4762b5c8eb401af1b527"><b>方式一：我不同意，但一旦决策定了，我就会一起努力。</b></div><div class="notion-text notion-block-d0a24ea9ccd94975b8e13e6689145f2f">亚马逊创始人贝佐斯说：&quot;当我跟一个主管反复讨论后，他不同意我的看法。虽然我不认为他正确，但我愿意陪他赌一把。我们认识几十年了，我觉得他可能比我更接近真相。其实我也不知道自己的决定是否正确，干脆照着下属的想法走。&quot;</div><div class="notion-text notion-block-399a24c7f9fb453b960c46ccd0d7b0a3">这样有几个好处：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-94e9af2538b64152acc1f712c9d96950"><li>至少产生了一个大家同意的决策。</li></ul><ul class="notion-list notion-list-disc notion-block-696e9945e6154c47a2d94832003a2bf5"><li>事后不会互相埋怨。</li></ul><ul class="notion-list notion-list-disc notion-block-540081916d2643f59650d4ee33927d9f"><li>有利于形成真正的团队精神。</li></ul></div></div><div class="notion-text notion-block-fc8e9ff072274dfe9f23f284c731d8d7"><b>方式二：双方各退一步，互相&quot;妥协&quot;（Compromise）。</b></div><div class="notion-text notion-block-0c62d10fea04497389f00e6d4fed1c95">这种做法是在双方立场之间，找一个中间点作为决策。这个房间我认为12尺高，你认为11尺高，最后大家同意把它的高度定为11.5尺。</div><div class="notion-text notion-block-2f34e376b8874c6284fbdef201835e95">这种决策方式很糟糕，因为11.5尺根本不是真相，只是因为找出真相需要耗费太多的能量，&quot;妥协&quot;让大家以一种节省能量的方式达成共识。</div><div class="notion-text notion-block-6fc68238beab4ba4888c8603901d3691">真正可取的做法是，凡是可以找到真相的事情，都不应该妥协。</div><div class="notion-text notion-block-26caf59bc8ff40ed8f84b3171a403d3e"><b>方式三：比谁更固执。</b></div><div class="notion-text notion-block-25ad229a317b4a68a1a6e739ce2be3b5">争论的双方进行持久战，最先坚持不下去的人就会投降。</div><div class="notion-text notion-block-61dd4525e0234637a4038d9fc267bb5b">这种决策方式既没有得到真相，又大伤团队元气。所以，必须禁止这种方式，不允许用消耗对方的方式达成协议。</div><div class="notion-text notion-block-66ec79a689104ac58878d2f7c2df6f3c"><b>方式四：提供给上级，由上级决定。</b></div><div class="notion-text notion-block-8b27b5e50f5b469d9822c1ba40f806a1">这种方式可以外包决策过程，也不会伤害团队成员之间的感情。缺点是大家没有去尽力找寻真相，团队思想也没有真正达成统一。</div><div class="notion-text notion-block-69fbee2d294e451ca164d2011fc82403">总结：建议采用第一种决策方式&quot;不同意、但尽力去做&quot;。</div><div class="notion-text notion-block-cd7e2e2fca014bdfbf97c901bd9cf232">这种方式不一定是正确决策，但是对于企业来说，有一个速度问题：决策速度必须要快，不能拖延，团队要始终保持高速度。第一种决策方式，至少可以保证决策会在短时间内产生，把事情向前推进。</div><div class="notion-blank notion-block-bf5031eabd1340d6ae98eca83c762133"> </div><ul class="notion-list notion-list-disc notion-block-373fa58207f740a2ab618e62d139e6f7"><li>如果一个行业向不擅长其工作的人支付高薪，这是一个信号，表明该行业存在泡沫。- <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bloomberg.com/opinion/articles/2023-11-03/the-tech-gold-rush-is-over-the-search-for-the-next-gold-rush-is-on">Bloomberg.com</a></li></ul><div class="notion-blank notion-block-0522072ccb0441b19bd00dc78c9a90fe"> </div><ul class="notion-list notion-list-disc notion-block-f8b5fe54ee414c96a01948d07ecdec78"><li>任何不经常改主意的人，都大大低估了我们生活的世界的复杂性。- 贝佐斯，亚马逊创始人</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-e4c1e4de8f0143158d1fe8f6d909f7ec" data-id="e4c1e4de8f0143158d1fe8f6d909f7ec"><span><div id="e4c1e4de8f0143158d1fe8f6d909f7ec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e4c1e4de8f0143158d1fe8f6d909f7ec" 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></h3><ul class="notion-list notion-list-disc notion-block-4e380c504de643de889036f9b0d7778c"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.aadhav.me/posts/collaborative-editor">文本编辑器实时协同的原理和实现</a>（英文）</li></ul><ul class="notion-list notion-list-disc notion-block-30131c3c20be4e488d83c3e54e054a1a"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/ruanyf/weekly/issues/3806">vocal-separate</a> 一款极简的人声和背景音乐分离工具，将音视频文件分离为单独的人声文件和伴奏文件，完全本地化作业，无需连接外网。</li></ul><ul class="notion-list notion-list-disc notion-block-38604c218aaf4db6a355fa83038c8d5d"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://trendingpapers.com/">计算机科学热门论文</a>（英文）该网站按照动态排名，列出计算机领域的最新热门论文。</li></ul><ul class="notion-list notion-list-disc notion-block-f982d3def0554c52a13af4e4e43bcc71"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://blog.roboflow.com/first-impressions-with-google-gemini/">Google Gemini 的图像能力测试</a>（英文）一个外国程序员分别对 Gemini 和 GPT-4V 进行了四项测试（图片问答、文字识别、文档识别、物体检测），然后写了这篇文章。可以学习他的测试方法，用于评估其他模型。</li></ul><ul class="notion-list notion-list-disc notion-block-e0e76e4f9d504f7eb34e53dd912e0544"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://alan.norbauer.com/articles/browser-debugging-tricks">浏览器的67个调试技巧</a>（英文）浏览器的开发者工具怎么调试 JS 脚本，本文介绍67个高级技巧。</li></ul><ul class="notion-list notion-list-disc notion-block-6782218d4d554dfdbc97e1f35979c08e"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.ahavs.com/chat-ruanyifeng">周刊的 Chat 服务</a> 将周刊迄今的所有内容进行了向量化索引，提交给 ChatGPT，然后就可以跟周刊问答了。</li></ul><ul class="notion-list notion-list-disc notion-block-8efadd67670a4eb683a056f2d6230627"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.chrome.com/blog/css-wrapped-2023?hl=zh-cn">2023年 CSS 发展总结</a>（中文）Chrome 团队的总结，2023年 CSS 增加了哪些功能。</li></ul><ul class="notion-list notion-list-disc notion-block-485029c061bb442990352786252c15be"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://corecursive.com/software-world-tour-with-son-luong-ngoc/">一个越南程序员的阿里之旅</a>（英文）作者是一个越南程序员，原来在 Lazada 工作。后来，Lazada 被阿里收购，他就来到阿里，在杭州西溪园区呆过一段时间。</li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LoRA 上手]]></title>
            <link>https://qftie.vercel.app//article/lora-starter</link>
            <guid>https://qftie.vercel.app//article/lora-starter</guid>
            <pubDate>Fri, 02 Jul 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-64339108d7ed40a5896ea159eea05acc"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-c57b06b9aadd4b51bc9362fa1167e7b5" data-id="c57b06b9aadd4b51bc9362fa1167e7b5"><span><div id="c57b06b9aadd4b51bc9362fa1167e7b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c57b06b9aadd4b51bc9362fa1167e7b5" title="HuggingFace LoRA 文档笔记"><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">HuggingFace LoRA 文档笔记</span></span></h2><div class="notion-text notion-block-675f62a1db2e4432af06be3afd94cb05">显存不够时可以使用 LoRA 训练，推理时为了消除延迟可以使用 <code class="notion-inline-code">merge_and_unload（）</code>函数将适配器权重与基本模型合并到一个相同的新权重矩阵中。</div><div class="notion-text notion-block-77a796f38691483baa35d0bf050af14d"><b>实用函数如下：</b></div><ul class="notion-list notion-list-disc notion-block-3426dc19288c4616b18ce76a4db4f3fc"><li><code class="notion-inline-code">merge_adapter（）</code> 将 LoRa 层合并到基础模型中，同时保留 PeftModel。助于以后取消合并、删除、加载不同的适配器等。</li></ul><ul class="notion-list notion-list-disc notion-block-d25d367f65ec4cecb723151d724b7018"><li><code class="notion-inline-code">unmerge_adapter（）</code> 从基础模型中取消合并 LoRa 层，同时保留 PeftModel。</li></ul><ul class="notion-list notion-list-disc notion-block-b2e376a383c146f38ad390a11292741b"><li><code class="notion-inline-code">unload（）</code> 在不合并活动 lora 模块的情况下取回基本模型，即取回预训练的基础模型时，将模型重置为其原始状态。例如，在 Stable Diffusion WebUI 中，尝试 LoRA 后使用基础模型进行推断时。</li></ul><ul class="notion-list notion-list-disc notion-block-3ede9de156df4b3eb992b522b7b924a6"><li><code class="notion-inline-code">delete_adapter（） </code>删除现有适配器。</li></ul><ul class="notion-list notion-list-disc notion-block-2c6cf604bbce47eb91d5d89c87b0b151"><li><code class="notion-inline-code">add_weighted_adapter（）</code> 根据用户提供的权重方案将多个 LoRA 组合成一个新的适配器。</li></ul><div class="notion-text notion-block-83bedbc8d73049f4b9bb1cf07d2e4c27"><b>微调 LoRA 模型的过程如下：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-fb1ae6510fc542a5a139c105e6b6887d"><li>实例化基础模型</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-7bdafe385402414a80cd3210def4f855"><li>创建一个 LoraConfig 配置，在其中定义 LoRA-speciffic 的参数</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-ede022cf38404ca0aa1ecc45014cb58d"><li>将基础模型使用 <code class="notion-inline-code">get_peft_model()</code> 包起来，获得可训练的 <code class="notion-inline-code">PeftModel</code> </li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2517e8fa242e49569f146dd6daf97504"><li>像训练基础模型一样训练 <code class="notion-inline-code">PeftModel</code></li></ol><div class="notion-text notion-block-dae60c6a721c41719ec9e0a2eea716cc"><b>LoraConfig 解释：</b></div><ul class="notion-list notion-list-disc notion-block-8d35852a6917473bbfefd445706b6985"><li>权重初始化由 <code class="notion-inline-code">init_lora_weights</code> 控制，默认情况下，权重 A 使用 Kaiming-uniform，权重 B 初始化为0</li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EMNLP2023-对话情绪识别相关论文阅读笔记]]></title>
            <link>https://qftie.vercel.app//article/emnlp-2023-emo</link>
            <guid>https://qftie.vercel.app//article/emnlp-2023-emo</guid>
            <pubDate>Fri, 02 Jul 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-b0a94cb072af4fa28b15a96321438eaa"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-a380a57bf33c4bf99918a4663bb1ca9f"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://aclanthology.org/2023.emnlp-main.222/"><b>Retrofitting Light-weight Language Models for Emotions using Supervised Contrastive Learning</b></a></div><div class="notion-text notion-block-b9a36088740345c090e9c884c2c8d7f7"><b>摘要：</b>我们提出了一种新的改造方法，将emotion aspects引入预训练的语言模型（PLM）中，如BERT和RoBERTa。<b>我们的方法使用对比学习更新预训练的网络权重</b>，以便表现出相似情绪的文本片段在表征空间附近编码，并将具有不同情感内容的片段推开。在这样做的同时，它还确保了PLM中已经存在的语言知识不会无意中受到干扰。通过我们的方法（即 BERTEmo 和 RoBERTaEmo）改造的语言模型，通过不同的聚类和检索指标进行评估，产生情感感知的文本表示。对于情感分析和讽刺检测的下游任务，它们的表现优于预先训练的对应任务（F1 分数提高约 1%）和其他现有方法。此外，在少样本学习设置中，与预训练模型相比，改造后的模型的性能有更显着的提升。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-874cf901af2347a6a5c1469fa9fa8526"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F7067fc99-fb61-4c72-8cae-60def518445f%2FUntitled.png?table=block&amp;id=874cf901-af23-47a6-a5c1-469fa9fa8526" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-88331da54a0040588695dadb96c2ca8b"> </div><div class="notion-text notion-block-1a27f6970c724860bdba7b766108e5ab"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://aclanthology.org/2023.emnlp-main.598/"><b>From Multilingual Complexity to Emotional Clarity: Leveraging Commonsense to Unveil Emotions in Code-Mixed Dialogues</b></a></div><div class="notion-text notion-block-6a71be744d154ea49e9d8f82cb6f83f2"><b>摘要：</b>在对话中理解情绪是人类交流的一个基本方面，推动了对话中情感识别 （ERC） 的 NLP 研究。虽然相当多的研究集中在单语对话中辨别个体说话者的情绪，但理解<b>code-mixed对话（文中指的是混合不同语言的专有单词传达语义）</b>中的情绪动态受到的关注相对较少。这促使我们在这项研究中对 ERC 进行code-mixed对话。认识到情商包括对世俗知识的理解，我们提出了一种创新的方法，将常识性信息与对话语境相结合，以促进对情感的更深入理解。为了实现这一点，我们设计了一个高效的管道，根据代码混合输入从现有的知识图谱中提取相关的常识。随后，我们开发了一种先进的融合技术，将获取的常识信息与从专用对话理解模块获得的对话表示无缝结合。我们的综合实验展示了通过系统地将常识纳入 ERC 而获得的实质性性能改进。定量评估和定性分析都进一步证实了我们假设的有效性，重申了常识整合在增强ERC中的关键作用。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9c26f45ff6d240c9b62f94aba8a7168a"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2Ff3e24973-ef0a-4bf1-be11-a39ba4eff5e8%2FUntitled.png?table=block&amp;id=9c26f45f-f6d2-40c9-b62f-94aba8a7168a" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-dbd19ec56b2344acad1dc9e97ba7daf3"> </div><div class="notion-text notion-block-2e82c4d7c9ec4fd8a1998a809149d389"><b>A Training-Free Debiasing Framework with Counterfactual Reasoning for Conversational Emotion Detection</b></div><div class="notion-text notion-block-9b8cae61919e4d03877fd087f833b6f8"><b>摘要：</b>无意的数据集偏差通常存在于现有的对话中的情感识别 （ERC） 数据集中，包括标签偏差，其中模型由于训练数据不平衡而偏向多数类，以及说话人和中性词偏差，其中模型由于特定中性词或说话人与类之间的过度相关性（<b>比如数据集中出现Richard Burke人名的大多数时候是正向或中性的，模型就会倾向于对有这个人名的句子做出非负向的预测）</b>而做出不公平的预测。然而，以往的ERC研究通常侧重于捕捉上下文敏感和说话人敏感的依赖关系，而忽略了数据的意外数据集偏差，这阻碍了ERC的泛化和公平性。为了解决这个问题，我们提出了一个免训练去偏倚框架（TFD），该框架在预测期间运行，无需额外训练。为了保证与各种ERC模型的兼容性，它不平衡数据或修改模型结构。相反，<b>TFD 通过生成反事实话语和上下文从模型中提取偏差，并使用简单但经验上稳健的元素减法运算来减轻偏差。</b>在三个公开数据集上的广泛实验表明，TFD有效地提高了不同ERC模型的泛化能力和公平性1。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-5f4b79100730471c87d28e891b3f41c0"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F33517072-3c05-4333-81eb-0446b44f0ce9%2FUntitled.png?table=block&amp;id=5f4b7910-0730-471c-87d2-8e891b3f41c0" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-5a09b3bc054f45589af788c64418b8e6"> </div><div class="notion-text notion-block-ce5ab32f3b124c9c978561d876be3911"><b>Efficient Cross-Task Prompt Tuning for Few-Shot Conversational Emotion Recognition</b></div><div class="notion-text notion-block-9f0ad4ede88f46449bf515fc3f949c1f"><b>摘要：</b>对话中的情绪识别 （ERC） 因其在开发情绪感知移情机器中的重要性而被广泛研究。预训练语言模型 （PLM） 的兴起进一步推动了 ERC 性能的极限。然而，最近关于使用 PLM 的 ERC 工作在很大程度上是数据驱动的，需要对整个 PLM 进行微调。为了提高样本和计算效率，我们提出了一种称为跨任务提示调整（CTPT）的无导数优化方法，用于小样本对话情感识别。与从单个任务中学习独立知识的现有方法不同，CTPT通过利用来自其他源任务的外部知识来利用可共享的跨任务知识，以提高少数样本设置下的学习性能。此外，CTPT只需要在低本征维数下对向量进行优化，没有梯度，与现有方法相比，具有很高的参数效率（大概优化1000个参数）。在五个不同的上下文对话数据集上的实验表明，我们的CTPT方法在少样本场景和零样本转移上都具有优越的结果。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-62dd767ef4ff4442a41bf06be5a2cace"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F109d52b7-3302-4119-8332-b72b832768d7%2FUntitled.png?table=block&amp;id=62dd767e-f4ff-4442-a41b-f06be5a2cace" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-55252d37d04b42e4a187c904519c636f"> </div><div class="notion-text notion-block-bbe8d2b948bf4a83ac50aeccc424dead"><b>An Empirical Study on Multiple Knowledge from ChatGPT for Emotion Recognition in Conversations</b></div><div class="notion-text notion-block-e500fadbc8ac4686bb0de08bd1454071"><b>摘要：</b>多种知识（例如，共同参照、主题、情绪原因等）已被证明对情绪检测有效。然而，由于缺乏注释数据以及获得此类知识所涉及的高成本，在对话中的情感识别 （ERC） 中探索这些知识目前是一张白纸。幸运的是，大型语言模型（LLM）的出现有望填补这一空白。因此，我们提出了一种多知识融合模型（MKFM），以有效地整合LLMs产生的ERC知识，并实证研究其对模型的影响。在三个公开数据集上的实验结果证明了多元知识对ERC的有效性。此外，我们还对这些知识的贡献和互补性进行了详细分析。</div><div class="notion-text notion-block-19ec10457285436f951170f01d8cf596">PS. 通过 prompting 的方式去本来就让大模型推理出来对话上下文中蕴含的各种信息，包括但不限于：对话状态（dialogue state tracking），用户状态（用户情绪，心理，性格特征等），和各种语义信息（natural language understanding）等等</div><div class="notion-text notion-block-66b9aaf6c5f84036b6c9ff3b3d383f5d">由两幅配图可看出，作者通过LLM生成了各种情感辅助知识（启发：整个论文的故事用 LLM 生成了很多对话分析中的辅助元素，结果提升不大）</div><ul class="notion-list notion-list-disc notion-block-0fa1f554d6a248aaae6046bebb37578a"><li>知识集1名为ALK，表示了第i个话语是否为讽刺表达，是否为隐喻表达，是否为话题，用在对比学习损失函数里；</li></ul><ul class="notion-list notion-list-disc notion-block-3f36658f4cea4058839efe9883eb16fc"><li>知识集2名为辅助上下文知识(ACK，看起来就是不同情况下的上下文的索引)：共同引用(CR)、情绪原因(EC2)、情境(CT)，用在图attention结构里，让LLM判断应该如何辅助图结构不同的边的设计；</li></ul><ul class="notion-list notion-list-disc notion-block-6bdd337c069f4809a58e8bdf0e392c5a"><li>知识集3名为辅助话语知识(AUK):与话语相关的常识知识(CS)、情感常识(ACS)、情绪原因(EC)，应该是把LLM生成的这些文本提取转成了向量，在使用时直接拼接在经过RoBERT的句子特征上；</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-5d6f072a435646e3aa46c470d28bd60e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:624px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F4af09e47-306c-4603-a337-14442df4b753%2FUntitled.png?table=block&amp;id=5d6f072a-4356-46e3-aa46-c470d28bd60e" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-c415b7e9ef7a427b9bf6809d68364c25"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F0c657551-3466-4ee0-98aa-1615ebe2675d%2FUntitled.png?table=block&amp;id=c415b7e9-ef7a-427b-9bf6-809d68364c25" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-48674ea170624c2c9f8ea6721e6a57d4"> </div><div class="notion-blank notion-block-e69f6c9d09774cbcbf7b1df681465278"> </div><div class="notion-text notion-block-44f47efc54aa48c7ace2aeb27b267fd4"><b>Enhancing Emotion Recognition in Conversation via Multi-view Feature Alignment and Memorization（施工）</b></div><div class="notion-text notion-block-3f5fba9ec33342e98ff81aa96fbed84e"><b>摘要：</b>对话中的情感识别(ERC)在自然语言处理领域受到越来越多的关注。以前的工作通常是先通过微调预训练语言模型(PLMs)提取语义视图特征，然后在得到的语义视图特征的基础上，利用各种图神经网络对上下文视图特征进行建模。然而，简单地通过图形神经网络难以完全模拟话语之间的交互，语义视图和上下文视图的特征没有很好地对齐。此外，先前的参数学习范式在给定较少实例的情况下难以学习尾类的模式。为此，我们将预训练的会话模型视为先验知识库，并通过探测程序从中引出话语之间的相关性。<b>我们采用监督对比学习来对齐语义视图和上下文视图特征，这两种特征视图以互补的方式一起工作，从不同的角度为ERC做出贡献。同时，针对尾类样本的识别问题，提出了一种新的半参数记忆推理范式。</b></div><div class="notion-text notion-block-fd55d00632274f2890ab58c5137a233c">结果很好，提取特征前对 RoBERTa-Large 做了微调，从 COMENT 提取的常识知识等向量</div><div class="notion-text notion-block-9ff3c9e002934725819c61bbf9041494">特殊的一点在于，在检测句子之间相关性的时候，使用了 PCM（Dialogbert: Discourse-aware response generation via learning to recover and rank utterances）做相关性矩阵，具体做法如下：首先将 N 个话语输入到 PCM 中，提取出话语 j 的表示，然后，把话语 i MASK掉，再MASK后不完整的的 N 个话语再次输入PCM，再提取话语 j 的表示，计算两次话语 j 向量之间的距离，用这个距离做（i，j）相关性（启发：做相关性有各种方法，包括 SBERT 等）；</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-05962a4fea654ab4aabe1830da54df33"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F92f9a8a9-945d-46e5-959c-4ec05c0bcc6f%2FUntitled.png?table=block&amp;id=05962a4f-ea65-4ab4-aabe-1830da54df33" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-51c5df084e7e4a8f99392e9236e16203"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2Fdcf6c692-d46c-4d18-8098-cd0fececfe80%2FUntitled.png?table=block&amp;id=51c5df08-4e7e-4a8f-9939-2e9236e16203" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-8a11559b857e418fa1b3580d358c783f"> </div><div class="notion-text notion-block-bbe02befe44845a8bc22351239f4b36e"><b>Reducing Spurious Correlations in Aspect-based Sentiment Analysis with Explanation from Large Language Models</b></div><div class="notion-text notion-block-5a2088c08d804dee84a3dff20f09480a"><b>摘要：</b>最近，基于方面的情感分析（ABSA）模型已经产生了可喜的结果。然而，在对方面的情感特征进行建模时，他们很容易学习输入文本和输出标签的某些单词之间的虚假相关性。这种虚假相关性可能会破坏ABSA模型的性能。这个问题的一个直接解决方案是让模型看到并学习情感表达的解释，而不是某些单词。受此启发，我们利用大型语言模型 （LLM） 对每个方面的情感极性的解释来减少 ABSA 中的虚假相关性。首先，我们制定一个提示模板，该模板包含句子、方面和情感标签。此模板用于提示 LLM 生成适当的解释，说明情绪原因。然后，我们提出了两种简单而有效的方法来利用解释来防止虚假相关性的学习。我们通过将它们与一些具有代表性的ABSA模型相结合，对五个数据集进行了广泛的比较实验。结果表明，该方法可以提高ABSA模型的性能，增强其性能和泛化能力。</div><div class="notion-text notion-block-3549dcda1c8e41a6825efabb1ed8cbd2">下图可以看出作者使用 LLM 生成训练集里对话和情感的解释，在学习的时候有两种方法可以使用这个情感解释数据</div><ul class="notion-list notion-list-disc notion-block-f993b2bc8b294726b8cb1c4e499392fb"><li>第一种是把解释看成和原文语义相似的给数据集带来多样性的增强数据，直接多学一倍的量；</li></ul><ul class="notion-list notion-list-disc notion-block-5957d76f000f476489a8471d3c9ac66d"><li>另一种是通过知识蒸馏，把通过学习情感解释预测情感的模型蒸馏给学习原始数据的模型。论文解释其原因：直接混合无法将原句子与相应的解释对齐，这导致无法提供定制的引导学习。为此，我们使用引导策略来鼓励ABSA模型在拟合每个样本时减少虚假相关性。（启发：LLM 可以用来生成情感的解释引导模型判断出更具解释性而非单纯学到统计分布虚假相关性的内容）</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-6d7de5e734cc4b5295881a9f387f9ce2"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F9cd64bd2-17cd-4329-bd60-953667b16e69%2FUntitled.png?table=block&amp;id=6d7de5e7-34cc-4b52-9588-1a9f387f9ce2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-2d387e5425b048678850c4ef6dff1cce"> </div><div class="notion-text notion-block-85d2aacbacfd41ca9747b6e1f98f0f82"><b>SIR-ABSC: Incorporating Syntax into RoBERTa-based Sentiment Analysis Models with a Special Aggregator Token</b></div><div class="notion-text notion-block-3fcdc344634a421e8b2150dc32e93057"><b>摘要：</b>我们提出了一种简单但有效的方法，将句法依赖信息直接合并到基于转换器的语言模型(例如RoBERTa)中，用于诸如基于方面的情感分类(ABSC)之类的任务，其中所需的输出依赖于特定的输入令牌。先前的ABSC方法是通过将语言模型与依赖树上的图神经网络相结合来捕获语法，与此相反，我们的模型，用于ABSC的语法集成RoBERTa (SIR-ABSC)通过使用新的聚合器令牌将语法直接合并到语言模型中。sir - abs1优于这些更复杂的模型，在ABSC上产生新的最先进的结果</div><div class="notion-text notion-block-ddefe5b85c8045c08e3f8426d37282e9">从下图理解，作者的目的是把 2-stage 的 PLM+GNN 的模式改进为 1-stage 的形式，做法是在 PLM了一个 [g] token 来模拟 GNN 中的 global 节点，并通过单独为这个 token 设置 MASK，使它只对一定距离内的 token 关注（此处的距离使用的是句法距离），并且每层使用不同的设置，实现了类似 GNN 一层层往上融合越来越多节点信息的感觉；</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1507b2da77ad41a093cd5079875068ab"><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%2F0fccaf01-4ad3-4a7c-a9bd-6fd52f0237c6%2F26d5f8e0-2dfa-4443-bc83-47a2019e0a1f%2FUntitled.png?table=block&amp;id=1507b2da-77ad-41a0-93cd-5079875068ab" alt="notion image" loading="lazy" decoding="async"/></div></figure></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM 驱动的 Agent ]]></title>
            <link>https://qftie.vercel.app//article/llm-powered-agent</link>
            <guid>https://qftie.vercel.app//article/llm-powered-agent</guid>
            <pubDate>Mon, 28 Aug 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[LLM 不仅仅能用来生成文本，还可以用来驱动一个 Agent，解决更多一般性的问题。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-43fe04d0b0ae4333902ba913fe7494d0"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f9f3703a4ff940298108e90f6a3bcbc6" data-id="f9f3703a4ff940298108e90f6a3bcbc6"><span><div id="f9f3703a4ff940298108e90f6a3bcbc6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f9f3703a4ff940298108e90f6a3bcbc6" 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-b0e02f31ff7b4867aa42d3f3bafdf817">LLM 不仅仅用用来生成文本，还可以用来驱动一个 Agent，解决更多一般性的问题。整个 Agent 系统里，LLM 是大脑，此外还需要一些其他组件：</div><ul class="notion-list notion-list-disc notion-block-473b7a8462154c8c914d062d351d2d39"><li>规划（Planning）</li><ul class="notion-list notion-list-disc notion-block-473b7a8462154c8c914d062d351d2d39"><li>子目标和分解（Subgoal &amp; Decomposition）：Agent 把大任务分解小的子目标</li><li>反思和细化（Reflection &amp; Refinement）：对过去的行为进行自我批评和反省，从错误中吸取教训，细化或提高结果质量</li></ul></ul><ul class="notion-list notion-list-disc notion-block-a08e123b149748a8978e14a783d53f2a"><li>记忆（Memory）</li><ul class="notion-list notion-list-disc notion-block-a08e123b149748a8978e14a783d53f2a"><li>短期记忆：所有 in-context learning 都可以看作短期记忆</li><li>长期记忆：长时间保留和调用信息的能力，通常利用外部载体存储和快速检索</li></ul></ul><ul class="notion-list notion-list-disc notion-block-43cf9585db6f49a391fd919a7f6248b2"><li>工具使用</li><ul class="notion-list notion-list-disc notion-block-43cf9585db6f49a391fd919a7f6248b2"><li>Agent 学习调用外部 API 来获取模型权重中缺少的信息（当前信息、代码执行能力、对专有信息的访问等）</li></ul></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d1644e9aa61740dabc2e5ed72fc9ed4d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308282345120.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-23315d0d19bf4fc593cba9e604073c79" data-id="23315d0d19bf4fc593cba9e604073c79"><span><div id="23315d0d19bf4fc593cba9e604073c79" class="notion-header-anchor"></div><a class="notion-hash-link" href="#23315d0d19bf4fc593cba9e604073c79" title="组件一：规划 Planning"><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">组件一：规划 Planning</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-6850d12fa96b4465997244fb8b5a104d" data-id="6850d12fa96b4465997244fb8b5a104d"><span><div id="6850d12fa96b4465997244fb8b5a104d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6850d12fa96b4465997244fb8b5a104d" title="任务分解（Decomposition）"><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">任务分解（Decomposition）</span></span></h3><div class="notion-text notion-block-949043d6216948af84d13cb727322443"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/#chain-of-thought-cot">Chain of thought</a> ：思维链，经典提示 <code class="notion-inline-code">think step by step</code>，根据 A Survey of LLM，作为涌现能力，CoT 目前只对一定规模（一般认为 10B）以上的模型有效；一般只在需要复杂推理，且常规问答表现较差的时候有奇效</div><div class="notion-text notion-block-a3cd7ff0fed945c69a0c84ff7a06188d">Tree of Thoughts (<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2305.10601">Yao et al. 2023</a>) ：通过在每一步探索多种推理可能性来扩展 CoT。它首先将问题分解为多个思维步骤，每个步骤生成多个思维，从而创建一个树状结构。搜索过程可以是 BFS（广度优先搜索）或 DFS（深度优先搜索），每个状态由分类器（通过提示）或多数票进行评估。</div><div class="notion-text notion-block-993ce44046544d22a5fdb023462ae853">其中，任务分解过程可以直接使用简单的 prompt 比如 <code class="notion-inline-code">steps for task xxxx:\n1.</code>，或者对特定任务的指令比如 <code class="notion-inline-code">write a story outline</code> 用于写小说，或者人类直接输入；</div><div class="notion-text notion-block-93375d9ce6584fa7b35273b997df4f3f"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/spcl/graph-of-thoughts">Graph of Thoughts</a> ：推理过程被建模为一个有向图 G = (V, E)，一个顶点包含对当前问题的一个解答，不管这个问题是最初的问题、还是中间问题或最后的问题。有向边 (<span style="padding:0.5em"></span>) 表示通过明确指示 LLM 使用 <!-- -->来生成 <!-- -->。图节点也可以是不同类型，比如写小说时，有节点代表大纲，有的节点是具体的文段，此时图是一个异构图 G = (V, E, c) ，其中 c 将顶点 V 映射到各自的类 C（在上述案例中，C = {plan, par} ）。文章介绍，该框架扩展性更高，能实现  GoT，也包含了实现 CoT 和 ToT。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ccf12767da3047cbb5e0de6591bc36c6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308282350302.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2520e8a960ce485db194ece2408ab2f5" data-id="2520e8a960ce485db194ece2408ab2f5"><span><div id="2520e8a960ce485db194ece2408ab2f5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2520e8a960ce485db194ece2408ab2f5" title="自我反省（Self-Reflection）"><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">自我反省（Self-Reflection）</span></span></h3><div class="notion-text notion-block-4cdb5351db8140ca8f6074fdea36275e">ReAct  (<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2210.03629">Yao et al. 2023</a>) ：通过将动作空间扩展为某任务特定的离散动作和语言空间的组合，使 LLM 能够与环境交互（例如使用维基百科搜索API）；在 LLM 中集成了推理和动作，促使 LLM 以自然语言生成推理痕迹。</div><div class="notion-text notion-block-d814f36161164d0aa3605972df9737f0">ReAct 提示模版包含 LLM 思考的明确步骤：</div><div class="notion-text notion-block-d16369c8e71e40eeb83f8f2926025db9">知识密集任务（左）决策任务（右）的推理轨迹示例，</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-550f4315423f4427b853b36abd83f008"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308282359705.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-8d80bf67056a4f3fb1e793acf289dd84">Reflexion:</div><div class="notion-text notion-block-5f7c8a178de74337933b9b0bbcbec973">Chain of HIndsight:</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-dae1f4f38a064b74af5f79b2e7115cfe" data-id="dae1f4f38a064b74af5f79b2e7115cfe"><span><div id="dae1f4f38a064b74af5f79b2e7115cfe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#dae1f4f38a064b74af5f79b2e7115cfe" title="组件二：内存 Memory"><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">组件二：内存 Memory</span></span></h2><div class="notion-text notion-block-ee725021fe664470974aecc15bddf3d9">人类的记忆类型与模型能力的类比：</div><ul class="notion-list notion-list-disc notion-block-3f495b32c0274c7db8bd971d5231c402"><li>感觉记忆：记忆的最早阶段，原始刺激结束后保留感官信息几秒钟。类比原始输入的 embedding 表示</li></ul><ul class="notion-list notion-list-disc notion-block-63eccb1ab9da45b9b66f3f44cff3110a"><li>短期记忆：存储执行复杂认知任务（学习和推理）所需的信息。类比 in-context learning，受到上下文窗口长度限制</li></ul><ul class="notion-list notion-list-disc notion-block-93cc87c99b94445b92d7984034af0bf2"><li>长期记忆：存储很长时间（几天到几十年不等，容量几乎无限），又包括可以有意识回忆起来的记忆（情景相关的事件经历/语义方面的事实概念），以及无意识内隐的技能记忆等。类比外部向量存储，可通过快速检索访问</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-cff44d30911f4bdb85701558600b030e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308290000588.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-9f9dddf013f84e668ab60654412d4e9f">外部存储器可以减轻有限注意力跨度的限制。标准做法是将信息的嵌入表示保存到可以支持快速最大内积搜索 （MIPS） 的矢量存储数据库中。为了优化检索速度，常见的选择是近似最近邻（ANN）算法，以返回大约前k个最近邻，以牺牲一点精度损失来换取巨大的加速。</div><div class="notion-text notion-block-6eaafcc33d0649469020144fa8b3c9df">常见 ANN 的性能比较 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://ann-benchmarks.com/">ann-benchmarks.com</a>：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-88accacebb3c42ba9c536b86834cfddb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308290000885.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-8629eab0c783494bbdedc224337cc51b" data-id="8629eab0c783494bbdedc224337cc51b"><span><div id="8629eab0c783494bbdedc224337cc51b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8629eab0c783494bbdedc224337cc51b" title="组件三：工具使用 Tool Use"><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">组件三：工具使用 Tool Use</span></span></h2><div class="notion-text notion-block-2f78c5e488664200b3f1b9045d3a0b41">MRKL： “Modular Reasoning, Knowledge and Language”</div><div class="notion-text notion-block-12116abdcecc41bf8e6267bcd6001898"><b>TALM </b>(Tool Augmented Language Models; <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2205.12255">Parisi et al. 2022</a>) 和 <b>Toolformer</b> (<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2302.04761">Schick et al. 2023</a>) 都是对 LM 进行了微调学习使用外部工具 API。数据集根据新添加的 API 调用注释是否可以提高模型输出的质量进行扩展。</div><div class="notion-text notion-block-978bd48eb935400ea24eb140f2b0edbf">ChatGPT 插件和 OpenAI API 函数调用是 LLM 在实践中增强工具使用能力的很好的例子。工具 API 的集合可以由其他开发人员提供（如在插件中）或自定义（如在函数调用中）。</div><div class="notion-text notion-block-a99da7fc9578428f803c7a2dcb5fb0a3">HuggingGPT (<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2303.17580">Shen et al. 2023</a>) 是一个框架，它使用ChatGPT作为任务计划器，根据模型描述选择HuggingFace平台中可用的模型，并根据执行结果总结响应。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-efda34e3f01640429bc5b1afdb623a0c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308290001067.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-639ee7634d6b462d9d6cdc79231b0a52">该系统包括4个阶段：</div><ul class="notion-list notion-list-disc notion-block-aa721164cd64480ba5f19d306071b550"><li>Task planning：将用户请求解析为多个任务，每个任务有四个属性：任务类型，id，依赖项，参数</li></ul><ul class="notion-list notion-list-disc notion-block-f22feeb25d154c2b855b1830c6c6a554"><li>Model selection：LLM 将任务分配给专家模型</li></ul><ul class="notion-list notion-list-disc notion-block-f7aac930d9a54029acfdbe6f4c6c3ab4"><li>Task execution：专家模型执行特定任务并记录结果</li></ul><ul class="notion-list notion-list-disc notion-block-b31603cc910a407fb3be6260f40bf328"><li>Response generation：LLM 接收执行结果并向用户提供汇总结构</li></ul><div class="notion-text notion-block-7f3f43874b8a4fa3a400e5bf24826252"><b>API-Bank</b> (<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://arxiv.org/abs/2304.08244">Li et al. 2023</a>)：评估 tool-augmented LLM 性能的基准，有大量 API，LLM 首先可以访问 API 搜索引擎找到合适的 API ，然后使用响应的文档进行调用。依据以下伪代码，每一步决策都可以评估其准确性。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29448bad446049f89402d2ffda73dff6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://markdown-picpic.oss-cn-beijing.aliyuncs.com/img/202308290001451.png" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-47d2257a34d94ff5a2f0648c096fb4f9" data-id="47d2257a34d94ff5a2f0648c096fb4f9"><span><div id="47d2257a34d94ff5a2f0648c096fb4f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#47d2257a34d94ff5a2f0648c096fb4f9" 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-d2d4004dd5d14935ac18f6908cd4a7de"><li>AutoGPT</li></ul><ul class="notion-list notion-list-disc notion-block-19a7f5447a8f4e8aaee5a78c379297d7"><li>GPT-Engineer</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-03f56e889abb437889110908d270338b" data-id="03f56e889abb437889110908d270338b"><span><div id="03f56e889abb437889110908d270338b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#03f56e889abb437889110908d270338b" 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-e12a3fa1b5eb40d6a98892b33763f86e"><li>有限的上下文长度：向量存储与检索虽然支持了对更大知识库对访问，但表示能力不如完全地使用attention 那么强大</li></ul><ul class="notion-list notion-list-disc notion-block-73abcd8a94ea4e4bbdd8e075c5d3b37c"><li>长期规划和任务分解：在长期的历史中有效规划具有挑战，鲁棒性较低</li></ul><ul class="notion-list notion-list-disc notion-block-bb44bce93aed4c82a6179e7aeb28bc94"><li>LLM 接口可靠性</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-e5a800d88435407091eaff35abc85095" data-id="e5a800d88435407091eaff35abc85095"><span><div id="e5a800d88435407091eaff35abc85095" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e5a800d88435407091eaff35abc85095" 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-97d637795cae4a44a3a1b6a89b9175ef"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://lilianweng.github.io/posts/2023-06-23-agent/">LLM Powered Autonomous Agents | Lil&#x27;Log (lilianweng.github.io)</a></div><div class="notion-blank notion-block-2c7f876a56434a43901791bf203891d4"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>