<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>0260日记 &#8211; 0260</title>
	<atom:link href="https://0to60.top/category/learn-by-doing/feed/" rel="self" type="application/rss+xml" />
	<link>https://0to60.top</link>
	<description>Zero To More</description>
	<lastBuildDate>Mon, 15 Dec 2025 12:51:54 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://0to60.top/wp-content/uploads/2025/05/cropped-ba4ded44ed2ce0995e556ab476fd11d2-1-150x150.jpg</url>
	<title>0260日记 &#8211; 0260</title>
	<link>https://0to60.top</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Rag Agent，迭代史（五）：量化评估体系——从“感觉还行”到“数据说话”</title>
		<link>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/</link>
					<comments>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Fri, 12 Dec 2025 10:25:37 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/</guid>

					<description><![CDATA[<p>引言 《Rag Agent，迭代史》&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/">Rag Agent，迭代史（五）：量化评估体系——从“感觉还行”到“数据说话”</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h1>引言</h1>
<p>《Rag Agent，迭代史》系列已完成4次迭代，概要如下：</p>
<p><strong>V1版本</strong></p>
<ul>
<li>内容：通过Dify平台，搭建入门智能体，包含：知识库（配置一律默认），智能体简易配置。</li>
<li>结果：能跑通。</li>
<li>问题：回答质量低，根源在于召回内容语义不完整。</li>
</ul>
<p><strong>V2版本（切换至COZE平台）</strong></p>
<ul>
<li>内容：将上传文章进行Q&amp;A Pairs转换，保证每对Q&amp;A语义完整。</li>
<li>结果：较V1版本，内容具备语义完整性。</li>
<li>问题：回答缺乏广度与深度。因“Q&amp;A Pairs转换”在保证语义完整的同时，造成了严重的信息丢失。</li>
</ul>
<p><strong>V3版本</strong></p>
<ul>
<li>内容：舍弃V2版本&quot;Q&amp;A Pairs转换&quot;路线，知识库尝试父子层级切分（索引和上下文分离）。</li>
<li>结果：较V2版本，内容广度和深度有所提升。</li>
<li>问题：提示词中的固定模板导致答案结构僵化，逻辑流畅性不足。</li>
</ul>
<p><strong>V4版本</strong></p>
<ul>
<li>内容：先对召回内容（这里指父级内容）进行预处理，提取自由主题，让LLM参考自由主题和召回内容先形成结构性大纲，再输出内容。</li>
<li>结果：较V3版本，内容的结构性/逻辑流畅性在感官上明显提升。</li>
<li>问题：出现答非所问。根因是检索阶段存在内容召回不全或不准确的问题。</li>
</ul>
<p>前4个版本的迭代主要依赖主观直觉与定性观察。然而，在规划V5时，过多的可能性使得 <strong>“选择迭代方向”</strong> 本身成为了瓶颈。这引出了一个根本性原则：</p>
<blockquote>
<p><strong>No measure, no management!</strong></p>
</blockquote>
<p>因此，<strong>建立量化的评估体系，定义明确的迭代目标与关键指标</strong>，是突破瓶颈的首要路径。 本文即围绕该体系展开，主要内容包括：</p>
<ul>
<li>整体评估框架</li>
<li>黄金评估集介绍及构建</li>
<li>各类评估器的Prompt</li>
</ul>
<h2>一、整体评估框架</h2>
<p>本文将 RAG Agent链路解耦为：</p>
<blockquote>
<p>user_query -&gt; Retrieval（检索召回） -&gt; LLM_Generation（大模型生成）-&gt; answer</p>
</blockquote>
<p>在这个链路中：</p>
<ul>
<li><strong>user_query：</strong> 用户问题</li>
<li><strong>Retrieval：</strong> 检索召回，通过用户问题检索召回上下文（contexts）,给LLM提供内容参考。</li>
<li><strong>LLM_Generation：</strong> 大模型内容生成，根据参考内容和Prompt，生成内容。</li>
<li><strong>answser：</strong> Agent最终输出答案。</li>
</ul>
<p>基于该链路，建立评估框架：<br />
<img decoding="async" src="../../_assets/ragagent_%E8%AF%84%E4%BC%B0%E9%93%BE%E8%B7%AF%E5%9B%BE.png" alt="ragAgent_评估链路图"></p>
<table>
<thead>
<tr>
<th style="text-align:left">链路阶段</th>
<th style="text-align:left">评估目标</th>
<th style="text-align:left">涉及指标</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">整体评估(user_query-&gt;answer)</td>
<td style="text-align:left">衡量 Agent 回答用户问题时的正确程度。</td>
<td style="text-align:left">Correctness：答案正确性</td>
</tr>
<tr>
<td style="text-align:left">Retrieval阶段</td>
<td style="text-align:left">衡量检索召回的contexts质量表现。</td>
<td style="text-align:left">Recall：召回率<br />Precision：准确率<br />MRR：平均倒数排名</td>
</tr>
<tr>
<td style="text-align:left">LLM_Generation阶段</td>
<td style="text-align:left">评估生成内容的表现情况。</td>
<td style="text-align:left">Groundedness：答案有据性<br />Relevance：答案相关性<br />Organization：信息组织力</td>
</tr>
</tbody>
</table>
<h3>1.1 答案正确性-整体评估(User_Query-&gt;Answer)</h3>
<p>我们首先需回答：究竟在迭代什么？我们在乎Rag Agent的什么能力？</p>
<blockquote>
<p>当然是衡量 Agent 回答用户问题时是否正确。</p>
</blockquote>
<p><strong>答案正确性</strong></p>
<ul>
<li><strong>定义</strong>：Agent 的最终回答是否在事实层面与专家撰写的标准答案 (Ground Truth Answer) 一致。<em>注：Ground Truth后文简称为<code>GT</code></em></li>
<li><strong>计算方式</strong>：LLM-as-a-Judge。利用更强模型（如DeepSeek-V3）对比 <code>Agent Answer</code> 与 <code>GT Answer</code>。</li>
<li><strong>评分标准</strong>：
<ul>
<li><strong>最高分</strong>：事实完全一致，关键信息无遗漏。</li>
<li>……</li>
<li><strong>最低分</strong>：事实矛盾（一本正经胡说八道）或关键信息缺失。</li>
</ul>
</li>
<li><strong>实践意义</strong>：这是迭代的最终评判标准，无论采取何种迭代方向，如果正确性得分低，说明在做“无用功”。</li>
</ul>
<h3>1.2 Retrieval阶段</h3>
<p>在此阶段，衡量的是召回内容质量，需要对比实际召回的上下文 与 专家标记的<strong>充分且必要</strong> 的上下文。</p>
<blockquote>
[!NOTE]
<p><strong>充分且必要</strong><br />
指生成标准答案所需的<strong>最小</strong>上下文集合。</p>
</blockquote>
<p><strong>字典解释</strong></p>
<ul>
<li><code> ID</code>：指召回的每条上下文都具备唯一识别ID，<code>IDs</code>则指上下文的ID集合。</li>
<li><code>Retrieved_Contexts_IDs</code> ：指用户询问后，Retrieval阶段实际召回的上下文ID集合。</li>
<li><code>GT_Contexts_IDs</code>： 指专家根据问题标记的最小上下文ID集合，该集合能构成标准答案。</li>
</ul>
<h4>1.2.1  召回率 ( Context Recall )</h4>
<p>该指标决定了系统的能力天花板。</p>
<ul>
<li><strong>定义</strong>：专家认为回答问题<strong>必需</strong>的那些上下文集合，检索系统找全了吗？</li>
<li><strong>计算公式</strong>：<mjx-container class="MathJax" jax="SVG" display="true" style="direction: ltr; display: block; text-align: center; margin: 1em 0; position: relative;"><svg style="overflow: visible; min-height: 1px; min-width: 1px; vertical-align: -2.17ex;" xmlns="http://www.w3.org/2000/svg" width="53.045ex" height="5.471ex" role="img" focusable="false" viewBox="0 -1459 23446 2418" aria-hidden="true"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="mstyle"><g data-mml-node="TeXAtom" data-mjx-texclass="ORD"><g data-mml-node="mi"><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(736,0)" style="stroke-width: 3;"/><path data-c="63" d="M370 305T349 305T313 320T297 358Q297 381 312 396Q317 401 317 402T307 404Q281 408 258 408Q209 408 178 376Q131 329 131 219Q131 137 162 90Q203 29 272 29Q313 29 338 55T374 117Q376 125 379 127T395 129H409Q415 123 415 120Q415 116 411 104T395 71T366 33T318 2T249 -11Q163 -11 99 53T34 214Q34 318 99 383T250 448T370 421T404 357Q404 334 387 320Z" transform="translate(1180,0)" style="stroke-width: 3;"/><path data-c="61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z" transform="translate(1624,0)" style="stroke-width: 3;"/><path data-c="6C" d="M42 46H56Q95 46 103 60V68Q103 77 103 91T103 124T104 167T104 217T104 272T104 329Q104 366 104 407T104 482T104 542T103 586T103 603Q100 622 89 628T44 637H26V660Q26 683 28 683L38 684Q48 685 67 686T104 688Q121 689 141 690T171 693T182 694H185V379Q185 62 186 60Q190 52 198 49Q219 46 247 46H263V0H255L232 1Q209 2 183 2T145 3T107 3T57 1L34 0H26V46H42Z" transform="translate(2124,0)" style="stroke-width: 3;"/><path data-c="6C" d="M42 46H56Q95 46 103 60V68Q103 77 103 91T103 124T104 167T104 217T104 272T104 329Q104 366 104 407T104 482T104 542T103 586T103 603Q100 622 89 628T44 637H26V660Q26 683 28 683L38 684Q48 685 67 686T104 688Q121 689 141 690T171 693T182 694H185V379Q185 62 186 60Q190 52 198 49Q219 46 247 46H263V0H255L232 1Q209 2 183 2T145 3T107 3T57 1L34 0H26V46H42Z" transform="translate(2402,0)" style="stroke-width: 3;"/></g></g><g data-mml-node="mo" transform="translate(2957.8,0)"><path data-c="3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z" style="stroke-width: 3;"/></g><g data-mml-node="mfrac" transform="translate(4013.6,0)"><g data-mml-node="mrow" transform="translate(220,709.5)"><g data-mml-node="mo" transform="translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g><g data-mml-node="TeXAtom" data-mjx-texclass="ORD" transform="translate(278,0)"><g data-mml-node="mi"><path data-c="1D681" d="M16 571Q16 598 27 605T76 612Q84 612 108 612T148 611Q268 611 294 605Q346 592 389 550T432 440Q432 394 410 359Q393 329 366 310L358 303Q387 273 399 239Q405 219 405 178T408 106T421 68Q426 65 428 65Q433 65 435 74T438 96T441 112Q450 130 480 130H485Q519 130 522 100Q522 79 516 56T488 11T434 -11Q421 -11 408 -8T377 5T344 37T324 93Q322 101 322 154L321 209Q304 257 257 267Q252 268 207 268H165V76H186H192Q204 76 211 75T224 64T230 38Q230 10 208 1H39Q28 5 23 11T18 21T17 38V44Q17 66 33 73Q40 76 60 76H81V535H60Q45 535 38 536T24 545T16 571ZM348 440Q348 478 321 502T260 532Q252 534 208 535H165V344H208Q212 344 223 344T239 345T252 346T266 348T278 351T293 358Q348 387 348 440Z" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(525,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(1050,0)" style="stroke-width: 3;"/><path data-c="1D69B" d="M327 76Q359 76 369 70T380 38Q380 10 359 1H47Q24 8 24 38Q24 54 28 61T47 76H145V355H96L47 356Q24 363 24 393Q24 409 28 416T47 431H207Q223 419 226 414T229 393V387V369Q297 437 394 437Q436 437 461 417T487 368Q487 347 473 332T438 317Q428 317 420 320T407 327T398 337T393 347T390 356L388 361Q348 356 324 345Q228 299 228 170Q228 161 228 151T229 138V76H293H327Z" transform="translate(1575,0)" style="stroke-width: 3;"/><path data-c="1D692" d="M202 538T202 559T218 596T260 612Q283 612 300 597T317 560Q317 538 300 523T260 507Q235 507 219 522ZM411 76Q441 76 451 69T462 38Q462 29 462 26T460 18T453 9T440 1H94Q72 8 72 33V38Q72 46 72 49T74 58T81 68T94 76H233V355H167L102 356Q80 363 80 393Q80 418 91 425T138 432Q145 432 165 432T200 431H295Q297 429 303 425T310 420T314 415T317 404T317 389T318 363Q318 354 318 314T317 241V76H378H411Z" transform="translate(2100,0)" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(2625,0)" style="stroke-width: 3;"/><path data-c="1D69F" d="M24 392Q24 417 36 424T79 432Q85 432 103 432T132 431H215Q229 422 233 415T237 393Q237 355 198 355H193H172L262 77L352 355H331H323Q288 355 288 393Q288 409 291 415T310 431H478Q491 423 495 416T500 393Q500 364 478 356L452 355H426L374 190Q320 24 318 20Q307 -4 273 -4H262H251Q217 -4 206 20Q204 24 150 190L98 355H72L47 356Q24 363 24 392Z" transform="translate(3150,0)" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(3675,0)" style="stroke-width: 3;"/><path data-c="1D68D" d="M266 573Q266 596 277 603T314 611H352H385Q411 611 419 607T435 586V76H498Q512 67 516 60T520 38Q520 9 498 1H436Q429 1 417 1T398 0Q375 0 363 7T351 34V43L342 36Q288 -6 223 -6Q143 -6 87 58T31 216Q31 307 88 372T230 437Q292 437 342 405L351 399V535H320L289 536Q266 543 266 573ZM351 290Q347 302 337 316T302 346T244 361Q193 361 154 319T115 215Q115 152 152 111T235 70Q314 70 351 170V290Z" transform="translate(4200,0)" style="stroke-width: 3;"/><path data-c="1D672" d="M40 305Q40 437 110 529T281 622Q315 622 343 611T387 589T404 578Q409 585 415 596T425 611T435 618T452 622Q472 622 478 609T485 566Q485 559 485 540T484 508V460Q484 413 478 403T442 393Q417 393 409 402Q400 409 400 420Q400 428 395 445T380 487T347 528T295 546Q235 546 180 483T124 306Q124 245 141 197T186 121T241 80T296 66Q346 66 373 103T400 178Q400 209 435 209H442H450Q484 209 484 172Q480 96 421 43T281 -11Q177 -11 109 84T40 305Z" transform="translate(4725,0)" style="stroke-width: 3;"/><path data-c="1D698" d="M52 216Q52 318 118 379T261 440Q343 440 407 378T472 216Q472 121 410 58T262 -6Q176 -6 114 58T52 216ZM388 225Q388 281 351 322T261 364Q213 364 175 325T136 225Q136 158 174 114T262 70T350 114T388 225Z" transform="translate(5250,0)" style="stroke-width: 3;"/><path data-c="1D697" d="M89 431Q94 431 105 431T122 432Q173 432 173 399Q173 394 175 394Q176 394 190 404T233 425T298 436Q343 436 371 423Q411 402 423 365T436 265Q436 257 436 239T435 211V198V76H498Q512 67 516 60T520 38Q520 9 498 1H308Q286 9 286 32V38V45Q286 65 303 73Q309 76 329 76H351V188Q351 204 351 230T352 266Q352 321 341 341T288 361Q253 361 222 341T176 274L174 264L173 170V76H236Q250 67 254 60T258 38Q258 9 236 1H27Q4 8 4 38Q4 53 8 60T27 76H89V355H58L27 356Q4 363 4 393Q4 408 8 415T27 431H89Z" transform="translate(5775,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(6300,0)" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(6825,0)" style="stroke-width: 3;"/><path data-c="1D6A1" d="M35 393Q35 417 46 424T89 432Q95 432 112 432T141 431H223Q238 422 241 415T244 393Q244 389 244 383T237 367T216 355Q209 355 209 354L234 319Q259 286 260 286L308 354Q308 355 301 355Q285 356 278 365T270 384L271 393Q271 420 289 428Q295 431 376 431H459Q460 430 465 427T472 422T476 416T480 407T481 393Q481 368 470 362T434 355H425H392L344 290Q295 225 295 223Q294 223 309 203T350 149L405 77L439 76H453Q474 76 484 69T495 38Q495 10 473 1H303Q281 9 281 32V38Q281 49 282 54T290 67T313 76Q324 76 324 77L259 173L197 77Q202 76 209 76Q225 75 233 68T241 55T242 38Q242 28 242 24T236 12T221 1H51Q29 9 29 32V38Q29 48 29 51T31 59T38 67T51 76H117L171 149Q224 222 224 223L124 355H90H78Q54 355 45 361T35 393Z" transform="translate(7350,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(7875,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(8400,0)" style="stroke-width: 3;"/><path data-c="1D678" d="M400 76Q431 76 441 69T452 38Q452 29 452 26T450 18T443 9T430 1H95Q84 6 79 12T73 23T72 38Q72 65 90 73Q96 76 157 76H220V535H157H124Q93 535 83 542T72 573Q72 603 93 610Q97 611 264 611H430Q432 609 436 607T444 602T449 594Q452 588 452 573Q452 546 434 538Q428 535 367 535H304V76H367H400Z" transform="translate(8925,0)" style="stroke-width: 3;"/><path data-c="1D673" d="M38 1Q16 8 16 38Q16 62 32 73Q39 76 58 76H78V535H58Q40 535 32 538Q16 548 16 573Q16 587 17 591Q23 604 34 607T83 611H166H176Q188 611 209 611T239 612Q299 612 337 597T415 530Q485 438 485 300Q485 180 431 100T301 3L291 1H38ZM400 301Q400 363 385 410T346 482T303 519T267 534Q261 535 210 535H162V76H214L267 77Q323 89 361 148T400 301Z" transform="translate(9450,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(9975,0)" style="stroke-width: 3;"/></g></g><g data-mml-node="mo" transform="translate(11000.2,0)"><path data-c="2229" d="M88 -21T75 -21T55 -7V200Q55 231 55 280Q56 414 60 428Q61 430 61 431Q77 500 152 549T332 598Q443 598 522 544T610 405Q611 399 611 194V-7Q604 -22 591 -22Q582 -22 572 -9L570 405Q563 433 556 449T529 485Q498 519 445 538T334 558Q251 558 179 518T96 401Q95 396 95 193V-7Q88 -21 75 -21Z" style="stroke-width: 3;"/></g><g data-mml-node="TeXAtom" data-mjx-texclass="ORD" transform="translate(11889.4,0)"><g data-mml-node="mi"><path data-c="1D676" d="M38 306Q38 447 105 534T261 622Q280 622 298 618T329 608T350 596T366 585L371 581Q373 581 377 591T390 612T417 622Q437 622 443 609T450 566Q450 559 450 540T449 508V460Q449 413 443 403T407 393Q392 393 386 394T373 402T364 426Q360 472 335 509T271 546Q214 546 168 477T121 308Q121 210 164 138T271 65Q293 65 310 78T337 109T352 147T360 180T362 195Q362 196 333 196L304 197Q282 204 282 227V234Q282 247 282 251T288 261T304 272H474Q488 263 492 256T496 234Q496 211 479 199Q475 197 461 196H449V21Q441 6 434 3T412 -1H407H402Q385 -1 379 3T364 28Q350 14 322 2T260 -11Q173 -11 106 76T38 306Z" style="stroke-width: 3;"/><path data-c="1D683" d="M129 38Q129 51 129 55T135 65T151 76H220V535H110V501Q110 470 109 464T101 450Q93 442 68 442H60Q37 442 28 461Q26 466 26 527L27 589Q36 607 49 610H55Q61 610 72 610T97 610T131 610T170 611T215 611T264 611H476Q478 609 483 606T489 602T493 598T496 593T497 586T498 576T498 562V526V488Q498 452 480 444Q476 442 456 442Q431 442 423 450Q416 457 415 463T414 501V535H304V76H374Q389 67 392 61T396 38Q396 10 374 1H151Q140 5 135 11T130 21T129 38Z" transform="translate(525,0)" style="stroke-width: 3;"/><path data-c="1D672" d="M40 305Q40 437 110 529T281 622Q315 622 343 611T387 589T404 578Q409 585 415 596T425 611T435 618T452 622Q472 622 478 609T485 566Q485 559 485 540T484 508V460Q484 413 478 403T442 393Q417 393 409 402Q400 409 400 420Q400 428 395 445T380 487T347 528T295 546Q235 546 180 483T124 306Q124 245 141 197T186 121T241 80T296 66Q346 66 373 103T400 178Q400 209 435 209H442H450Q484 209 484 172Q480 96 421 43T281 -11Q177 -11 109 84T40 305Z" transform="translate(1050,0)" style="stroke-width: 3;"/><path data-c="1D698" d="M52 216Q52 318 118 379T261 440Q343 440 407 378T472 216Q472 121 410 58T262 -6Q176 -6 114 58T52 216ZM388 225Q388 281 351 322T261 364Q213 364 175 325T136 225Q136 158 174 114T262 70T350 114T388 225Z" transform="translate(1575,0)" style="stroke-width: 3;"/><path data-c="1D697" d="M89 431Q94 431 105 431T122 432Q173 432 173 399Q173 394 175 394Q176 394 190 404T233 425T298 436Q343 436 371 423Q411 402 423 365T436 265Q436 257 436 239T435 211V198V76H498Q512 67 516 60T520 38Q520 9 498 1H308Q286 9 286 32V38V45Q286 65 303 73Q309 76 329 76H351V188Q351 204 351 230T352 266Q352 321 341 341T288 361Q253 361 222 341T176 274L174 264L173 170V76H236Q250 67 254 60T258 38Q258 9 236 1H27Q4 8 4 38Q4 53 8 60T27 76H89V355H58L27 356Q4 363 4 393Q4 408 8 415T27 431H89Z" transform="translate(2100,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(2625,0)" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(3150,0)" style="stroke-width: 3;"/><path data-c="1D6A1" d="M35 393Q35 417 46 424T89 432Q95 432 112 432T141 431H223Q238 422 241 415T244 393Q244 389 244 383T237 367T216 355Q209 355 209 354L234 319Q259 286 260 286L308 354Q308 355 301 355Q285 356 278 365T270 384L271 393Q271 420 289 428Q295 431 376 431H459Q460 430 465 427T472 422T476 416T480 407T481 393Q481 368 470 362T434 355H425H392L344 290Q295 225 295 223Q294 223 309 203T350 149L405 77L439 76H453Q474 76 484 69T495 38Q495 10 473 1H303Q281 9 281 32V38Q281 49 282 54T290 67T313 76Q324 76 324 77L259 173L197 77Q202 76 209 76Q225 75 233 68T241 55T242 38Q242 28 242 24T236 12T221 1H51Q29 9 29 32V38Q29 48 29 51T31 59T38 67T51 76H117L171 149Q224 222 224 223L124 355H90H78Q54 355 45 361T35 393Z" transform="translate(3675,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(4200,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(4725,0)" style="stroke-width: 3;"/><path data-c="1D678" d="M400 76Q431 76 441 69T452 38Q452 29 452 26T450 18T443 9T430 1H95Q84 6 79 12T73 23T72 38Q72 65 90 73Q96 76 157 76H220V535H157H124Q93 535 83 542T72 573Q72 603 93 610Q97 611 264 611H430Q432 609 436 607T444 602T449 594Q452 588 452 573Q452 546 434 538Q428 535 367 535H304V76H367H400Z" transform="translate(5250,0)" style="stroke-width: 3;"/><path data-c="1D673" d="M38 1Q16 8 16 38Q16 62 32 73Q39 76 58 76H78V535H58Q40 535 32 538Q16 548 16 573Q16 587 17 591Q23 604 34 607T83 611H166H176Q188 611 209 611T239 612Q299 612 337 597T415 530Q485 438 485 300Q485 180 431 100T301 3L291 1H38ZM400 301Q400 363 385 410T346 482T303 519T267 534Q261 535 210 535H162V76H214L267 77Q323 89 361 148T400 301Z" transform="translate(5775,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(6300,0)" style="stroke-width: 3;"/></g></g><g data-mml-node="mo" transform="translate(18714.4,0) translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g></g><g data-mml-node="mrow" transform="translate(6025.7,-709.5)"><g data-mml-node="mo" transform="translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g><g data-mml-node="TeXAtom" data-mjx-texclass="ORD" transform="translate(278,0)"><g data-mml-node="mi"><path data-c="1D676" d="M38 306Q38 447 105 534T261 622Q280 622 298 618T329 608T350 596T366 585L371 581Q373 581 377 591T390 612T417 622Q437 622 443 609T450 566Q450 559 450 540T449 508V460Q449 413 443 403T407 393Q392 393 386 394T373 402T364 426Q360 472 335 509T271 546Q214 546 168 477T121 308Q121 210 164 138T271 65Q293 65 310 78T337 109T352 147T360 180T362 195Q362 196 333 196L304 197Q282 204 282 227V234Q282 247 282 251T288 261T304 272H474Q488 263 492 256T496 234Q496 211 479 199Q475 197 461 196H449V21Q441 6 434 3T412 -1H407H402Q385 -1 379 3T364 28Q350 14 322 2T260 -11Q173 -11 106 76T38 306Z" style="stroke-width: 3;"/><path data-c="1D683" d="M129 38Q129 51 129 55T135 65T151 76H220V535H110V501Q110 470 109 464T101 450Q93 442 68 442H60Q37 442 28 461Q26 466 26 527L27 589Q36 607 49 610H55Q61 610 72 610T97 610T131 610T170 611T215 611T264 611H476Q478 609 483 606T489 602T493 598T496 593T497 586T498 576T498 562V526V488Q498 452 480 444Q476 442 456 442Q431 442 423 450Q416 457 415 463T414 501V535H304V76H374Q389 67 392 61T396 38Q396 10 374 1H151Q140 5 135 11T130 21T129 38Z" transform="translate(525,0)" style="stroke-width: 3;"/><path data-c="1D672" d="M40 305Q40 437 110 529T281 622Q315 622 343 611T387 589T404 578Q409 585 415 596T425 611T435 618T452 622Q472 622 478 609T485 566Q485 559 485 540T484 508V460Q484 413 478 403T442 393Q417 393 409 402Q400 409 400 420Q400 428 395 445T380 487T347 528T295 546Q235 546 180 483T124 306Q124 245 141 197T186 121T241 80T296 66Q346 66 373 103T400 178Q400 209 435 209H442H450Q484 209 484 172Q480 96 421 43T281 -11Q177 -11 109 84T40 305Z" transform="translate(1050,0)" style="stroke-width: 3;"/><path data-c="1D698" d="M52 216Q52 318 118 379T261 440Q343 440 407 378T472 216Q472 121 410 58T262 -6Q176 -6 114 58T52 216ZM388 225Q388 281 351 322T261 364Q213 364 175 325T136 225Q136 158 174 114T262 70T350 114T388 225Z" transform="translate(1575,0)" style="stroke-width: 3;"/><path data-c="1D697" d="M89 431Q94 431 105 431T122 432Q173 432 173 399Q173 394 175 394Q176 394 190 404T233 425T298 436Q343 436 371 423Q411 402 423 365T436 265Q436 257 436 239T435 211V198V76H498Q512 67 516 60T520 38Q520 9 498 1H308Q286 9 286 32V38V45Q286 65 303 73Q309 76 329 76H351V188Q351 204 351 230T352 266Q352 321 341 341T288 361Q253 361 222 341T176 274L174 264L173 170V76H236Q250 67 254 60T258 38Q258 9 236 1H27Q4 8 4 38Q4 53 8 60T27 76H89V355H58L27 356Q4 363 4 393Q4 408 8 415T27 431H89Z" transform="translate(2100,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(2625,0)" style="stroke-width: 3;"/><path data-c="1D68E" d="M48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377Z" transform="translate(3150,0)" style="stroke-width: 3;"/><path data-c="1D6A1" d="M35 393Q35 417 46 424T89 432Q95 432 112 432T141 431H223Q238 422 241 415T244 393Q244 389 244 383T237 367T216 355Q209 355 209 354L234 319Q259 286 260 286L308 354Q308 355 301 355Q285 356 278 365T270 384L271 393Q271 420 289 428Q295 431 376 431H459Q460 430 465 427T472 422T476 416T480 407T481 393Q481 368 470 362T434 355H425H392L344 290Q295 225 295 223Q294 223 309 203T350 149L405 77L439 76H453Q474 76 484 69T495 38Q495 10 473 1H303Q281 9 281 32V38Q281 49 282 54T290 67T313 76Q324 76 324 77L259 173L197 77Q202 76 209 76Q225 75 233 68T241 55T242 38Q242 28 242 24T236 12T221 1H51Q29 9 29 32V38Q29 48 29 51T31 59T38 67T51 76H117L171 149Q224 222 224 223L124 355H90H78Q54 355 45 361T35 393Z" transform="translate(3675,0)" style="stroke-width: 3;"/><path data-c="1D69D" d="M25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395Z" transform="translate(4200,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(4725,0)" style="stroke-width: 3;"/><path data-c="1D678" d="M400 76Q431 76 441 69T452 38Q452 29 452 26T450 18T443 9T430 1H95Q84 6 79 12T73 23T72 38Q72 65 90 73Q96 76 157 76H220V535H157H124Q93 535 83 542T72 573Q72 603 93 610Q97 611 264 611H430Q432 609 436 607T444 602T449 594Q452 588 452 573Q452 546 434 538Q428 535 367 535H304V76H367H400Z" transform="translate(5250,0)" style="stroke-width: 3;"/><path data-c="1D673" d="M38 1Q16 8 16 38Q16 62 32 73Q39 76 58 76H78V535H58Q40 535 32 538Q16 548 16 573Q16 587 17 591Q23 604 34 607T83 611H166H176Q188 611 209 611T239 612Q299 612 337 597T415 530Q485 438 485 300Q485 180 431 100T301 3L291 1H38ZM400 301Q400 363 385 410T346 482T303 519T267 534Q261 535 210 535H162V76H214L267 77Q323 89 361 148T400 301Z" transform="translate(5775,0)" style="stroke-width: 3;"/><path data-c="1D69C" d="M72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317Z" transform="translate(6300,0)" style="stroke-width: 3;"/></g></g><g data-mml-node="mo" transform="translate(7103,0) translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g></g><rect width="19192.4" height="60" x="120" y="220"/></g></g></g></g></svg><mjx-assistive-mml unselectable="on" display="block" style="top: 0px; left: 0px; clip: rect(1px, 1px, 1px, 1px); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: absolute; padding: 1px 0px 0px 0px; border: 0px; display: block; overflow: hidden; width: 100%;"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mstyle displaystyle="true" scriptlevel="0"><mrow data-mjx-texclass="ORD"><mi data-mjx-auto-op="false">Recall</mi></mrow><mo>=</mo><mfrac><mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo><mrow data-mjx-texclass="ORD"><mi mathvariant="monospace">RetrievedContextsIDs</mi></mrow><mo>∩</mo><mrow data-mjx-texclass="ORD"><mi mathvariant="monospace">GTContextsIDs</mi></mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo></mrow><mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo><mrow data-mjx-texclass="ORD"><mi mathvariant="monospace">GTContextsIDs</mi></mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo></mrow></mfrac></mstyle></math></mjx-assistive-mml></mjx-container></li>
<li><strong>公式详解：</strong>
<ul>
<li>针对每一个问题，都需要专家标注充分且必要的上下文ID集合（<code>GT_Contexts_IDs</code>）。</li>
<li>将问题送入Agent中，Retieval阶段得到实际召回的Contexts集合（<code>Retrieved_Contexts_IDs </code>）。</li>
<li>取<code>GT_Contexts_IDs</code> 和 <code>Retrieved_Contexts_IDs </code> 的交集，获取其数量，再除以<code>GT_Contexts_IDs</code>的数量，则得到召回率。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>召回内容诊断：</strong> 如果 <code>Recall</code> 很低，说明 LLM 根本没有获得足够的原材料，这是导致“答非所问”的根本原因。</li>
<li><strong>迭代方向：</strong> 想办法提高<code>Recall</code>，如：优化 Embedding 模型、优化切分粒度、优化检索召回策略、增大 Top-K、降低召回阈值、引入NER、优化Rerank等等。</li>
</ul>
</li>
</ul>
<h4>1.2.2 准确率（ Context Precision ）</h4>
<p>变相表示LLM生成时所参考内容的信噪比。</p>
<ul>
<li><strong>定义</strong>：Retrieval阶段检索回来的 Top-K 上下文集合中，有多少是真正有用的？</li>
<li><strong>计算公式</strong>：<mjx-container class="MathJax" jax="SVG" display="true" style="direction: ltr; display: block; text-align: center; margin: 1em 0; position: relative;"><svg style="overflow: visible; min-height: 1px; min-width: 1px; vertical-align: -2.17ex;" xmlns="http://www.w3.org/2000/svg" width="56.579ex" height="5.471ex" role="img" focusable="false" viewBox="0 -1459 25008 2418" aria-hidden="true"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="mstyle"><g data-mml-node="mtext"><path data-c="50" d="M130 622Q123 629 119 631T103 634T60 637H27V683H214Q237 683 276 683T331 684Q419 684 471 671T567 616Q624 563 624 489Q624 421 573 372T451 307Q429 302 328 301H234V181Q234 62 237 58Q245 47 304 46H337V0H326Q305 3 182 3Q47 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM507 488Q507 514 506 528T500 564T483 597T450 620T397 635Q385 637 307 637H286Q237 637 234 628Q231 624 231 483V342H302H339Q390 342 423 349T481 382Q507 411 507 488Z" style="stroke-width: 3;"/><path data-c="72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z" transform="translate(681,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(1073,0)" style="stroke-width: 3;"/><path data-c="63" d="M370 305T349 305T313 320T297 358Q297 381 312 396Q317 401 317 402T307 404Q281 408 258 408Q209 408 178 376Q131 329 131 219Q131 137 162 90Q203 29 272 29Q313 29 338 55T374 117Q376 125 379 127T395 129H409Q415 123 415 120Q415 116 411 104T395 71T366 33T318 2T249 -11Q163 -11 99 53T34 214Q34 318 99 383T250 448T370 421T404 357Q404 334 387 320Z" transform="translate(1517,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(1961,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(2239,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(2633,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(2911,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(3411,0)" style="stroke-width: 3;"/></g><g data-mml-node="mo" transform="translate(4244.8,0)"><path data-c="3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z" style="stroke-width: 3;"/></g><g data-mml-node="mfrac" transform="translate(5300.6,0)"><g data-mml-node="mrow" transform="translate(220,709.5)"><g data-mml-node="mo" transform="translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g><g data-mml-node="mtext" transform="translate(278,0)"><path data-c="A0" d="" style="stroke-width: 3;"/><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" transform="translate(250,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(986,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(1430,0)" style="stroke-width: 3;"/><path data-c="72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z" transform="translate(1819,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(2211,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(2489,0)" style="stroke-width: 3;"/><path data-c="76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z" transform="translate(2933,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(3461,0)" style="stroke-width: 3;"/><path data-c="64" d="M376 495Q376 511 376 535T377 568Q377 613 367 624T316 637H298V660Q298 683 300 683L310 684Q320 685 339 686T376 688Q393 689 413 690T443 693T454 694H457V390Q457 84 458 81Q461 61 472 55T517 46H535V0Q533 0 459 -5T380 -11H373V44L365 37Q307 -11 235 -11Q158 -11 96 50T34 215Q34 315 97 378T244 442Q319 442 376 393V495ZM373 342Q328 405 260 405Q211 405 173 369Q146 341 139 305T131 211Q131 155 138 120T173 59Q203 26 251 26Q322 26 373 103V342Z" transform="translate(3905,0)" style="stroke-width: 3;"/><path data-c="43" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q322 658 252 588Q173 509 173 342Q173 221 211 151Q232 111 263 84T328 45T384 29T428 24Q517 24 571 93T626 244Q626 251 632 257H660L666 251V236Q661 133 590 56T403 -21Q262 -21 159 83T56 342Z" transform="translate(4461,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(5183,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(5683,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(6239,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(6628,0)" style="stroke-width: 3;"/><path data-c="78" d="M201 0Q189 3 102 3Q26 3 17 0H11V46H25Q48 47 67 52T96 61T121 78T139 96T160 122T180 150L226 210L168 288Q159 301 149 315T133 336T122 351T113 363T107 370T100 376T94 379T88 381T80 383Q74 383 44 385H16V431H23Q59 429 126 429Q219 429 229 431H237V385Q201 381 201 369Q201 367 211 353T239 315T268 274L272 270L297 304Q329 345 329 358Q329 364 327 369T322 376T317 380T310 384L307 385H302V431H309Q324 428 408 428Q487 428 493 431H499V385H492Q443 385 411 368Q394 360 377 341T312 257L296 236L358 151Q424 61 429 57T446 50Q464 46 499 46H516V0H510H502Q494 1 482 1T457 2T432 2T414 3Q403 3 377 3T327 1L304 0H295V46H298Q309 46 320 51T331 63Q331 65 291 120L250 175Q249 174 219 133T185 88Q181 83 181 74Q181 63 188 55T206 46Q208 46 208 23V0H201Z" transform="translate(7072,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(7600,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(7989,0)" style="stroke-width: 3;"/><path data-c="49" d="M328 0Q307 3 180 3T32 0H21V46H43Q92 46 106 49T126 60Q128 63 128 342Q128 620 126 623Q122 628 118 630T96 635T43 637H21V683H32Q53 680 180 680T328 683H339V637H317Q268 637 254 634T234 623Q232 620 232 342Q232 63 234 60Q238 55 242 53T264 48T317 46H339V0H328Z" transform="translate(8383,0)" style="stroke-width: 3;"/><path data-c="44" d="M130 622Q123 629 119 631T103 634T60 637H27V683H228Q399 682 419 682T461 676Q504 667 546 641T626 573T685 470T708 336Q708 210 634 116T442 3Q429 1 228 0H27V46H60Q102 47 111 49T130 61V622ZM593 338Q593 439 571 501T493 602Q439 637 355 637H322H294Q238 637 234 628Q231 624 231 344Q231 62 232 59Q233 49 248 48T339 46H350Q456 46 515 95Q561 133 577 191T593 338Z" transform="translate(8744,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(9508,0)" style="stroke-width: 3;"/><path data-c="A0" d="" transform="translate(9902,0)" style="stroke-width: 3;"/></g><g data-mml-node="mo" transform="translate(10652.2,0)"><path data-c="2229" d="M88 -21T75 -21T55 -7V200Q55 231 55 280Q56 414 60 428Q61 430 61 431Q77 500 152 549T332 598Q443 598 522 544T610 405Q611 399 611 194V-7Q604 -22 591 -22Q582 -22 572 -9L570 405Q563 433 556 449T529 485Q498 519 445 538T334 558Q251 558 179 518T96 401Q95 396 95 193V-7Q88 -21 75 -21Z" style="stroke-width: 3;"/></g><g data-mml-node="mtext" transform="translate(11541.4,0)"><path data-c="A0" d="" style="stroke-width: 3;"/><path data-c="47" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q401 658 376 654T316 633T254 592T205 519T177 411Q173 369 173 335Q173 259 192 201T238 111T302 58T370 31T431 24Q478 24 513 45T559 100Q562 110 562 160V212Q561 213 557 216T551 220T542 223T526 225T502 226T463 227H437V273H449L609 270Q715 270 727 273H735V227H721Q674 227 668 215Q666 211 666 108V6Q660 0 657 0Q653 0 639 10Q617 25 600 42L587 54Q571 27 524 3T406 -22Q317 -22 238 22T108 151T56 342Z" transform="translate(250,0)" style="stroke-width: 3;"/><path data-c="54" d="M36 443Q37 448 46 558T55 671V677H666V671Q667 666 676 556T685 443V437H645V443Q645 445 642 478T631 544T610 593Q593 614 555 625Q534 630 478 630H451H443Q417 630 414 618Q413 616 413 339V63Q420 53 439 50T528 46H558V0H545L361 3Q186 1 177 0H164V46H194Q264 46 283 49T309 63V339V550Q309 620 304 625T271 630H244H224Q154 630 119 601Q101 585 93 554T81 486T76 443V437H36V443Z" transform="translate(1035,0)" style="stroke-width: 3;"/><path data-c="43" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q322 658 252 588Q173 509 173 342Q173 221 211 151Q232 111 263 84T328 45T384 29T428 24Q517 24 571 93T626 244Q626 251 632 257H660L666 251V236Q661 133 590 56T403 -21Q262 -21 159 83T56 342Z" transform="translate(1757,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(2479,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(2979,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(3535,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(3924,0)" style="stroke-width: 3;"/><path data-c="78" d="M201 0Q189 3 102 3Q26 3 17 0H11V46H25Q48 47 67 52T96 61T121 78T139 96T160 122T180 150L226 210L168 288Q159 301 149 315T133 336T122 351T113 363T107 370T100 376T94 379T88 381T80 383Q74 383 44 385H16V431H23Q59 429 126 429Q219 429 229 431H237V385Q201 381 201 369Q201 367 211 353T239 315T268 274L272 270L297 304Q329 345 329 358Q329 364 327 369T322 376T317 380T310 384L307 385H302V431H309Q324 428 408 428Q487 428 493 431H499V385H492Q443 385 411 368Q394 360 377 341T312 257L296 236L358 151Q424 61 429 57T446 50Q464 46 499 46H516V0H510H502Q494 1 482 1T457 2T432 2T414 3Q403 3 377 3T327 1L304 0H295V46H298Q309 46 320 51T331 63Q331 65 291 120L250 175Q249 174 219 133T185 88Q181 83 181 74Q181 63 188 55T206 46Q208 46 208 23V0H201Z" transform="translate(4368,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(4896,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(5285,0)" style="stroke-width: 3;"/><path data-c="49" d="M328 0Q307 3 180 3T32 0H21V46H43Q92 46 106 49T126 60Q128 63 128 342Q128 620 126 623Q122 628 118 630T96 635T43 637H21V683H32Q53 680 180 680T328 683H339V637H317Q268 637 254 634T234 623Q232 620 232 342Q232 63 234 60Q238 55 242 53T264 48T317 46H339V0H328Z" transform="translate(5679,0)" style="stroke-width: 3;"/><path data-c="44" d="M130 622Q123 629 119 631T103 634T60 637H27V683H228Q399 682 419 682T461 676Q504 667 546 641T626 573T685 470T708 336Q708 210 634 116T442 3Q429 1 228 0H27V46H60Q102 47 111 49T130 61V622ZM593 338Q593 439 571 501T493 602Q439 637 355 637H322H294Q238 637 234 628Q231 624 231 344Q231 62 232 59Q233 49 248 48T339 46H350Q456 46 515 95Q561 133 577 191T593 338Z" transform="translate(6040,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(6804,0)" style="stroke-width: 3;"/><path data-c="A0" d="" transform="translate(7198,0)" style="stroke-width: 3;"/></g><g data-mml-node="mo" transform="translate(18989.4,0) translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g></g><g data-mml-node="mrow" transform="translate(4499.7,-709.5)"><g data-mml-node="mo" transform="translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g><g data-mml-node="mtext" transform="translate(278,0)"><path data-c="A0" d="" style="stroke-width: 3;"/><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" transform="translate(250,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(986,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(1430,0)" style="stroke-width: 3;"/><path data-c="72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z" transform="translate(1819,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(2211,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(2489,0)" style="stroke-width: 3;"/><path data-c="76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z" transform="translate(2933,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(3461,0)" style="stroke-width: 3;"/><path data-c="64" d="M376 495Q376 511 376 535T377 568Q377 613 367 624T316 637H298V660Q298 683 300 683L310 684Q320 685 339 686T376 688Q393 689 413 690T443 693T454 694H457V390Q457 84 458 81Q461 61 472 55T517 46H535V0Q533 0 459 -5T380 -11H373V44L365 37Q307 -11 235 -11Q158 -11 96 50T34 215Q34 315 97 378T244 442Q319 442 376 393V495ZM373 342Q328 405 260 405Q211 405 173 369Q146 341 139 305T131 211Q131 155 138 120T173 59Q203 26 251 26Q322 26 373 103V342Z" transform="translate(3905,0)" style="stroke-width: 3;"/><path data-c="43" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q322 658 252 588Q173 509 173 342Q173 221 211 151Q232 111 263 84T328 45T384 29T428 24Q517 24 571 93T626 244Q626 251 632 257H660L666 251V236Q661 133 590 56T403 -21Q262 -21 159 83T56 342Z" transform="translate(4461,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(5183,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(5683,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(6239,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(6628,0)" style="stroke-width: 3;"/><path data-c="78" d="M201 0Q189 3 102 3Q26 3 17 0H11V46H25Q48 47 67 52T96 61T121 78T139 96T160 122T180 150L226 210L168 288Q159 301 149 315T133 336T122 351T113 363T107 370T100 376T94 379T88 381T80 383Q74 383 44 385H16V431H23Q59 429 126 429Q219 429 229 431H237V385Q201 381 201 369Q201 367 211 353T239 315T268 274L272 270L297 304Q329 345 329 358Q329 364 327 369T322 376T317 380T310 384L307 385H302V431H309Q324 428 408 428Q487 428 493 431H499V385H492Q443 385 411 368Q394 360 377 341T312 257L296 236L358 151Q424 61 429 57T446 50Q464 46 499 46H516V0H510H502Q494 1 482 1T457 2T432 2T414 3Q403 3 377 3T327 1L304 0H295V46H298Q309 46 320 51T331 63Q331 65 291 120L250 175Q249 174 219 133T185 88Q181 83 181 74Q181 63 188 55T206 46Q208 46 208 23V0H201Z" transform="translate(7072,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(7600,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(7989,0)" style="stroke-width: 3;"/><path data-c="49" d="M328 0Q307 3 180 3T32 0H21V46H43Q92 46 106 49T126 60Q128 63 128 342Q128 620 126 623Q122 628 118 630T96 635T43 637H21V683H32Q53 680 180 680T328 683H339V637H317Q268 637 254 634T234 623Q232 620 232 342Q232 63 234 60Q238 55 242 53T264 48T317 46H339V0H328Z" transform="translate(8383,0)" style="stroke-width: 3;"/><path data-c="44" d="M130 622Q123 629 119 631T103 634T60 637H27V683H228Q399 682 419 682T461 676Q504 667 546 641T626 573T685 470T708 336Q708 210 634 116T442 3Q429 1 228 0H27V46H60Q102 47 111 49T130 61V622ZM593 338Q593 439 571 501T493 602Q439 637 355 637H322H294Q238 637 234 628Q231 624 231 344Q231 62 232 59Q233 49 248 48T339 46H350Q456 46 515 95Q561 133 577 191T593 338Z" transform="translate(8744,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(9508,0)" style="stroke-width: 3;"/><path data-c="A0" d="" transform="translate(9902,0)" style="stroke-width: 3;"/></g><g data-mml-node="mo" transform="translate(10430,0) translate(0 -0.5)"><path data-c="7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z" style="stroke-width: 3;"/></g></g><rect width="19467.4" height="60" x="120" y="220"/></g></g></g></g></svg><mjx-assistive-mml unselectable="on" display="block" style="top: 0px; left: 0px; clip: rect(1px, 1px, 1px, 1px); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: absolute; padding: 1px 0px 0px 0px; border: 0px; display: block; overflow: hidden; width: 100%;"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mstyle displaystyle="true" scriptlevel="0"><mtext>Precision</mtext><mo>=</mo><mfrac><mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo><mtext> RetrievedContextsIDs </mtext><mo>∩</mo><mtext> GTContextsIDs </mtext><mo data-mjx-texclass="ORD" stretchy="false">|</mo></mrow><mrow><mo data-mjx-texclass="ORD" stretchy="false">|</mo><mtext> RetrievedContextsIDs </mtext><mo data-mjx-texclass="ORD" stretchy="false">|</mo></mrow></mfrac></mstyle></math></mjx-assistive-mml></mjx-container></li>
<li><strong>公式详解：</strong>
<ul>
<li>取<code>GT_Contexts_IDs</code> 和 <code>Retrieved_Contexts_IDs </code> 的交集，获取其数量，再除以<code>Retrieved_Contexts_IDs </code>的数量，则得到准确率。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>召回内容诊断：</strong> <code>Precision</code> 低意味着检索结果中充斥着大量噪音。这不仅浪费 Token 成本，更会诱导 LLM 产生幻觉（因为 LLM 很难忽略看似相关实则错误的干扰信息）。</li>
<li><strong>迭代方向</strong>：想办法提高<code>Precision</code>，过滤掉不必要的召回上下文，包括：元数据过滤、增高召回阈值、混合检索、优化Rerank等.</li>
</ul>
</li>
</ul>
<h4>1.2.3 平均倒数排名 (Mean-RR)</h4>
<p>衡量Retrieval阶段对召回上下列表的排序能力与对 LLM 的“注意力引导”效果。</p>
<ul>
<li><strong>定义</strong>：在召回上下文的列表中，第一个正确（属于 <code>GT_Contexts_IDs</code> ）的上下文是不是排在最前面？</li>
<li><strong>计算公式</strong>：<mjx-container class="MathJax" jax="SVG" display="true" style="direction: ltr; display: block; text-align: center; margin: 1em 0; position: relative;"><svg style="overflow: visible; min-height: 1px; min-width: 1px; vertical-align: -1.602ex;" xmlns="http://www.w3.org/2000/svg" width="63.234ex" height="4.638ex" role="img" focusable="false" viewBox="0 -1342 27949.6 2050" aria-hidden="true"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="mstyle"><g data-mml-node="mtext"><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" style="stroke-width: 3;"/><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" transform="translate(736,0)" style="stroke-width: 3;"/></g><g data-mml-node="mo" transform="translate(1749.8,0)"><path data-c="3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z" style="stroke-width: 3;"/></g><g data-mml-node="mfrac" transform="translate(2805.6,0)"><g data-mml-node="mn" transform="translate(12322,676)"><path data-c="31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z" style="stroke-width: 3;"/></g><g data-mml-node="mtext" transform="translate(220,-686)"><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" style="stroke-width: 3;"/><path data-c="61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z" transform="translate(736,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(1236,0)" style="stroke-width: 3;"/><path data-c="6B" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T97 124T98 167T98 217T98 272T98 329Q98 366 98 407T98 482T98 542T97 586T97 603Q94 622 83 628T38 637H20V660Q20 683 22 683L32 684Q42 685 61 686T98 688Q115 689 135 690T165 693T176 694H179V463L180 233L240 287Q300 341 304 347Q310 356 310 364Q310 383 289 385H284V431H293Q308 428 412 428Q475 428 484 431H489V385H476Q407 380 360 341Q286 278 286 274Q286 273 349 181T420 79Q434 60 451 53T500 46H511V0H505Q496 3 418 3Q322 3 307 0H299V46H306Q330 48 330 65Q330 72 326 79Q323 84 276 153T228 222L176 176V120V84Q176 65 178 59T189 49Q210 46 238 46H254V0H246Q231 3 137 3T28 0H20V46H36Z" transform="translate(1792,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(2320,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(2570,0)" style="stroke-width: 3;"/><path data-c="66" d="M273 0Q255 3 146 3Q43 3 34 0H26V46H42Q70 46 91 49Q99 52 103 60Q104 62 104 224V385H33V431H104V497L105 564L107 574Q126 639 171 668T266 704Q267 704 275 704T289 705Q330 702 351 679T372 627Q372 604 358 590T321 576T284 590T270 627Q270 647 288 667H284Q280 668 273 668Q245 668 223 647T189 592Q183 572 182 497V431H293V385H185V225Q185 63 186 61T189 57T194 54T199 51T206 49T213 48T222 47T231 47T241 46T251 46H282V0H273Z" transform="translate(3070,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(3376,0)" style="stroke-width: 3;"/><path data-c="46" d="M128 619Q121 626 117 628T101 631T58 634H25V680H582V676Q584 670 596 560T610 444V440H570V444Q563 493 561 501Q555 538 543 563T516 601T477 622T431 631T374 633H334H286Q252 633 244 631T233 621Q232 619 232 490V363H284Q287 363 303 363T327 364T349 367T372 373T389 385Q407 403 410 459V480H450V200H410V221Q407 276 389 296Q381 303 371 307T348 313T327 316T303 317T284 317H232V189L233 61Q240 54 245 52T270 48T333 46H360V0H348Q324 3 182 3Q51 3 36 0H25V46H58Q100 47 109 49T128 61V619Z" transform="translate(3626,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(4279,0)" style="stroke-width: 3;"/><path data-c="72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z" transform="translate(4557,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(4949,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(5343,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(5732,0)" style="stroke-width: 3;"/><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" transform="translate(5982,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(6718,0)" style="stroke-width: 3;"/><path data-c="6C" d="M42 46H56Q95 46 103 60V68Q103 77 103 91T103 124T104 167T104 217T104 272T104 329Q104 366 104 407T104 482T104 542T103 586T103 603Q100 622 89 628T44 637H26V660Q26 683 28 683L38 684Q48 685 67 686T104 688Q121 689 141 690T171 693T182 694H185V379Q185 62 186 60Q190 52 198 49Q219 46 247 46H263V0H255L232 1Q209 2 183 2T145 3T107 3T57 1L34 0H26V46H42Z" transform="translate(7162,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(7440,0)" style="stroke-width: 3;"/><path data-c="76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z" transform="translate(7884,0)" style="stroke-width: 3;"/><path data-c="61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z" transform="translate(8412,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(8912,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(9468,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(9857,0)" style="stroke-width: 3;"/><path data-c="43" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q322 658 252 588Q173 509 173 342Q173 221 211 151Q232 111 263 84T328 45T384 29T428 24Q517 24 571 93T626 244Q626 251 632 257H660L666 251V236Q661 133 590 56T403 -21Q262 -21 159 83T56 342Z" transform="translate(10107,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(10829,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(11329,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(11885,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(12274,0)" style="stroke-width: 3;"/><path data-c="78" d="M201 0Q189 3 102 3Q26 3 17 0H11V46H25Q48 47 67 52T96 61T121 78T139 96T160 122T180 150L226 210L168 288Q159 301 149 315T133 336T122 351T113 363T107 370T100 376T94 379T88 381T80 383Q74 383 44 385H16V431H23Q59 429 126 429Q219 429 229 431H237V385Q201 381 201 369Q201 367 211 353T239 315T268 274L272 270L297 304Q329 345 329 358Q329 364 327 369T322 376T317 380T310 384L307 385H302V431H309Q324 428 408 428Q487 428 493 431H499V385H492Q443 385 411 368Q394 360 377 341T312 257L296 236L358 151Q424 61 429 57T446 50Q464 46 499 46H516V0H510H502Q494 1 482 1T457 2T432 2T414 3Q403 3 377 3T327 1L304 0H295V46H298Q309 46 320 51T331 63Q331 65 291 120L250 175Q249 174 219 133T185 88Q181 83 181 74Q181 63 188 55T206 46Q208 46 208 23V0H201Z" transform="translate(12718,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(13246,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(13635,0)" style="stroke-width: 3;"/><path data-c="49" d="M328 0Q307 3 180 3T32 0H21V46H43Q92 46 106 49T126 60Q128 63 128 342Q128 620 126 623Q122 628 118 630T96 635T43 637H21V683H32Q53 680 180 680T328 683H339V637H317Q268 637 254 634T234 623Q232 620 232 342Q232 63 234 60Q238 55 242 53T264 48T317 46H339V0H328Z" transform="translate(13885,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(14246,0)" style="stroke-width: 3;"/><path data-c="20" d="" transform="translate(14802,0)" style="stroke-width: 3;"/><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" transform="translate(15052,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(15788,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(16232,0)" style="stroke-width: 3;"/><path data-c="72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z" transform="translate(16621,0)" style="stroke-width: 3;"/><path data-c="69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z" transform="translate(17013,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(17291,0)" style="stroke-width: 3;"/><path data-c="76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z" transform="translate(17735,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(18263,0)" style="stroke-width: 3;"/><path data-c="64" d="M376 495Q376 511 376 535T377 568Q377 613 367 624T316 637H298V660Q298 683 300 683L310 684Q320 685 339 686T376 688Q393 689 413 690T443 693T454 694H457V390Q457 84 458 81Q461 61 472 55T517 46H535V0Q533 0 459 -5T380 -11H373V44L365 37Q307 -11 235 -11Q158 -11 96 50T34 215Q34 315 97 378T244 442Q319 442 376 393V495ZM373 342Q328 405 260 405Q211 405 173 369Q146 341 139 305T131 211Q131 155 138 120T173 59Q203 26 251 26Q322 26 373 103V342Z" transform="translate(18707,0)" style="stroke-width: 3;"/><path data-c="43" d="M56 342Q56 428 89 500T174 615T283 681T391 705Q394 705 400 705T408 704Q499 704 569 636L582 624L612 663Q639 700 643 704Q644 704 647 704T653 705H657Q660 705 666 699V419L660 413H626Q620 419 619 430Q610 512 571 572T476 651Q457 658 426 658Q322 658 252 588Q173 509 173 342Q173 221 211 151Q232 111 263 84T328 45T384 29T428 24Q517 24 571 93T626 244Q626 251 632 257H660L666 251V236Q661 133 590 56T403 -21Q262 -21 159 83T56 342Z" transform="translate(19263,0)" style="stroke-width: 3;"/><path data-c="6F" d="M28 214Q28 309 93 378T250 448Q340 448 405 380T471 215Q471 120 407 55T250 -10Q153 -10 91 57T28 214ZM250 30Q372 30 372 193V225V250Q372 272 371 288T364 326T348 362T317 390T268 410Q263 411 252 411Q222 411 195 399Q152 377 139 338T126 246V226Q126 130 145 91Q177 30 250 30Z" transform="translate(19985,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(20485,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(21041,0)" style="stroke-width: 3;"/><path data-c="65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z" transform="translate(21430,0)" style="stroke-width: 3;"/><path data-c="78" d="M201 0Q189 3 102 3Q26 3 17 0H11V46H25Q48 47 67 52T96 61T121 78T139 96T160 122T180 150L226 210L168 288Q159 301 149 315T133 336T122 351T113 363T107 370T100 376T94 379T88 381T80 383Q74 383 44 385H16V431H23Q59 429 126 429Q219 429 229 431H237V385Q201 381 201 369Q201 367 211 353T239 315T268 274L272 270L297 304Q329 345 329 358Q329 364 327 369T322 376T317 380T310 384L307 385H302V431H309Q324 428 408 428Q487 428 493 431H499V385H492Q443 385 411 368Q394 360 377 341T312 257L296 236L358 151Q424 61 429 57T446 50Q464 46 499 46H516V0H510H502Q494 1 482 1T457 2T432 2T414 3Q403 3 377 3T327 1L304 0H295V46H298Q309 46 320 51T331 63Q331 65 291 120L250 175Q249 174 219 133T185 88Q181 83 181 74Q181 63 188 55T206 46Q208 46 208 23V0H201Z" transform="translate(21874,0)" style="stroke-width: 3;"/><path data-c="74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z" transform="translate(22402,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(22791,0)" style="stroke-width: 3;"/><path data-c="49" d="M328 0Q307 3 180 3T32 0H21V46H43Q92 46 106 49T126 60Q128 63 128 342Q128 620 126 623Q122 628 118 630T96 635T43 637H21V683H32Q53 680 180 680T328 683H339V637H317Q268 637 254 634T234 623Q232 620 232 342Q232 63 234 60Q238 55 242 53T264 48T317 46H339V0H328Z" transform="translate(23185,0)" style="stroke-width: 3;"/><path data-c="44" d="M130 622Q123 629 119 631T103 634T60 637H27V683H228Q399 682 419 682T461 676Q504 667 546 641T626 573T685 470T708 336Q708 210 634 116T442 3Q429 1 228 0H27V46H60Q102 47 111 49T130 61V622ZM593 338Q593 439 571 501T493 602Q439 637 355 637H322H294Q238 637 234 628Q231 624 231 344Q231 62 232 59Q233 49 248 48T339 46H350Q456 46 515 95Q561 133 577 191T593 338Z" transform="translate(23546,0)" style="stroke-width: 3;"/><path data-c="73" d="M295 316Q295 356 268 385T190 414Q154 414 128 401Q98 382 98 349Q97 344 98 336T114 312T157 287Q175 282 201 278T245 269T277 256Q294 248 310 236T342 195T359 133Q359 71 321 31T198 -10H190Q138 -10 94 26L86 19L77 10Q71 4 65 -1L54 -11H46H42Q39 -11 33 -5V74V132Q33 153 35 157T45 162H54Q66 162 70 158T75 146T82 119T101 77Q136 26 198 26Q295 26 295 104Q295 133 277 151Q257 175 194 187T111 210Q75 227 54 256T33 318Q33 357 50 384T93 424T143 442T187 447H198Q238 447 268 432L283 424L292 431Q302 440 314 448H322H326Q329 448 335 442V310L329 304H301Q295 310 295 316Z" transform="translate(24310,0)" style="stroke-width: 3;"/></g><rect width="24904" height="60" x="120" y="220"/></g></g></g></g></svg><mjx-assistive-mml unselectable="on" display="block" style="top: 0px; left: 0px; clip: rect(1px, 1px, 1px, 1px); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: absolute; padding: 1px 0px 0px 0px; border: 0px; display: block; overflow: hidden; width: 100%;"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mstyle displaystyle="true" scriptlevel="0"><mtext>RR</mtext><mo>=</mo><mfrac><mn>1</mn><mtext>Rank of First Relevant Context In RetrievedContextsIDs</mtext></mfrac></mstyle></math></mjx-assistive-mml></mjx-container></li>
<li><strong>公式详解：</strong>
<ul>
<li>针对每一个问题，检查 <code>Retrieved_Contexts_IDs </code> 列表（有序）。</li>
<li>找到列表中第一个出现在 <code>GT_Contexts_IDs</code> 中的文档，记录其排名位置（Rank）。</li>
<li>计算该问题的得分 <mjx-container class="MathJax" jax="SVG" style="direction: ltr; position: relative;"><svg style="overflow: visible; min-height: 1px; min-width: 1px; vertical-align: -0.816ex;" xmlns="http://www.w3.org/2000/svg" width="4.707ex" height="2.773ex" role="img" focusable="false" viewBox="0 -864.9 2080.5 1225.5" aria-hidden="true"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="mfrac"><g data-mml-node="mn" transform="translate(863.5,394) scale(0.707)"><path data-c="31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z" style="stroke-width: 3;"/></g><g data-mml-node="mtext" transform="translate(220,-345) scale(0.707)"><path data-c="52" d="M130 622Q123 629 119 631T103 634T60 637H27V683H202H236H300Q376 683 417 677T500 648Q595 600 609 517Q610 512 610 501Q610 468 594 439T556 392T511 361T472 343L456 338Q459 335 467 332Q497 316 516 298T545 254T559 211T568 155T578 94Q588 46 602 31T640 16H645Q660 16 674 32T692 87Q692 98 696 101T712 105T728 103T732 90Q732 59 716 27T672 -16Q656 -22 630 -22Q481 -16 458 90Q456 101 456 163T449 246Q430 304 373 320L363 322L297 323H231V192L232 61Q238 51 249 49T301 46H334V0H323Q302 3 181 3Q59 3 38 0H27V46H60Q102 47 111 49T130 61V622ZM491 499V509Q491 527 490 539T481 570T462 601T424 623T362 636Q360 636 340 636T304 637H283Q238 637 234 628Q231 624 231 492V360H289Q390 360 434 378T489 456Q491 467 491 499Z" style="stroke-width: 3;"/><path data-c="61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z" transform="translate(736,0)" style="stroke-width: 3;"/><path data-c="6E" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 122T103 161T103 203Q103 234 103 269T102 328V351Q99 370 88 376T43 385H25V408Q25 431 27 431L37 432Q47 433 65 434T102 436Q119 437 138 438T167 441T178 442H181V402Q181 364 182 364T187 369T199 384T218 402T247 421T285 437Q305 442 336 442Q450 438 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z" transform="translate(1236,0)" style="stroke-width: 3;"/><path data-c="6B" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T97 124T98 167T98 217T98 272T98 329Q98 366 98 407T98 482T98 542T97 586T97 603Q94 622 83 628T38 637H20V660Q20 683 22 683L32 684Q42 685 61 686T98 688Q115 689 135 690T165 693T176 694H179V463L180 233L240 287Q300 341 304 347Q310 356 310 364Q310 383 289 385H284V431H293Q308 428 412 428Q475 428 484 431H489V385H476Q407 380 360 341Q286 278 286 274Q286 273 349 181T420 79Q434 60 451 53T500 46H511V0H505Q496 3 418 3Q322 3 307 0H299V46H306Q330 48 330 65Q330 72 326 79Q323 84 276 153T228 222L176 176V120V84Q176 65 178 59T189 49Q210 46 238 46H254V0H246Q231 3 137 3T28 0H20V46H36Z" transform="translate(1792,0)" style="stroke-width: 3;"/></g><rect width="1840.5" height="60" x="120" y="220"/></g></g></g></svg><mjx-assistive-mml unselectable="on" display="inline" style="top: 0px; left: 0px; clip: rect(1px, 1px, 1px, 1px); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: absolute; padding: 1px 0px 0px 0px; border: 0px; display: block; width: auto; overflow: hidden;"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mtext>Rank</mtext></mfrac></math></mjx-assistive-mml></mjx-container>（例如：排第1得1分，排第2得0.5分，没找到得0分）。</li>
<li>将所有问题的得分加总后取平均值，即为 MRR。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>召回内容诊断：</strong> MRR 低说明正确答案虽然被召回了，但被埋没在列表的中间或尾部。由于 LLM 存在 “迷失中间 (Lost in the Middle)” 效应和 “首因效应”，排在靠后的正确信息很容易被 LLM 忽略或权重降低，导致回答质量下降。</li>
<li><strong>迭代方向：</strong> 核心是优化排序逻辑，确保最相关的文档“置顶”。包括：引入重排序模型 (Re-ranker)（这是提升 MRR 最有效的手段）、微调 Embedding 模型、调整混合检索中关键词与向量的权重配比等。</li>
</ul>
</li>
</ul>
<h3>1.3 LLM_Generation阶段</h3>
<p>在此阶段，假设检索召回已经完成，我们将目光聚焦于 LLM 的“大脑”处理能力。评估的重点不再是“找没找到”，而是“读懂了没”以及“写得好不好”。</p>
<p><strong>字典解释</strong></p>
<ul>
<li><code>Retrieved_Contexts</code>: 指Retrieval阶段实际召回的上下文内容，特指内容本身，不是ID。</li>
</ul>
<h4>1.3.1 答案有据性（Groundedness）</h4>
<p>该指标是 RAG Agent的“防幻觉”底线。</p>
<ul>
<li><strong>定义</strong>：Agent 的回答是否严格基于召回上下文？生成的每一个原子事实（Atomic Fact）能否在召回上下文中找到证据支撑？</li>
<li><strong>计算逻辑（LLM-as-a-Judge）</strong>：
<ul>
<li><strong>输入</strong>：<code>Agent Answer</code> vs <code>Retrieved_Contexts</code></li>
<li><strong>逻辑</strong>：裁判 LLM 将回答拆解为独立的事实陈述，逐一在 Context 中寻找证据。</li>
</ul>
</li>
<li><strong>评分标准</strong>：
<ul>
<li><strong>最高分</strong>：所有信息均有出处，允许合理的总结与改写。</li>
<li>……</li>
<li><strong>最低分</strong>：包含未知的外部信息，或与 Context 严重冲突。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>生成内容诊断</strong>：确保 Agent “知之为知之，不知为不知”。对于教程类 Agent，必须防止它在检索失败时，利用训练数据中的过时知识编造参数。</li>
<li><strong>迭代方向</strong>：若分数低，需修改 System Prompt，加强“仅基于上下文回答”、“严禁使用外部知识”的约束；或降低 LLM 的 Temperature 参数；或更换LLM等。</li>
</ul>
</li>
</ul>
<h4>1.3.2 答案相关性（Relevance）</h4>
<p>该指标衡量 Agent 是否“听懂了人话”以及“服务态度”。</p>
<ul>
<li><strong>定义</strong>：Agent 是否直接、有效地回应了用户的核心问题？</li>
<li><strong>计算逻辑（LLM-as-a-Judge）</strong>：
<ul>
<li><strong>输入</strong>：<code>Agent Answer</code> vs <code>User Query</code>。<em>注：此处特意不输入上下文，以保持变量隔离。</em></li>
<li><strong>逻辑</strong>：裁判 LLM 判断回答是否直击痛点，是否存在废话、复读机行为或答非所问。</li>
</ul>
</li>
<li><strong>评分标准</strong>：
<ul>
<li><strong>最高分</strong>：完美切题。</li>
<li>……</li>
<li><strong>最低分：</strong> 答非所问，如V4版本遇到的问题。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>生成内容诊断</strong>：
<ol>
<li>若 相关性低：说明 LLM 指令遵循能力差，或者被 Prompt 中的无关信息带偏。</li>
<li>若 相关性低 但 有据性高：这是典型的”老实人办坏事”。说明检索到了错误信息，Agent 被迫“老实地”回答了错误的内容。此时锅在 Retrieval 阶段。</li>
</ol>
</li>
<li><strong>迭代方向</strong>：优化 Prompt 中的任务指令（Instruction），明确回答风格；若属上述情况2，则需回溯优化召回率。</li>
</ul>
</li>
</ul>
<h4>1.3.3 可选指标-信息组织力（Organization）</h4>
<p>该指标是 V4 版本的特色指标，用于衡量“结构化生成”策略的成效。</p>
<ul>
<li><strong>定义</strong>：Agent 是否成功利用“主题约束”，将碎片化的召回上下文有机融合，并果断舍弃了无关噪音？</li>
<li><strong>计算逻辑（LLM-as-a-Judge）</strong>：
<ul>
<li><strong>输入</strong>：<code>Agent Answer</code> vs <code>Retrieved_Contexts</code>。</li>
<li><strong>逻辑</strong>：判断 Agent 是否构建了清晰的逻辑主线？是否舍弃了 Context 中的琐碎噪音？是否消除了“根据资料1显示&#8230;”这种机械拼接痕迹？</li>
</ul>
</li>
<li><strong>评分标准</strong>：
<ul>
<li>最高分：深度融合/完美降噪/专家口吻。</li>
<li>……</li>
<li>中间分：机械拼接/流水账。</li>
<li>……</li>
<li>最低分：逻辑混乱。</li>
</ul>
</li>
<li><strong>实践意义</strong>：
<ul>
<li><strong>生成内容诊断</strong>：这是区分“复读机”与“真正的专家助手”的关键。验证 V4 引入的 “自由主题提取 -&gt; 结构化生成” 策略是否生效。</li>
<li><strong>迭代方向</strong>：若分数低，说明 LLM 仍倾向于机械摘录。需优化生成阶段的 Prompt，引入思维链（CoT），要求 LLM 先在内部构建大纲，再进行“专家口吻”的转述。</li>
</ul>
</li>
</ul>
<h2>二、 黄金评估集</h2>
<h3>2.1 介绍</h3>
<p>在整体评估框架中，会发现无论什么指标，都要求有 <strong>正确参考内容</strong> 作为对比，这些正确参考内容是黄金集条目的核心要素，主要包含3部分：</p>
<table>
<thead>
<tr>
<th style="text-align:left"><strong>要素</strong></th>
<th style="text-align:left"><strong>变量名</strong></th>
<th style="text-align:left"><strong>定义</strong></th>
<th style="text-align:left"><strong>作用</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>问题</strong></td>
<td style="text-align:left"><code>user_query</code></td>
<td style="text-align:left">覆盖新手、进阶、排错等多维度的用户提问。</td>
<td style="text-align:left">模拟真实场景输入。</td>
</tr>
<tr>
<td style="text-align:left"><strong>标准上下文ID集合</strong></td>
<td style="text-align:left"><code>GT_Context_IDs</code></td>
<td style="text-align:left">回答该问题<strong>充分且必要</strong>的召回内容ID集合。</td>
<td style="text-align:left">检索评估的基准，计算召回率和准确率。</td>
</tr>
<tr>
<td style="text-align:left"><strong>(可选)标准上下文内容</strong></td>
<td style="text-align:left"><code>GT_Contexts</code></td>
<td style="text-align:left">回答该问题<strong>充分且必要</strong>的召回内容本身。</td>
<td style="text-align:left">当标准答案撰写成本较高时，作为生成标准答案的素材。</td>
</tr>
<tr>
<td style="text-align:left"><strong>标准答案</strong></td>
<td style="text-align:left"><code>GT_Answer</code></td>
<td style="text-align:left">基于标准上下文生成的、逻辑严密且事实准确的理想回答。</td>
<td style="text-align:left">生成评估的基准，用于判定 Agent 回答的正确性。</td>
</tr>
</tbody>
</table>
<h3>2.2 黄金集的构造原则</h3>
<p>黄金集为评估服务，评估框架为迭代服务。</p>
<p>在此前提下，首先避免踩坑大坑，需指出<strong>黄金集条目不是越多越好</strong>，原因如下：</p>
<ul>
<li>黄金集不是为了在大数据上抛出统计学显著性，而是快速诊断系统病灶。</li>
<li>黄金集更多是“困难样本的浓缩”，当样本过多时，分母变大，指标被稀释。</li>
<li>黄金集的更新维护成本较高，小规模的样本可确保人工校验的可行性。</li>
<li>迭代成本，小样本意味着评测成本低、速度快。</li>
</ul>
<p>构建黄金评估集需要遵循以下原则：</p>
<blockquote>
<p>覆盖度 &gt; 质量 &gt; 数量</p>
</blockquote>
<h4>2.2.1 覆盖度</h4>
<p>覆盖度并非指题目要穷尽所有的业务知识点，而是指黄金集中的 <code>GT_Contexts</code>（标准上下文）必须覆盖不同的检索场景。</p>
<p>在对检索场景分类前，先介绍检索动作依赖性，大致分为<strong>单跳类型和多跳类型。</strong></p>
<ul>
<li><strong>单跳类型</strong>：指检索召回模块通过用户输入，仅需进行一次并行检索动作，即可在结果集中找齐所需信息，<strong>上下文之间是并列关系</strong>（B上下文不需要通过A上下文中的线索得到），图示如下：<br />
<img decoding="async" src="../../_assets/rag%E8%AF%84%E4%BC%B0%E6%A1%86%E6%9E%B6_%E9%BB%84%E9%87%91%E9%9B%86%E8%A6%86%E7%9B%96%E5%BA%A6_%E5%8D%95%E8%B7%B3%E7%B1%BB%E5%9E%8B%E7%A4%BA%E6%84%8F.png" alt="rag评估框架_黄金集覆盖度_单跳类型示意"></li>
<li><strong>多跳类型</strong>：指检索召回模块无法通过初始输入一次性找齐答案。它需要多次检索，且<strong>后续的检索动作依赖于前一次检索到的内容</strong>（线索）。上下文之间存在<strong>链式</strong>或<strong>因果</strong>关系（A <mjx-container class="MathJax" jax="SVG" style="direction: ltr; position: relative;"><svg style="overflow: visible; min-height: 1px; min-width: 1px; vertical-align: -0.025ex;" xmlns="http://www.w3.org/2000/svg" width="2.262ex" height="1.181ex" role="img" focusable="false" viewBox="0 -511 1000 522" aria-hidden="true"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="mo"><path data-c="2192" d="M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z" style="stroke-width: 3;"/></g></g></g></svg><mjx-assistive-mml unselectable="on" display="inline" style="top: 0px; left: 0px; clip: rect(1px, 1px, 1px, 1px); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: absolute; padding: 1px 0px 0px 0px; border: 0px; display: block; width: auto; overflow: hidden;"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo stretchy="false">→</mo></math></mjx-assistive-mml></mjx-container> B），图示如下：<br />
<img decoding="async" src="../../_assets/rag%E8%AF%84%E4%BC%B0%E6%A1%86%E6%9E%B6_%E9%BB%84%E9%87%91%E9%9B%86%E8%A6%86%E7%9B%96%E5%BA%A6_%E5%A4%9A%E8%B7%B3%E7%B1%BB%E5%9E%8B%E7%A4%BA%E6%84%8F.png" alt="rag评估框架_黄金集覆盖度_多跳类型示意"></li>
</ul>
<p>结合检索动作依赖性 &amp; <code>GT_Contexts</code>在文档的位置分布情况，就可以得到4类检索场景。</p>
<table>
<thead>
<tr>
<th style="text-align:left">覆盖度类型</th>
<th style="text-align:left">类型描述</th>
<th style="text-align:left">主要挑战指标</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">A_单跳_单文档_单点</td>
<td style="text-align:left"><code>GT_Contexts</code>只需标记1条，单跳获得</td>
<td style="text-align:left"><strong>挑战</strong>：<strong>Precision</strong>。<br />考察系统能否精准定位，不带噪音。</td>
</tr>
<tr>
<td style="text-align:left">B_单跳_单文档_多点</td>
<td style="text-align:left"><code>GT_Contexts</code>需在同一文档中标记多条，单跳获得</td>
<td style="text-align:left"><strong>挑战</strong>：<strong>Recall</strong>。<br />考察切分粒度是否太细导致语义破碎？窗口是否够大？</td>
</tr>
<tr>
<td style="text-align:left">C_单跳_多文档_多点</td>
<td style="text-align:left"><code>GT_Contexts</code>需在多文档中标记多条，单跳获得</td>
<td style="text-align:left"><strong>挑战</strong>：<strong>Organization</strong>。考察 V4 能否将并列的、来源不同的知识点有机融合。</td>
</tr>
<tr>
<td style="text-align:left">D_多跳_多文档_多点</td>
<td style="text-align:left"><code>GT_Contexts</code>需在多文档中标记多条，多次</td>
<td style="text-align:left"><strong>挑战：Recall。</strong><br />考察检索链路的完整性。若 A 没召回，B 也就丢了。</td>
</tr>
<tr>
<td style="text-align:left">就此，我们便能通过黄金评估集能覆盖检索场景，至于分布比例可酌情考虑。</td>
<td style="text-align:left"></td>
<td style="text-align:left"></td>
</tr>
</tbody>
</table>
<h4>2.2.2 质量</h4>
<p>质量是黄金集的生命线。高质量的标注必须遵循 <strong>“最小完备集”</strong> 原则。即：专家标注的 <code>GT_Contexts</code> 对于回答该问题而言，必须是<strong>充分且必要</strong>的。</p>
<p><strong>充分性—— “缺一不可”</strong><br />
&#8211; <strong>定义</strong>：集合必须包含回答问题所需的所有信息片段。<br />
&#8211; <strong>违规后果</strong>：若漏标关键Contexts，检索没找回来也不扣分，但生成阶段 LLM 却因缺信息而瞎编（导致 Recall 虚高，幻觉增加）。</p>
<p><strong>必要性 —— “多一不可”</strong><br />
&#8211; <strong>定义</strong>：集合中不应包含任何对回答问题无实质帮助的冗余片段。<br />
&#8211; <strong>违规后果</strong>：若多标了无关Contexts，Agent 没找回来（这是对的）却被扣了召回分（导致 Recall 虚低，误杀好模型）。</p>
<p><strong>验收标准</strong>：专家在审核时需自问：“如果我不给 LLM 看这个 Context，它还能答对吗？”如果不影响作答，则该 Context不应被标记为 GT。</p>
<h4>2.2.3 数量</h4>
<p>在 RAG 的迭代开发期，遵循 <strong>“精简原则”</strong>。</p>
<ul>
<li><strong>推荐规模</strong>：<strong>50 条以内</strong> （<em>tips：作者首次实践时，只构建了10条</em>）</li>
<li><strong>动态维护策略</strong>：
<ul>
<li><strong>拒绝题海战术</strong>：保持小规模数据集，确保专家可在短时间内完成一轮人工校验，保证评估的可持续性。</li>
<li><strong>末位淘汰制</strong>：黄金集应是“动态错题本”。当某个 Type A 类问题在连续N个版本中得分均为满分，说明系统已完全掌握，应将其移出黄金集（转入回归测试库），并补充新的 Type C/D 类“难题”进来。</li>
<li><strong>保持敏感度</strong>：始终维持黄金集的高难度与高敏感度，确保每一次代码微调（如修改 Prompt 或 重排序权重）都能在分数上得到直观反馈。</li>
</ul>
</li>
</ul>
<h3>2.3 黄金集构建实操SOP</h3>
<p>面对海量文档，纯人工构建耗时耗力。为了在质量与效率之间取得平衡，推荐采用 AI 辅助 + 专家裁决的流水线模式。</p>
<h4>Step 1：定向提问</h4>
<p>利用 LLM 遍历知识库，针对性地生成覆盖 A/B/C/D 四类场景的问题。</p>
<ul>
<li><strong>操作技巧</strong>：不要让 LLM 泛泛而谈。需在 Prompt 中明确要求：“请根据文档生成一个需要跨段落总结的问题（B类）”或“请生成一个多跳推理问题（D类）”。</li>
<li><strong>输入</strong>：知识库文档片段。</li>
<li><strong>Prompt</strong>：见文末附录。</li>
<li><strong>产出</strong>：候选问题列表。</li>
</ul>
<h4>Step 2：专家标记上下文</h4>
<p>这是构建过程中唯一不可省略的人工环节，也是确立“真理”的过程。</p>
<ul>
<li><strong>操作</strong>：开发者审视候选问题，利用搜索工具在知识库中检索，人工筛选出 <code>GT_Context_IDs</code>。</li>
<li><strong>执行标准</strong>：严格执行“最小完备集”原则。
<ul>
<li><em>自问 1</em>：“为了答对这道题，必须看这段话吗？” -&gt; 若否，剔除。</li>
<li><em>自问 2</em>：“只看这两段话，逻辑链条断了吗？” -&gt; 若断，补录。</li>
</ul>
</li>
<li><strong>产出</strong>：<code>User_Query</code> + <code>GT_Context_IDs</code>。</li>
</ul>
<h4>Step 3：有机融合生成答案</h4>
<p>有了精准的上下文，我们不需要人工手写几百字的标准答案，而是让 LLM 代劳。</p>
<ul>
<li><strong>策略</strong>：使用 <strong>“有机融合 Prompt”</strong>。要求 LLM 扮演专家，基于 <code>GT_Context_IDs</code> 进行逻辑重组，生成一篇结构严密、丝滑的“满分作文”。</li>
<li><strong>Prompt</strong>：见文末附录。</li>
<li><strong>产出</strong>：<code>GT_Answer</code>。</li>
</ul>
<h4>Step 4：快速验收</h4>
<p>专家只需快速人工扫视生成的 <code>GT_Answer</code>,同时也可以让LLM代劳。</p>
<ul>
<li><strong>检查点</strong>：逻辑是否通顺？是否存在明显幻觉（使用了素材外的信息）？</li>
<li><strong>耗时</strong>：熟练后，每条数据的验收时间可控制在 <strong>1-2 分钟</strong>。</li>
<li><strong>Prompt</strong>：当然，也能利用LLM进行答案审核，Promp放在文末附录。</li>
</ul>
<hr>
<h2>三、结语</h2>
<p>回顾《Rag Agent，迭代史》，V1 到 V4 是“功能”的累积，而评估框架的诞生，则是“工程”的觉醒。</p>
<p>评估不是终点，而是新迭代的起点。带着这套量化体系，让我们在后续版本中，用数据驱动每一次优化，通过实操去挑战 RAG 的能力上限。</p>
<h2>附录</h2>
<h3>Agent_Answer有据性评估Prompt</h3>
<pre><code># Role
你是一位专门检测 AI 幻觉的审计员。你的任务是判断“模型回答”中的每一条信息是否都有“参考资料”作为支撑。

# Input Data
## **参考资料 (Retrieved Context)**:
{{context}}

## **模型回答 (Model Answer)**:
{{actual_output}}

# Evaluation Steps (评估步骤)
1. 将“模型回答”拆解为独立的陈述句。
2. 逐一检查每一条陈述句：
   - 它是否能在“参考资料”中找到明确证据？
   - 或者它是否是基于“参考资料”的合理推断（不矛盾）？
3. 检查是否存在“参考资料”中未提及的外部知识（除非是普适常识）。

# Scoring Rubric (评分标准 1-5)
- **5分 (完全忠实)**：回答中的所有事实、数据、逻辑都严格源自参考资料。回答是对资料的有机重组，没有添加任何未授权的信息。
- **4分 (基本忠实)**：回答基于参考资料，但包含了极少量的、无害的连接词或背景修饰，不影响事实准确性。
- **3分 (部分幻觉)**：回答的主要内容基于资料，但夹杂了资料中未提及的具体细节（如编造了具体的参数值或步骤）。
- **2分 (严重幻觉)**：回答中包含大量资料中不存在的信息，或者通过外部知识回答了资料中没提到的问题。
- **1分 (完全矛盾)**：回答的内容与参考资料直接冲突，或者是完全的瞎编。

# Output Format
请严格输出 JSON 格式：
{
  &quot;score&quot;: &lt;1-5的整数&gt;,
  &quot;reason&quot;: &quot;&lt;简短指出哪一句话或者是哪个参数在参考资料中找不到依据&gt;&quot;
}
</code></pre>
<h3>Agent_Answer相关性评估Prompt</h3>
<pre><code># Role
你是一位严格的考官。你的任务是评估考生的回答是否**直接、完整**地回应了考题，而不关心回答的事实是否正确。

# Input Data
## **用户问题 (User Question)**:
{{input}}

## **模型回答 (Model Answer)**:
{{actual_output}}

# Evaluation Criteria (评估标准)
请关注回答的**针对性**。
- 回答是否正面解决了用户的疑问？
- 回答是否提供了有用的信息，还是在说废话？
- **注意**：即使回答包含事实错误（幻觉），只要它是在尝试回答这个问题，相关性分数也可以很高。

# Scoring Rubric (评分标准 1-5)
- **5分 (完美相关)**：回答直击痛点，完整覆盖了问题的所有意图。无冗余废话。
- **4分 (高度相关)**：回答了核心问题，但可能包含少量不必要的啰嗦，或者遗漏了次要的追问。
- **3分 (一般)**：回答沾边，但不够直接。例如：用户问“怎么做”，回答却在解释“是什么”。或者回答过于宽泛。
- **2分 (低相关)**：回答了相关的话题，但没有解决具体问题。例如：复述了一遍问题中的关键词，但没给出结论。
- **1分 (不相关)**：完全答非所问，或者像复读机一样重复问题，或者回答了完全不同的问题。

# Output Format
请严格输出 JSON 格式：
{
  &quot;score&quot;: &lt;1-5的整数&gt;,
  &quot;reason&quot;: &quot;&lt;简短评价回答是否直接解决了问题&gt;&quot;
}
</code></pre>
<h3>Agent_Answer信息组织力评估Prompt</h3>
<pre><code># Role
你是一位资深的信息架构师和编辑。你的任务是评估 AI 是否成功地将**碎片化的【上下文】**重构成**结构化的成品**。

# Input Data
## **用户问题**: 
{{这里填写用户问题}}


## **上下文 (Context)**: 
*(注意：这里面可能包含很多零碎、重复、甚至与核心主题无关的噪音信息，其中topics代表了内容主题)*

{{这里填写召回的上下文}}


# **模型回答 (Model Answer)**: 
{{actual_output}}

# Evaluation Goal
请判断：模型是否成功应用了“主题约束”策略？即：它是否从碎片中提取了逻辑主线，并**果断舍弃**了那些无法串联的零碎信息？

# Evaluation Criteria (评分标准 1-5)

- **5分 (卓越的重构)**：
    - **极强的逻辑主线**：回答围绕核心主题展开，结构严密（如：总分总、对比结构）。
    - **完美的降噪**：上下文中那些琐碎的、无法融入主题的孤立句子被完全过滤掉了。
    - **有机串联**：引用的上下文片段被“消化”后重新组织，看不到拼接痕迹。

- **4分 (良好的重构)**：
    - 有明显的主题结构。
    - 舍弃了大部分噪音，但可能保留了个别突兀的细节。
    - 语句通顺。

- **3分 (机械拼接 - 你的痛点)**：
    - **流水账**：虽然回答了问题，但感觉是把上下文里的信息按顺序翻译了一遍。
    - **未过滤噪音**：上下文里提到的一些无关琐事（比如无关的参数定义）也被强行塞进了回答里。
    - **缺乏主线**：没有清晰的“自由主题”感。

- **2分 (逻辑混乱)**：
    - 试图结构化但失败了，导致逻辑断层。
    - 或者强行把不相关的信息硬凑在一起。

- **1分 (失败)**：
    - 直接复制粘贴上下文原文。
    - 或者完全脱离上下文自己瞎编。

# Output Format
请严格输出 JSON 格式：
{
  &quot;score&quot;: &lt;1-5的整数&gt;,
  &quot;reason&quot;: &quot;&lt;简短评价回答是否直接解决了问题&gt;&quot;
}
</code></pre>
<h3>黄金集构建_提问Prompt</h3>
<pre><code># Role
你是一位 RAG 系统测试专家，专门负责构建高难度的“黄金评估集”。你需要深入理解提供的技术文档，并站在小白用户、进阶用户和故障排查者的角度，设计出能全面考察检索系统能力的测试题。

# Taxonomy: 检索场景分类矩阵
请严格按照以下四种难度类型生成问题，确保问题集具备充分的覆盖度：

1.  **Type A (单跳-单点)**:
    * **定义**: 答案仅位于文档中的某一个具体段落，只需精准匹配。
    * **特征**: 询问具体的参数值、定义、报错含义。
    * **例题**: &quot;Flux.1 Dev 版本的显存推荐值是多少？&quot;

2.  **Type B (单跳-离散)**:
    * **定义**: 答案分散在同一文档的开头、中间或结尾，需要进行长文总结。
    * **特征**: 询问“所有...”、“流程步骤”、“包含哪些...”。
    * **例题**: &quot;总结一下文中提到的所有 ControlNet 预处理器名称。&quot;

3.  **Type C (跨文档-对比/融合)**:
    * **定义**: 答案需要结合文档中两个不同主题的部分（甚至跨文档）进行对比或综合。
    * **特征**: 询问“区别是什么”、“优缺点对比”、“共同点”。
    * **例题**: &quot;对比一下文中提到的 IPAdapter 和 ControlNet 在控图原理上的主要区别。&quot;

4.  **Type D (多跳-推理)**:
    * **定义**: 答案无法直接找到，需要先找到线索 A，再根据线索 A 找到答案 B。
    * **特征**: 问题中包含间接引用的实体，或询问“如何配置 X 对应的 Y”。
    * **例题**: &quot;我要加载文中提到的那个 T5 文本编码器，在 ComfyUI 加载节点里应该填哪个文件名？&quot; (需先查 T5 对应的文件名，再回答)。

# Task
阅读提供的参考文档，生成 **5-8 个** 测试问题。

# Requirements
1.  **覆盖度强制**: 输出必须尽可能覆盖 A、B、C、D 四种类型。如果文档内容不足以生成 C 或 D 类，请尝试基于文档逻辑挖掘最接近的问题。
2.  **拟人化**: 问题必须模拟真实用户的提问口吻，不要过于书面化。
3.  **自证**: 对每个生成的问题，必须标注其所属类型，并简述“解题路径”。

# Input Data (参考文档)
{{document_content}}

# Output Format
请严格按以下 JSON 格式输出：
[
  {
    &quot;question&quot;: &quot;生成的问题文本&quot;,
    &quot;type&quot;: &quot;Type A / B / C / D&quot;,
    &quot;reasoning&quot;: &quot;简述为什么属于这个类型（例如：需要结合第1段和第5段的内容）&quot;,
    &quot;source_clue&quot;: &quot;答案对应的关键词或原文片段&quot;
  },
  ...
]  
</code></pre>
<h3>黄金集构建_生成标准答案Prompt</h3>
<pre><code> # Role
你是一位 ComfyUI 领域的资深技术专家，擅长将碎片化的技术文档融合成逻辑严密、通俗易懂的教程答案。

# Input Data
## 1. 用户问题 (User Question):
{用户问题}

## 2. 预提取的核心主题 (Pre-extracted Themes):
{你预处理好的主题列表}
*(注：这些主题仅作为你的“导航线索”，帮助你组织逻辑。)*

## 3. 参考资料 (Raw Contexts):
{粘贴 gt_contexts 对应的原始文本}
*(注：这是你生成答案的唯一事实来源。)*

# Task Instructions
请执行以下 **“有机融合” (Organic Fusion)** 的生成过程：

## Step 1: 语义映射与结构规划 (Internal Thought)
* **审查主题**：查看预提取的“核心主题”，在“参考资料”中寻找对应的事实细节。
* **过滤空洞**：如果某个主题在参考资料中没有实质性内容支撑，请果断**舍弃**该主题，或将其**合并**到其他点中。**不要为了凑骨架而强行描写。**
* **构建逻辑流**：根据资料的丰富程度，动态调整回答的结构（是先讲原理，还是先讲操作？是对比叙述，还是分步叙述？）。

## Step 2: 融合生成 (Synthesis Generation)
基于 Step 1 的规划，撰写最终的标准答案。
* **有机串联**：不要机械地按“主题1、主题2”罗列。请使用过渡句，将各个知识点串联成一篇连贯的短文。
* **事实查核**：确保所有引用的参数、名称、逻辑都严格源自“参考资料”。
* **风格要求**：保持“专家教学”的口吻，清晰、丝滑、有见地。

# Output
请直接输出 **最终的标准答案** (Markdown格式)。
*(不需要输出 Step 1 的思考过程，直接给我结果)*
</code></pre>
<h3>黄金集构建_标准答案审核Prompt</h3>
<pre><code># Role
你是一位严格的内容审计员。你的任务是检查一份由 AI 生成的“标准答案”是否合格。

# Input Data
## 1. 用户问题:**
{粘贴你的问题}

## 2. 原始参考资料 (Ground Truth Contexts):**
{粘贴你标记的contexts原文}

## 3. 待审核的答案 (Generated Answer):**
{粘贴标准答案}

# Audit Criteria (审核标准)
请检查“待审核的答案”是否满足以下条件：
1. **忠实性 (关键)**：答案中的所有事实是否都能在“参考资料”中找到依据？是否存在幻觉（编造资料中没有的信息）？
2. **完整性**：是否回答了“用户问题”的核心痛点？
3. **准确性**：是否存在逻辑错误或误导性描述？

# Output
请简要输出：
- **结果**：【通过】 或 【需修改】
- **理由**：(如果需修改，请指出具体哪一句话有问题)
</code></pre>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/">Rag Agent，迭代史（五）：量化评估体系——从“感觉还行”到“数据说话”</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%94%ef%bc%89%ef%bc%9a%e9%87%8f%e5%8c%96%e8%af%84%e4%bc%b0%e4%bd%93%e7%b3%bb-%e4%bb%8e%e6%84%9f%e8%a7%89%e8%bf%98/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Blog，分层解耦式知识生产工作流</title>
		<link>https://0to60.top/layered-decoupled-knowledge-workflow/</link>
					<comments>https://0to60.top/layered-decoupled-knowledge-workflow/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 26 Nov 2025 05:14:33 +0000</pubDate>
				<category><![CDATA[blog旅途]]></category>
		<guid isPermaLink="false">https://0to60.top/2025/11/26/blog%ef%bc%8c%e8%a7%a3%e8%80%a6%e5%86%99%e4%bd%9c%e5%92%8c%e5%8f%91%e5%b8%83/</guid>

					<description><![CDATA[<p>详解如何构建基于Obsidian、GitHub、PicGo和WordPress的分层解耦内容生产工作流。解决博客多平台发布时的排版兼容痛点，实现Markdown原稿的原子化管理、图床自动化配置及内容的一键同步分发。</p>
<p><a rel="nofollow" href="https://0to60.top/layered-decoupled-knowledge-workflow/">Blog，分层解耦式知识生产工作流</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h2>引言</h2>
<p>随着WordPress内容增多，产生了多平台分发的需求，但原生WP编辑器的兼容性差（图片、排版），导致每次跨平台发布都需频繁调整格式，耗时费力。核心痛点在于：</p>
<blockquote>
<p>如何实现一次写作，多平台格式兼容与统一图片资源引用？</p>
</blockquote>
<p>基于以上痛点，本文将详细介绍<strong>分层解耦式的内容生产工作流</strong>，旨在通过<strong>Markdown纯文本</strong>和<strong>公有图床</strong>实现内容的统一管理与高效分发。内容涵盖：</p>
<ul>
<li>内容生产工作流介绍</li>
<li>内容资源托管层（GitHub）</li>
<li>写作层（Obsidian）</li>
<li>发布层（PicGo/COS）及WordPress同步实操。</li>
</ul>
<h2>1. 内容生产工作流介绍</h2>
<p><img decoding="async" src="https://img.0to60.top/0260blog/blog%E5%B7%A5%E4%BD%9C%E6%B5%81%E5%9B%BE%E7%A4%BA.png" alt="blog工作流图示|obsidian|wordpress|内容生产工作流|解耦|图床|picgo300"><br />
<strong>工作流框架介绍</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">模块</th>
<th style="text-align:left">介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">内容资产托管层</td>
<td style="text-align:left">核心任务：原稿与素材的完整备份与多端同步。<br />工具实例：GitHub，iCloud Drive, OneDrive, Obsidian Sync, 或私有仓库<br />关键点：核心目标是确保Markdown源文件与媒体附件等原始资产的长期可用，并支持历史版本追溯。</td>
</tr>
<tr>
<td style="text-align:left">写作层</td>
<td style="text-align:left">核心任务： 专注于内容创作，采用纯净标准Markdown格式。<br />工具实例： Obsidian (作者选择), Typora.<br />关键点： 极度克制。严格遵循标准Markdown语法，摒弃任何平台特定的或扩展的格式（如：WikiLink），这是实现跨平台兼容性的根本。</td>
</tr>
<tr>
<td style="text-align:left">发布层</td>
<td style="text-align:left">核心任务：格式适配、资源（图片）公有化与内容同步。<br />包含组件：<br />1. 副本（发布车间）：基于原稿创建副本，后续所有加工操作都在副本上进行。<br />2. 公有图床服务（腾讯COS等）及同步工具（PicGo）<br />3. 渲染同步工具： 将文章内容自动转换格式并同步到内容平台，如：WordPress 插件， Doocs 编辑器，脚本。<br />4. 特殊发布流：部分内容平台因其限制，无相关工具，需要手动进行加工操作。<br />执行逻辑：<br />&#8211; 基于原稿副本，将本地图片替换为图床公有URL，再通过同步工具适配目标平台。</td>
</tr>
<tr>
<td style="text-align:left">内容平台</td>
<td style="text-align:left">核心任务： 面向读者的最终渲染与呈现。<br />工具实例： WordPress、微信公众号、知乎等。<br />关键点： 平台仅为发布和预览终端。内容的任何修改（包括错别字）应遵循单向流动原则，从写作层发起，重新走发布流，确保源文件的一致性。</td>
</tr>
</tbody>
</table>
<h2>2. 内容资产托管层实操指引（GitHub）</h2>
<p>本次实操指引主要采用GitHub</p>
<h3>2.1 GitHub介绍</h3>
<h3>2.2 GitHub快速配置指南</h3>
<p><strong>第一步：</strong> 注册登录GitHub</p>
<table>
<thead>
<tr>
<th><a href="https://github.com/" target="_blank" rel="noopener">进入官网</a></th>
<th>注册/登录GitHub</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/github%E5%AE%98%E7%BD%91.png" alt="github官网300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/github%E6%B3%A8%E5%86%8C%E7%99%BB%E5%BD%95.png" alt="github注册登录300"></td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> 新建仓库</p>
<table>
<thead>
<tr>
<th>进入仓库</th>
<th>点击新建</th>
<th>填写仓库信息</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/github%E4%BB%93%E5%BA%93%E5%85%A5%E5%8F%A3.png" alt="github仓库入口300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/github%E4%BB%93%E5%BA%93%E6%96%B0%E5%BB%BA%E5%85%A5%E5%8F%A3.png" alt="github仓库新建入口300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/github%E6%96%B0%E5%BB%BA%E5%AE%8C%E5%96%84%E4%BB%93%E5%BA%93%E4%BF%A1%E6%81%AF.png" alt="github新建完善仓库信息300"></td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> <a href="https://desktop.github.com/download/" target="_blank" rel="noopener">下载github desktop</a></p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/ghdesktop%E4%B8%8B%E8%BD%BD%E9%A1%B5%E9%9D%A2.png" alt="ghdesktop下载页面300"></p>
<p><strong>第四步：</strong> 打开github desktop，登录GitHub账号，克隆之前创建的仓库并和本地文件夹绑定</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/ghdesktop%E7%95%8C%E9%9D%A21.png" alt="ghdesktop界面1300"></p>
<p>至此，使用GitHub Desktop克隆仓库至本地文件夹，在指定文件夹中增删改查后，实现本地文件与远程仓库的快速<code>commit</code>和<code>push</code>同步。</p>
<p>如需更高级的版本管理操作，可查阅Git官方文档或在AI辅助下学习相关命令。</p>
<h2>3. 写作层实操指引（Obsidian）</h2>
<h3>3.1 Obsidian介绍</h3>
<p>Obsidian 是一款<strong>本地优先</strong>的知识管理和笔记软件。它基于纯文本 Markdown 文件格式存储数据，利用本地文件夹结构（称为“库”）来组织笔记。</p>
<p><strong>核心特性：</strong></p>
<ul>
<li>Markdown 原生：** 所有笔记都是标准的 Markdown 文件，这确保了极高的<strong>可移植性</strong>和<strong>长期可用性</strong>。</li>
<li><strong>双向链接：</strong> 允许用户在笔记间建立联系，并可视化这些关系（如通过<strong>关系图谱 View</strong>），帮助用户构建一个相互连接的知识网络。</li>
<li><strong>高度可定制：</strong> 通过丰富的<strong>插件系统</strong>和<strong>主题</strong>，用户可以根据需求将 Obsidian 配置成强大的写作工具、知识库或项目管理系统。</li>
</ul>
<h3>3.2 Obsidian简易指引</h3>
<p><strong>第一步：</strong> <a href="https://obsidian.md/" target="_blank" rel="noopener">下载安装Obsidian</a></p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E4%B8%8B%E8%BD%BD%E9%A1%B5%E9%9D%A2.png" alt="Obsidian下载页面300"></p>
<p><strong>第二步：</strong> Obsidian设置</p>
<p>按下图设置即可，由于在写作层中咱们要遵循markdown格式，需配置以下信息</p>
<ul>
<li>链接路径应选择相对路径</li>
<li>链接禁止使用WikiLink方式，否则在拖拽或粘贴时会默认为WikiLink格式</li>
<li>建议将所有的媒体文件都单独放到一个文件夹中，比如下图中的_assets。<br />
<img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E6%8E%A8%E8%8D%90%E8%AE%BE%E7%BD%AE.png" alt="Obsidian推荐设置300"></li>
</ul>
<p><strong>第三步：</strong> 媒体链接格式确认</p>
<p>确保链接格式的兼容性，写作层要求严格的Markdown。</p>
<p>Obsidian插件LinkConverter用于批量将已有的WikiLink格式转换为Markdown格式，</p>
<p><strong>（可选项）LinkConverter插件安装</strong></p>
<table>
<thead>
<tr>
<th>进入obsidian插件市场</th>
<th>安装启用LinkConverter插件</th>
<th>插件设置(相对路径)</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E8%BF%9B%E5%85%A5%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA.png" alt="Obsidian进入插件市场300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E5%AE%89%E8%A3%85%E5%90%AF%E7%94%A8linkconverter%E6%8F%92%E4%BB%B6.png" alt="安装启用linkconverter插件300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/linkconverter%E8%AE%BE%E7%BD%AE.png" alt="linkconverter设置300"></td>
</tr>
</tbody>
</table>
<p><strong>LinkConverter使用</strong></p>
<p>右键note，可以直接进行批量替换，如下图：<br />
<img decoding="async" src="https://img.0to60.top/0260blog/linkconverter%E4%BD%BF%E7%94%A8.png" alt="linkconverter使用300"></p>
<p>tips：若文章需要被知识库引用，建议给所有的图片链接加上ALT属性，默认为唵，可以利用linkconverter先全部转为WikiLink，再全部转为markdown链接，会自动添加ALT属性。</p>
<blockquote>
[!NOTE]
<p>至此，便可以用Obsidian专注于写作。</p>
<p>重要的事情说三遍：<br />
写作层要极度克制，克制是平台兼容的前提，遵循标准Markdown格式。<br />
写作层要极度克制，克制是平台兼容的前提，遵循标准Markdown格式。<br />
写作层要极度克制，克制是平台兼容的前提，遵循标准Markdown格式。</p>
</blockquote>
<h2>4. 发布层实操指引</h2>
<h3>4.1 创建原稿副本</h3>
<p>发布层的任何操作都不建议在原稿中进行。</p>
<ul>
<li>建立一个文件夹，用作于发布车间</li>
<li>对原稿进行副本创建，并将副本放入发布车间文件夹中(如下图)<br />
<img decoding="async" src="https://img.0to60.top/0260blog/%E5%88%9B%E5%BB%BA%E5%8F%91%E5%B8%83%E8%BD%A6%E9%97%B4.png" alt="创建发布车间300"></li>
</ul>
<h3>4.2 图床实操指引</h3>
<h4>4.2.1 存储服务购买及设置</h4>
<p>作者目前使用存储服务为：腾讯COS<br />
<strong>大致介绍</strong><br />
主要作用：将本地存储的媒体文件上传到云端存储服务器中，再通过公网进行图片访问。<br />
<strong>执行步骤</strong><br />
<strong>第一步：</strong>  <a href="https://curl.qcloud.com/Si91bLRy" target="_blank" rel="noopener">点击前往腾讯COS官网</a>购买COS资源包</p>
<table>
<thead>
<tr>
<th>前往腾讯COS官网_优惠界面</th>
<th>尝试：购买一个最便宜的资源包</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91COS%E5%AE%98%E7%BD%91.png" alt="腾讯云COS官网300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91COS%E4%BC%98%E6%83%A0%E8%B5%84%E6%BA%90%E5%8C%85%E9%A1%B5%E9%9D%A2.png" alt="腾讯云COS优惠资源包页面300"></td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> 进入COS管理后台</p>
<table>
<thead>
<tr>
<th>进入腾讯云控制台</th>
<th>搜索COS或存储服务</th>
<th>进入COS管理后台</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E5%85%A5%E5%8F%A3.png" alt="腾讯云控制台入口300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E6%90%9C%E7%B4%A2COS.png" alt="腾讯云搜索COS300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91COS%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0.png" alt="腾讯云COS管理后台300"></td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> 创建存储桶</p>
<p>不用过多在意计费环节，第一次使用时若担心计费问题，就将所有计费选项都关闭。</p>
<table>
<thead>
<tr>
<th>创建存储桶1</th>
<th>创建存储桶2</th>
<th>创建存储桶3</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AFCOS%E5%88%9B%E5%BB%BA%E5%AD%98%E5%82%A8%E6%A1%B61.png" alt="腾讯COS创建存储桶1300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AFCOS%E5%88%9B%E5%BB%BA%E5%AD%98%E5%82%A8%E6%A1%B62.png" alt="腾讯COS创建存储桶2300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AFCOS%E5%88%9B%E5%BB%BA%E5%AD%98%E5%82%A8%E6%A1%B63.png" alt="腾讯COS创建存储桶3300"></td>
</tr>
<tr>
<td>注意：权限选择公有读私有写</td>
<td>标签输入即可</td>
<td>确认配置信息</td>
</tr>
</tbody>
</table>
<p><strong>（可选项）第四步：</strong> 存储桶其他配置<br />
主要是域名设置和跨域访问设置</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AFCOS%E5%AD%98%E5%82%A8%E6%A1%B6%E5%85%B6%E4%BB%96%E8%AE%BE%E7%BD%AE.png" alt="腾讯COS存储桶其他设置300"></p>
<p><strong>第五步：</strong> API密钥配置-新建子账户&amp;授权</p>
<table>
<thead>
<tr>
<th>后台搜索API密钥</th>
<th>建议建一个子账号</th>
<th>授权配置</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91API%E5%AF%86%E9%92%A5%E5%85%A5%E5%8F%A3.png" alt="腾讯云API密钥入口300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E5%AD%90%E8%B4%A6%E6%88%B7%E6%8E%88%E6%9D%83%E6%8F%90%E7%A4%BA.png" alt="腾讯云子账户授权提示300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E6%96%B0%E5%BB%BA%E5%AD%90%E8%B4%A6%E6%88%B7%E5%92%8C%E6%8E%88%E6%9D%83.png" alt="腾讯云新建子账户和授权300"></td>
</tr>
</tbody>
</table>
<p>访问方式选择编程访问，授权范围选择COSFULLACCESS</p>
<p><strong>第六步</strong>：API密钥获取</p>
<table>
<thead>
<tr>
<th>选择授权的账户</th>
<th>新建API密钥并保存</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E8%BF%9B%E5%85%A5%E5%AD%90%E8%B4%A6%E6%88%B7.png" alt="腾讯云进入子账户300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%85%BE%E8%AE%AF%E4%BA%91%E5%AD%90%E8%B4%A6%E6%88%B7%E6%96%B0%E5%BB%BAAPI%E5%AF%86%E9%92%A5.png" alt="腾讯云子账户新建API密钥300"></td>
</tr>
</tbody>
</table>
<blockquote>
[!NOTE]
<p>至此，图床服务搭建完毕，用户可直接在存储桶文件列表中手动操作，也可通过API进行编程交互。如果不懂如何通过API进行访问，不着急，介绍一款应用：Picgo，该应用已将API封装，方便将媒体文件与图床服务进行交互。</p>
</blockquote>
<h4>4.2.2 Picgo应用介绍及设置</h4>
<p><strong>介绍及下载链接</strong></p>
<ul>
<li>PicGo 是一款开源的、跨平台的桌面应用程序，它的核心功能是快速地将图片上传到图床（图片存储服务器）并自动获取图片的在线链接。</li>
<li><a href="https://github.com/Molunerfinn/PicGo/releases" target="_blank" rel="noopener">下载Picgo</a></li>
</ul>
<p><strong>它能解决什么问题？</strong></p>
<ul>
<li>传统方式插入图片的流程是: 截图 -&gt; 保存到本地 -&gt; 打开图床网站 -&gt; 登录 -&gt; 上传 -&gt; 复制链接 -&gt; 插入到文档。这个过程非常繁琐。</li>
<li>使用 PicGo 后，流程简化为：截图 -&gt; [快捷键上传] -&gt; 链接已自动复制到剪贴板 -&gt; 直接粘贴到文档。</li>
</ul>
<p><strong>核心优势：</strong></p>
<ul>
<li>高效快捷：支持拖拽上传、剪贴板上传，并配合快捷键，真正做到“一步到位”。</li>
<li>多图床支持：支持包括 GitHub、SM.MS、阿里云OSS、腾讯云COS、七牛云、Imgur等在内的多种图床。</li>
<li>链接格式丰富：上传后可自动生成 URL链接、Markdown格式、HTML格式等，满足不同场景需求。</li>
<li>跨平台：支持 Windows、macOS 和 Linux。</li>
<li>插件系统：通过安装插件，可以扩展更多功能（如：图片压缩、水印、上传前重命名等）。</li>
</ul>
<p><strong>Picgo设置</strong><br />
打开picgo应用，选择腾讯云COS，进行设置，如图：<br />
<img decoding="async" src="https://img.0to60.top/0260blog/Picgo%E8%85%BE%E8%AE%AF%E4%BA%91COS%E9%85%8D%E7%BD%AE.png" alt="Picgo腾讯云COS配置300"></p>
<p>配置详情：</p>
<table>
<thead>
<tr>
<th>配置项</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>图床配置名</td>
<td>随意</td>
</tr>
<tr>
<td>COS版本</td>
<td>到本文发布时间为V5，可以直接问智能售后</td>
</tr>
<tr>
<td>SecreId</td>
<td>4.2.1中获取的密钥信息</td>
</tr>
<tr>
<td>SecretKey</td>
<td>4.2.1中获取的密钥信息</td>
</tr>
<tr>
<td>设定存储路径</td>
<td>存储桶的具体某个文件夹</td>
</tr>
<tr>
<td>其他必要参数如右图</td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/picgo%E8%85%BE%E8%AE%AF%E4%BA%91COS%E9%85%8D%E7%BD%AE_%E5%85%B7%E4%BD%93%E5%8F%82%E6%95%B0%E5%9B%BE%E7%A4%BA.png" alt="picgo腾讯云COS配置_具体参数图示300"></td>
</tr>
</tbody>
</table>
<p><strong>Picgo试用</strong></p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/picgo%E8%85%BE%E8%AE%AF%E4%BA%91COS%E8%AF%95%E7%94%A8%E7%BB%93%E6%9E%9C.png" alt="picgo腾讯云COS试用结果300"></p>
<blockquote>
[!NOTE]
<p>至此，便可以用Picgo高效地和图床服务进行交互，记得选Markdown链接格式。</p>
</blockquote>
<h4>4.2.3 媒体链接公有化</h4>
<p>在4.2.1和4.2.2中，我们不仅有了云端图床服务，也具备了和图床服务交互的能力，接下来，便是对原稿副本进行媒体链接进行处理，简单来说：</p>
<blockquote>
<p>将原稿副本中的媒体文件上传到图床服务中，生成公有URL后替换，达到跨平台展示的目的。</p>
</blockquote>
<p>我们使用Obsidian插件 Image Auto Upload 配合 PicGo/COS 实现。</p>
<p><strong>（必须） 插件_Image Auto Upload快速指南</strong></p>
<p><strong>第一步：</strong> Obsidian安装插件Image Auto Upload</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/%E5%AE%89%E8%A3%85%E5%90%AF%E7%94%A8%E6%8F%92%E4%BB%B6img%E8%87%AA%E5%8A%A8%E4%B8%8A%E4%BC%A0.png" alt="安装启用插件img自动上传300"></p>
<p><strong>第二步：</strong>  Image Auto Upload设置</p>
<p>照着设置即可，强烈建议将自动上传和上传后删除关闭，我们只在发布时才进行链接替换，写作时使用文件本地路径。<br />
<img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E5%9B%BE%E7%89%87%E8%87%AA%E5%8A%A8%E4%B8%8A%E4%BC%A0%E6%8F%92%E4%BB%B6%E8%AE%BE%E7%BD%AE.png" alt="Obsidian图片自动上传插件设置300"></p>
<p><strong>第三步：</strong> 在原稿副本中进行链接替换</p>
<table>
<thead>
<tr>
<th>单媒体文件上传</th>
<th>文档所有文档上传CTRL+P</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E6%8F%92%E4%BB%B6%E5%8D%95%E5%9B%BE%E7%89%87%E8%87%AA%E5%8A%A8%E4%B8%8A%E4%BC%A0.png" alt="Obsidian插件单图片自动上传300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/Obsidian%E6%8F%92%E4%BB%B6%E6%96%87%E7%AB%A0%E6%89%80%E6%9C%89%E5%AA%92%E4%BD%93%E9%99%84%E4%BB%B6%E4%B8%8A%E4%BC%A0.png" alt="Obsidian插件文章所有媒体附件上传300"></td>
</tr>
</tbody>
</table>
<blockquote>
[!NOTE]
<p>至此，原稿副本的媒体文件链接便处理完成，你可以在Picgo中查看，也可以在图床服务中查看。</p>
</blockquote>
<h3>4.3 <strong>内容渲染与同步（WordPress为例）</strong></h3>
<p>介绍如何使用Obsidian插件： WordPress。</p>
<h4>4.3.1 安装发布到wordpress的插件</h4>
<table>
<thead>
<tr>
<th>安装插件wordpress并启用</th>
<th>插件设置</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E5%AE%89%E8%A3%85obsidian_wp%E6%8F%92%E4%BB%B6.png" alt="安装obsidian_wp插件300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/obsidian_wp%E6%8F%92%E4%BB%B6%E5%88%9D%E5%A7%8B%E5%8C%96%E8%AE%BE%E7%BD%AE.png" alt="obsidian_wp插件初始化设置300"></td>
</tr>
</tbody>
</table>
<h4>4.3.2 获取WordPress的密钥</h4>
<p>登录WordPress站点后台，安装插件orange mini api<br />
按下图所示一直往下点，获得账号和密码</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/wordpress%E5%90%8E%E5%8F%B0%E6%8F%92%E4%BB%B6API%E5%AE%89%E8%A3%85.png" alt="wordpress后台插件API安装300"></p>
<p><strong>4.3.3 发布操作</strong></p>
<table>
<thead>
<tr>
<th>配置API用户信息(XML-RPC TYPE)</th>
<th>配置yaml信息</th>
<th>发布到worpress(CTRL+P)</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E9%85%8D%E7%BD%AEobsidian%E6%8F%92%E4%BB%B6WP_API%E7%94%A8%E6%88%B7%E4%BF%A1%E6%81%AF.png" alt="配置obsidian插件WP_API用户信息300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E9%85%8D%E7%BD%AE%E6%96%87%E7%AB%A0YAML%E4%BF%A1%E6%81%AF.png" alt="配置文章YAML信息300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E6%96%87%E7%AB%A0%E5%90%8C%E6%AD%A5%E8%87%B3WP.png" alt="文章同步至WP300"></td>
</tr>
</tbody>
</table>
<blockquote>
[!NOTE]
<p>至此，发布层的内容全部结束</p>
</blockquote>
<h2>5. 总结</h2>
<p>本文提出了一种解耦式写作工作流，旨在解决多平台分发时，因平台排版和图片兼容性差异导致的格式调整繁琐、耗时长的问题。该方案的核心理念是将内容创作（写作层）与格式适配/资源公有化（发布层）彻底分离，确保内容源头的单向流动性和原子级一致性。</p>
<p><a rel="nofollow" href="https://0to60.top/layered-decoupled-knowledge-workflow/">Blog，分层解耦式知识生产工作流</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/layered-decoupled-knowledge-workflow/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Rag Agent，迭代史（四）</title>
		<link>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/</link>
					<comments>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Mon, 24 Nov 2025 10:14:00 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/2025/11/24/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/</guid>

					<description><![CDATA[<p>1. V4版本内容 在《Rag Ag&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/">Rag Agent，迭代史（四）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h2>1. V4版本内容</h2>
<p>在《Rag Agent，迭代史（三）》_V3版本的基础上为召回上下文<strong>增加topic(主题描述)元数据</strong>，即：通过对Chunk进行主题预抽取的方式，得到主题列表”，LLM基于主题列表先进行大纲制作再参考上下文进行回答，以此降低割裂感。<br />
<img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E7%89%88%E6%9C%AC%E6%A1%86%E6%9E%B6%E5%9B%BE.png" alt="rag迭代史_V4版本框架图300"></p>
<blockquote>
[!NOTE]
<p>coze自带的知识库将作为简化的向量数据库，本版本及以后，知识库仅作为语义检索使用。</p>
</blockquote>
<h2>2. 执行步骤</h2>
<p><strong>第一步：</strong> 设计document表 → 设计chunks表 → 准备向量数据库(coze知识库)</p>
<table>
<thead>
<tr>
<th style="text-align:left">设计document表</th>
<th style="text-align:left">设计chunks表</th>
<th style="text-align:left">准备向量数据库(coze知识库)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4document%E8%A1%A8%E7%BB%93%E6%9E%84.png" alt="rag迭代史_V4document表结构300"></td>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4chunks%E8%A1%A8%E7%BB%93%E6%9E%84.png" alt="rag迭代史_V4chunks表结构300"></td>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E8%A1%A8%E6%A0%BC%E7%9F%A5%E8%AF%86%E5%BA%93%E8%A1%A8%E7%BB%93%E6%9E%84_%E5%90%91%E9%87%8F%E6%95%B0%E6%8D%AE%E5%BA%93.png" alt="rag迭代史_V4表格知识库表结构_向量数据库300"></td>
</tr>
<tr>
<td style="text-align:left">用于记录文章原始内容、重构化的内容及其元数据</td>
<td style="text-align:left">文章语义分段后，将父层级单元（上下文）存入chunks表，并记录相应的元数据</td>
<td style="text-align:left">用coze自带的表格类型知识库近似替代，文章语义分段后，将子层级单元（索引）存入该库，并记录元数据，此版本的元数据主要是指document_id和chunk_id，指向文章和chunks（上下文）。</td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> 文章内容迁移 → 导入chunks内容 → 导入index向量索引表内容</p>
<table>
<thead>
<tr>
<th style="text-align:left">文章内容导入</th>
<th style="text-align:left">导入chunks内容</th>
<th style="text-align:left">导入index向量索引表内容</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E6%96%87%E7%AB%A0%E5%86%85%E5%AE%B9%E5%AF%BC%E5%85%A5%E5%88%B0document%E8%A1%A8.png" alt="rag迭代史_V4文章内容导入到document表300"></td>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E5%AF%BC%E5%85%A5chunks%E5%86%85%E5%AE%B9.png" alt="rag迭代史_V4导入chunks内容300"></td>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E5%AF%BC%E5%85%A5index%E5%90%91%E9%87%8F%E7%B4%A2%E5%BC%95%E8%A1%A8%E5%86%85%E5%AE%B9.png" alt="rag迭代史_V4导入index向量索引表内容300"></td>
</tr>
<tr>
<td style="text-align:left">将V3的文章内容导入到文章document表</td>
<td style="text-align:left">即新增父层级单元内容，其会被作为上下文召回给到LLM</td>
<td style="text-align:left">即新增子层级单元内容，其将会被作为向量检索的索引</td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> 遍历提取每一段chunk的自由主题信息 → 主题归一化处理</p>
<table>
<thead>
<tr>
<th>遍历提取chunk的自由主题信息</th>
<th>主题归一化</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E6%8F%90%E5%8F%96chunk%E8%87%AA%E7%94%B1%E4%B8%BB%E9%A2%98%E5%B7%A5%E4%BD%9C%E6%B5%81.png" alt="rag迭代史_V4提取chunk自由主题工作流300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E8%87%AA%E7%94%B1%E4%B8%BB%E9%A2%98%E5%BD%92%E4%B8%80%E5%8C%96.png" alt="rag迭代史_V4自由主题归一化300"></td>
</tr>
<tr>
<td>先对每一段chunk进行自由主题信息的提取</td>
<td>基于提取的自由主题，进行归一化处理</td>
</tr>
</tbody>
</table>
<p><strong>第四步：</strong> 创建工作流-知识库检索 且 获取chunks（上下文）及其元数据(主题信息)<br />
<img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E7%9F%A5%E8%AF%86%E5%BA%93%E6%A3%80%E7%B4%A2%E8%8E%B7%E5%8F%96%E4%B8%8A%E4%B8%8B%E6%96%87%E5%8F%8A%E4%B8%BB%E9%A2%98%E4%BF%A1%E6%81%AF%E5%B7%A5%E4%BD%9C%E6%B5%81.png" alt="rag迭代史_V4知识库检索获取上下文及主题信息工作流300"><br />
<em>检索召回工作流图：知识库检索→获取chunks（上下文）及其元数据(主题信息)</em></p>
<p><strong>第五步：</strong> Agent设置，提示词和工作流配置<br />
<img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4agent%E8%AE%BE%E7%BD%AE.png" alt="rag迭代史_V4agent设置300"><br />
<em>Agent设置：提示词和工作流配置</em></p>
<p><strong>第六步：</strong> 预览调试</p>
<table>
<thead>
<tr>
<th>预览调试1：纯文</th>
<th>预览调试2：回答带图</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E9%A2%84%E8%A7%88%E8%B0%83%E8%AF%95_%E7%BA%AF%E6%96%87.png" alt="rag迭代史_V4预览调试_纯文300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E9%A2%84%E8%A7%88%E8%B0%83%E8%AF%95_%E5%9B%9E%E7%AD%94%E5%B8%A6%E5%9B%BE.png" alt="rag迭代史_V4预览调试_回答带图300"></td>
</tr>
</tbody>
</table>
<h2>3 评估&amp;问题分析</h2>
<h3>3.1 评估结论</h3>
<p><strong>核心功能已达预期：</strong></p>
<p>基于上下文的“动态大纲生成”策略（先生成大纲，后生成内容）效果显著。它为LLM提供了清晰的生成脚手架，极大降低了回答内容的逻辑跳跃和“割裂感”，提升了阅读体验。</p>
<p><strong>次要发现：</strong></p>
<p>直接使用LLM生成的“自由主题”比“归一化主题”在生成大纲时表现更好。</p>
<ul>
<li>自由主题包含的语义更为丰富。</li>
<li>个人认为归一化的主题信息适用于两个方向：1）一些严谨的领域不需要创意，比如法律、医疗等领域，可以使用归一化的主题生成大纲。2）归一化的主题信息可作为逻辑筛选条件，为程序处理提供便利。</li>
</ul>
<h3>3.2 关键问题</h3>
<p>在评估中发现了一个比“答案结构”更底层的问题： <strong>召回内容不准确或不全面。</strong></p>
<p>具体表现为：系统经常召回与查询词高度相似的“干扰项”，反而过滤掉了措辞不同但包含正确答案的文档。</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3%E5%8F%B2_V4%E5%8F%AC%E5%9B%9E%E5%86%85%E5%AE%B9%E4%B8%8D%E5%85%A8%E6%88%96%E4%B8%8D%E5%87%86.png" alt="rag迭代史_V4召回内容不全或不准300"><br />
<em>召回内容不准或不全</em></p>
<p><em>问题分析内容由AI生成</em></p>
<h4>3.2.1 原因：相关性陷阱</h4>
<p>你遇到的不是简单的数量问题，而是一个更深层、更棘手的“相关性陷阱” (Relevance Trap) 问题。这是所有RAG系统都会遇到的最经典、最痛苦的问题之一。</p>
<p><strong>问题的核心是：向量相似度高的，不等于对用户最有用的。</strong></p>
<p>系统召回了它认为“语义上最像”的内容，但这些内容可能是“正确的废话”或者“看似相关但答非所问”的干扰项，反而把那个措辞不同但<strong>真正能解决问题的答案</strong>给挤掉了。</p>
<hr>
<p><strong>为什么会掉入“相关性陷阱”？</strong></p>
<p>让我们来诊断一下，为什么一个“特别像”的错误答案，其相似度得分会高于一个“不那么像”的正确答案。</p>
<ol>
<li><strong>“表面文本”的胜利 (Surface-level Textual Similarity)</strong>
<ul>
<li><strong>场景</strong>：用户问：“如何安装<code>ComfyUI-Manager</code>？”</li>
<li><strong>陷阱</strong>：知识库里有一篇写得很好的<strong>通用教程</strong>，标题是“新手必看：如何安装任何自定义节点”，里面用了大量“安装”、“节点”、“文件夹”等词汇。它的用词和用户的提问高度重合。</li>
<li><strong>被过滤掉的正确答案</strong>：另一篇专门讲<code>ComfyUI-Manager</code>的文档，可能标题是“Manager节点的进阶用法与故障排查”，它可能花了很多篇幅讲如何更新、解决冲突，只有一小部分讲安装。</li>
<li><strong>结果</strong>：对于Embedding模型来说，那个通用的、表面文字更匹配的教程，其向量相似度得分可能高达<code>0.92</code>，而真正有用的那篇，得分可能只有<code>0.88</code>。如果你设置了<code>top_k=1</code>或者阈值卡得很高，正确答案就被无情地过滤掉了。</li>
</ul>
</li>
<li><strong>通用模型的“领域知识盲点” (Domain Knowledge Blind Spot)</strong>
<ul>
<li>通用的Embedding模型是在海量互联网数据上训练的。它知道“安装”和“节点”是相关的，但它<strong>并不知道</strong><code>ComfyUI-Manager</code>是一个<strong>极其特殊且重要的实体</strong>。它无法像你一样，给这个特定的名词赋予更高的权重。它只是把它当作一个普通的、由几个字母组成的词。</li>
</ul>
</li>
</ol>
<h2>4. 改进方向</h2>
<p>既然问题的本质是向量检索的内在缺陷（即“相关性陷阱”），那么改进必须围绕“提升召回的精准度”和“丰富召回的维度”来展开。</p>
<h3>4.1方向一：优化Embedding策略</h3>
<p>换模型，换向量维度。</p>
<ul>
<li><strong>换模型：</strong> 尝试更换为针对特定领域精调过的Embedding模型。</li>
<li><strong>换维度：</strong> 调整向量维度，寻找更适合当前数据量和复杂度的表征空间。</li>
</ul>
<h3>4.2 方向二：提高召回率</h3>
<p>此为“兜底”策略。承认第一阶段检索的局限性，通过扩大召回数量来保留正确答案进入下一阶段的机会。</p>
<ul>
<li><strong>扩大Top-K：</strong> 在Rerank（重排序）机制之前，将初步检索的top_k从（例如）3提升到15。</li>
<li><strong>目标：</strong> 确保“不那么像但正确”的答案能有机会进入Rerank阶段，用更精细的Rerank模型将其打捞上来。</li>
</ul>
<h3>4.3 方向三：查询改写</h3>
<p>既然知识库与用户查询（Query）的表述存在“鸿沟”，那么可以尝试改写Query来匹配知识库。</p>
<p><strong>具体操作：</strong> 利用LLM将用户的单个原始问题，扩展或转义为多个具有不同表述、不同侧重点的子问题，然后进行多路检索并合并结果。</p>
<h3>4.4 方向四：强化混合检索，引入NER</h3>
<p>向量检索既然存在内在缺陷（”相关性陷阱”），那就引入事实检索策略进行互补和强化。</p>
<ul>
<li><strong>问题：</strong> 传统的“关键词检索 + 向量检索”通常以“或”逻辑简单合并，虽然提升了召回率，但引入的关键词噪音反而可能拉低语义的精准度。</li>
<li><strong>方案升级：</strong> 引入<strong>NER</strong>作为高级的“事实检索”手段。</li>
</ul>
<p>可以这样理解NER，可以对关键词检索进行升级，为每个检索目标预提取关键词，这个关键词主要表式实体概念，而这些实体概念与其他实体概念又能建立某种关系，比如从属、因果、使用、同义等，让检索目标与检索目标间接产生关联关系。这样就能按照实体关键词精确找到检索目标，又能按照实体关系，找到相关检索内容，丰富召回的上下文。</p>
<p><strong>NER的核心价值</strong>（以下是AI回答内容）：</p>
<ol>
<li><strong>绝对精确性与歧义消除 (Precision &amp; Disambiguation)</strong>
<ul>
<li><strong>对比关键词：</strong> 关键词检索“model”会返回所有包含该字符串的文档。</li>
<li><strong>NER方案：</strong> NER在预处理时就能识别出不同语境下的“model”，并打上结构化标签（如 <code>entity: Checkpoint</code> 或 <code>entity: LoRA</code>）。在检索时，系统可以根据查询上下文（如“加载一个SD1.5的model”）执行<strong>基于实体的精确过滤</strong>，只召回与 <code>Checkpoint</code> 相关的文档，从根本上消除歧义。</li>
</ul>
</li>
<li><strong>赋能关系推理 (Relationship-based Reasoning)</strong>
<ul>
<li><strong>向量检索的局限：</strong> 面对“IPAdapter和ControlNet可以一起使用吗？”这类问题，向量检索最多只能找到同时包含这两个词的文档，但无法理解它们之间的<strong>关系</strong>（如是并联、串联还是冲突）。</li>
<li><strong>NER方案：</strong> 在预处理时，NER识别出 <code>IPAdapter</code> 和 <code>ControlNet</code> 为两个节点实体，而<strong>关系提取 (RE)</strong> 进一步识别出它们之间存在 <code>CONNECTS_TO</code>（连接）或 <code>CONFLICTS_WITH</code>（冲突）的关系。</li>
<li><strong>查询革命：</strong> 检索查询因此可以从“模糊的文本相似度搜索”升级为“精确的图数据库查询”：“<strong>请找到那些同时包含</strong> <code>**IPAdapter**</code> <strong>和</strong> <code>**ControlNet**</code> <strong>实体，并且这两个实体之间存在</strong> <code>**CONNECTS_TO**</code> <strong>关系的知识单元。</strong>”</li>
</ul>
</li>
</ol>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/">Rag Agent，迭代史（四）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e5%9b%9b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Rag Agent，迭代史（三）</title>
		<link>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/</link>
					<comments>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Mon, 24 Nov 2025 09:06:55 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/2025/11/24/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/</guid>

					<description><![CDATA[<p>1. V3版本内容 本版本基于《Ra&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/">Rag Agent，迭代史（三）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h2>1. V3版本内容</h2>
<p>本版本基于《Rag Agent，迭代史（二）》，暂时搁置“提炼要点→Q&amp;A Pairs转换”的路线，采用改进方向二：索引与上下文分离，即：</p>
<p>尝试文章内容父子层级切分，子级单元作为索引，父级单元内容作为召回的上下文。</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_V3%E7%89%88%E6%9C%AC%E6%A1%86%E6%9E%B6%E5%9B%BE.png" alt="rag迭代_V3版本框架图300"></p>
<blockquote>
[!NOTE]
<p>为快速实验效果，”索引+上下文分离”在coze中可以通过COZE的表格知识库近似实现，需将子级单元设为索引。</p>
</blockquote>
<h2>2. 执行步骤</h2>
<p><strong>第一步：</strong> 文章结构化处理→父子层级切分</p>
<table>
<thead>
<tr>
<th style="text-align:left">文章_结构化处理</th>
<th style="text-align:left">内容_父子层级切分</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_%E6%96%87%E7%AB%A0%E5%86%85%E5%AE%B9%E7%BB%93%E6%9E%84%E5%8C%96.png" alt="rag迭代_文章内容结构化300"></td>
<td style="text-align:left"><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_%E6%96%87%E7%AB%A0%E7%88%B6%E5%AD%90%E5%B1%82%E7%BA%A7%E6%8B%86%E5%88%86.png" alt="rag迭代_文章父子层级拆分300"></td>
</tr>
<tr>
<td style="text-align:left">将原文处理层Markdown格式，并符合3级标题模式，实验暂定格式。</td>
<td style="text-align:left">按三级标题的单元进行切分，并且每个三级标题单元指向对应的父级单元(二级标题单元）</td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> coze中创建表格知识库→上传父子层级切分表格→设置索引</p>
<table>
<thead>
<tr>
<th>创建表格知识库</th>
<th>上传父子层级切分表格</th>
<th>设置表格知识库索引</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_%E5%88%9B%E5%BB%BA%E8%A1%A8%E6%A0%BC%E7%9F%A5%E8%AF%86%E5%BA%93.png" alt="rag迭代_创建表格知识库300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_%E4%B8%8A%E4%BC%A0%E7%88%B6%E5%AD%90%E5%B1%82%E7%BA%A7%E5%88%87%E5%88%86%E5%86%85%E5%AE%B9.png" alt="rag迭代_上传父子层级切分内容300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_%E8%AE%BE%E7%BD%AE%E8%A1%A8%E6%A0%BC%E7%9F%A5%E8%AF%86%E5%BA%93%E7%B4%A2%E5%BC%95.png" alt="rag迭代_设置表格知识库索引300"></td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> 设置提示词和输出模板，预览调试</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/rag%E8%BF%AD%E4%BB%A3_V3%E9%A2%84%E8%A7%88%E8%B0%83%E8%AF%95.png" alt="rag迭代_V3预览调试300"></p>
<h2>3 评估&amp;问题分析</h2>
<h3>3.1 评估结论</h3>
<p><strong>核心功能已达预期：</strong></p>
<p>对于基于现有知识的单次查询，系统的回答广度与内容还原度已达到预期标准(在整体感觉上)。</p>
<p><strong>待评估范围</strong></p>
<p>连续查询（多轮对话）与增量知识更新的功能模块，暂不纳入本次评估范围。</p>
<p><strong>主要发现：</strong></p>
<p>答案在内容上准确，但在结构上存在一种不协调感 ，未能形成逻辑流畅的整体。</p>
<h3>3.2 关键问题</h3>
<p>回答结构不协调，该问题的根源在于《Rag Agent，迭代史（二）》采用的“模板引导生成”策略与召回内容的非适配性。</p>
<h4>3.2.1 原因：模板与内容的“错配”</h4>
<p>该策略类似于一个固定的“食谱”（输出模板），它预设了答案应包含的特定“食材”（如概念定义、原理解释、实现方式等结构化信息）。</p>
<p>然而，当召回的上下文（即“食材”）本身不包含模板所要求的所有信息时，就会出现错配。例如：</p>
<blockquote>
<p>若召回的父级Chunk未深入探讨“为什么”，而模板中却有“原理解释”这一项，LLM为了填充模板，可能会强行重复“是什么”的内容，或直接留白，从而导致最终答案内部逻辑断裂，结构不协调。</p>
</blockquote>
<h4>3.2.2 深层原因：固定模板的错误假设</h4>
<p>更深层次的原因在于，固定模板策略基于一个核心假设：</p>
<blockquote>
<p>我们预先了解该领域所有问题的典型回答模式。</p>
</blockquote>
<p>这个假设在知识体系成熟的领域或许成立，但在快速发展或高度复杂的新兴领域中则难以维系。</p>
<p>本质上，任何固定的模板都是一种固化的视角，试图用单一视角去匹配多样化的知识内容，必然会导致部分场景下的结构性失配。</p>
<h2>4. 主要改进方向</h2>
<h3>4.1 方向一：从“模板驱动”变为“内容驱动”</h3>
<p>鉴于固定模板与召回内容之间存在“错配”风险，新方向的核心思想是：不再强制内容去适应模板，而是让内容本身来决定答案的结构。 这相当于从“按既定食谱备菜”转变为“根据现有食材动态设计菜谱”。</p>
<ol>
<li><strong>第一步：主题发现</strong>
<ul>
<li><strong>操作：</strong> 对召回的上下文Chunk进行开放式主题分析。利用LLM的理解能力，让其在无预设偏见的情况下，自由地识别并描述该内容块的核心主题、信息类型或意图（例如，这是一个概念定义、一个操作步骤、一个原因分析等）。</li>
<li><strong>目的：</strong> 从内容本身，无偏见地“发现”其内在的逻辑主题。</li>
</ul>
</li>
<li><strong>第二步：主题归一化</strong>
<ul>
<li><strong>操作：</strong> 第一步自由发现的主题可能存在表述多样化或语义重叠的问题（如“原理阐述”与“工作机制”）。本步骤旨在对这些原始主题进行聚类和标准化，将它们映射到一个预定义的、有限的规范主题集合中。</li>
<li><strong>目的：</strong> 消除主题的模糊性和冗余，为每个内容块生成一组干净、一致的标准化主题标签，为下游处理提供可靠的结构化输入。</li>
</ul>
</li>
<li><strong>第三步：基于召会内容生成动态大纲</strong>
<ul>
<li><strong>操作：</strong> 汇总所有被召回Chunks的归一化主题，构建一个临时的回答大纲。</li>
<li><strong>目的：</strong> 生成一个即时的、为本次查询量身定制的回答结构或“脚手架”。这个动态大纲将作为最终Prompt的一部分，引导LLM组织语言，确保生成的答案既能全面反映召回内容，又具备逻辑连贯性，从根本上避免固定模板带来的结构失配问题。</li>
</ul>
</li>
</ol>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/">Rag Agent，迭代史（三）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%89%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Rag Agent，迭代史（二）</title>
		<link>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/</link>
					<comments>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 19 Nov 2025 11:31:17 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/2025/11/19/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/</guid>

					<description><![CDATA[<p>1. V2版本内容： 在《Rag A&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/">Rag Agent，迭代史（二）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>1. V2版本内容：</strong></h2>
<p>在《Rag Agent，迭代史（一）》_V1MVP版本的实践后，先采用改进方向一，即 <strong>加工内容源数据。</strong></p>
<p>在知识入库前，对源数据进行预处理。通过格式化、标注或重构等手段，将原本松散的非结构化文本，加工成更结构化的、自包含的知识单元。</p>
<p>具体措施即将文章整理成独立的问答对（Q&amp;A pairs）、带有元数据（Metadata）的段落、或功能完整的代码块。试着将文章变为问答对，让每个问答对相对来说语义完整。<br />
<img decoding="async" src="https://img.0to60.top/0260blog/V2%E7%89%88%E6%9C%AC%E6%A1%86%E6%9E%B6%E5%9B%BE.png" alt="V2版本框架图300"><br />
<strong>重大调整：</strong><br />
由于云端dify没有自带的数据库，为了快速验证MVP，从V2版本开始切换到了COZE平台。</p>
<h2>2. 执行步骤</h2>
<p>**第一步：**新建数据库&amp;设计表结构→存入文章内容</p>
<table>
<thead>
<tr>
<th>新建数据库 &amp;  设计表结构</th>
<th>存入文章内容</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E6%96%B0%E5%BB%BA%E6%95%B0%E6%8D%AE_%E8%A1%A8%E8%AE%BE%E8%AE%A1.png" alt="新建数据_表设计300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E5%AF%BC%E5%85%A5%E6%96%87%E7%AB%A0%E5%86%85%E5%AE%B9.png" alt="导入文章内容300"></td>
</tr>
<tr>
<td>表结构：：id，title，content，url，qa_pairs</td>
<td>先将文章原始内容导入，其他字段暂时为空</td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> 先将文章进行要点提炼 → 围绕要点进行Q&amp;A Pairs转换 → 存入知识库</p>
<table>
<thead>
<tr>
<th>文章要点提炼工作流</th>
<th>QA转换工作流</th>
<th>QA存入知识库</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E6%96%87%E7%AB%A0%E8%A6%81%E7%82%B9%E6%8F%90%E7%82%BC%E5%B7%A5%E4%BD%9C%E6%B5%81.png" alt="文章要点提炼工作流300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/QA%E8%BD%AC%E6%8D%A2%E5%B7%A5%E4%BD%9C%E6%B5%81.png" alt="QA转换工作流300"></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/QA%E5%AD%98%E5%85%A5%E7%9F%A5%E8%AF%86%E5%BA%93.png" alt="QA存入知识库300"></td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> 调试预览</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/V2%E7%89%88%E6%9C%AC%E8%B0%83%E8%AF%95%E9%A2%84%E8%A7%88.png" alt="V2版本调试预览300"></p>
<h2>3. 评估&amp;问题分析</h2>
<h3>3.1 评估结论</h3>
<p>QA Pair的方式确实让召回内容每一个都语义完整，较V1版本有较大的提升，但整体回答离预期扔有较大距离。</p>
<h3>3.2 关键问题1</h3>
<p>问题的广度不够，即问题不全，不足以覆盖用户咨询场景。</p>
<p><em>问题分析内容由AI生成</em></p>
<h4>3.2.1 原因一：LLM一次性处理造成的信息过载**</h4>
<p>当我们给LLM一个指令，比如“请为这篇文章生成QA对”，我们其实是要求它在一次“思考”中，同时完成好几件复杂的事情：</p>
<ul>
<li><strong>阅读理解</strong>：通读并理解全文的每一个细节。</li>
<li><strong>要点识别</strong>：在脑中标记出所有可能成为考点的重要信息。</li>
<li><strong>问题构思</strong>：为每一个识别出的要点，构思出一个或多个好问题。</li>
<li><strong>格式化输出</strong>：将所有构思好的QA对，按照要求的格式组织起来。</li>
</ul>
<p>这就像让一个学生只读一遍课文，就立刻写出覆盖所有知识点的模拟试卷一样。<strong>模型会很自然地“走捷径”</strong>，它会优先处理那些最明显、最容易转化成问题的内容，而很多隐藏在段落深处、需要结合上下文才能提炼的知识点，就在这次“匆忙”的处理中被忽略了。</p>
<p><strong>结果就是：</strong> 生成的问题只覆盖了文章的“主干”，而大量的“枝叶”被漏掉了。</p>
<h4>3.2.2 原因二：中心议题的引力偏见</h4>
<p>LLM在阅读文章时，会像我们人类一样，抓住文章的“中心思想”。文章中反复强调的核心概念、最长的章节，会对模型的“注意力”产生巨大的引力。</p>
<ul>
<li><strong>例如</strong>：一篇关于ComfyUI中<code>KSampler</code>节点的文章，可能花了80%的篇幅讲解<code>sampler_name</code>和<code>scheduler</code>这两个核心参数。而只用了一个小段落，提了一句“注意，如果图片模糊，可以尝试调整<code>denoise</code>参数”。</li>
<li>在这种情况下，一个简单的Prompt生成的10个问题里，可能有8个都是关于<code>sampler_name</code>和<code>scheduler</code>的，而那个对于用户排错至关重要的<code>denoise</code>知识点，很可能一个问题都不会生成。</li>
</ul>
<p><strong>结果就是：</strong> 问题的广度严重不足，过度集中在文章的“明星内容”上，忽略了那些同样重要但篇幅较少的“配角内容”。</p>
<h4>3.2.3 原因三：缺乏“提问视角”</h4>
<p>一个简单的Prompt，通常没有给LLM设定一个具体的“角色”或“视角”。因此，它会从一个非常中立、泛泛的角度来提问，但实际上，对于同一篇文章，不同的人会有完全不同的问题：</p>
<ul>
<li><strong>新手会问</strong>：“<code>KSampler</code>是什么？它在哪里可以找到？”</li>
<li><strong>进阶用户会问</strong>：“<code>euler</code>和<code>dpmpp_2m</code>这两个<code>scheduler</code>有什么区别？哪种情况下用哪个更好？”</li>
<li><strong>开发者会问</strong>： “<code>KSampler</code>节点的输入和输出分别是什么数据类型？我如何开发一个自定义的采样器？”</li>
</ul>
<p>如果你不明确指令LLM从这些不同的视角出发去提问，它就只会生成那些最“安全”、最“平均”的问题，从而错失了大量有价值的、特定于用户意图的问题。</p>
<p><strong>结果就是：</strong> 生成的问题缺乏层次感和多样性，无法覆盖不同深度和不同用户群体的需求。</p>
<h3>3.3 关键问题2：</h3>
<p>Q&amp;A对的深度不够，主要提现在答案的深度不够，具体表现在过于精炼，“正确而无用”，不具备引导性</p>
<p><em>问题分析内容由AI生成</em></p>
<h4>3.1.1 原因一：模型的“最小化提取”倾向</h4>
<p>在RAG任务中，LLM的首要指令（无论是显式还是隐式）是“忠于原文”，以避免产生幻觉。为了“安全”地完成这个任务，模型会采取最保守的策略：直接从你提供的上下文中，找到并复述那个能够直接回答问题的句子。如：</p>
<ul>
<li><strong>问题Q</strong>：“在ComfyUI里，denoise参数是做什么用的？”</li>
<li><strong>上下文Chunk</strong>：“&#8230;KSampler节点可以控制生成过程。其中，denoise参数控制了对原始潜空间图像的重绘程度，值为1代表完全重绘，值为0代表不做任何改变&#8230;”</li>
<li><strong>模型生成的“精炼”答案A</strong>：“denoise参数控制了对原始潜空间图像的重绘程度。”</li>
</ul>
<p>这个答案是100%正确的，也完全基于上下文。但它毫无“深度”和“引导性”可言。模型只是做了一个精准的“复制-粘贴”工作，因为它认为这是最安全、最直接地完成指令的方式。</p>
<h4>3.3.2 原因二：全局上下文的丢失</h4>
<p>这是导致深度不足的<strong>最核心、最隐蔽</strong>的原因。</p>
<p>V2版本虽然保证了召回内容的语义完整性，但本质上召回内容仍然是是<strong>文章的“碎片”，而不是“全貌”。</strong></p>
<p>一个好的、有深度的答案，往往需要结合多个不同部分的信息：</p>
<ul>
<li><strong>定义</strong>：这个东西是什么？（可能在文章的第2段）</li>
<li><strong>原因</strong>：为什么要用它？（可能在第4段）</li>
<li><strong>影响</strong>：不正确地使用它会有什么后果？（可能在第7段的一个小提示里）</li>
</ul>
<p>当只召回了与“定义”最相关的第2段作为上下文时，LLM<strong>根本就看不见</strong>第4段和第7段的内容。它无法“无中生有”，自然也就不可能提供关于“原因”和“后果”的引导性信息。它被我们自己提供的、过于聚焦的上下文给“限制”住了。</p>
<h4>3.3.3 原因三：指令中的“引导性”要求过于模糊</h4>
<p>在提示词中对LLM做出的回答约束目前<strong>非常抽象模糊</strong>，它不知道你所谓的“引导性”具体指什么。是指要提供代码示例？还是解释背后的原理？还是给出常见错误的排查方法？</p>
<p>当指令模糊时，模型就会退回它最擅长的“最小化提取”模式。</p>
<h2>4. 主要改进方向</h2>
<p>针对知识内容的的广度和深度问题，有两条核心改进路径：方向一旨在深度优化现有的“要点提炼→Q&amp;A转换”工作流；方向二则探索一种全新的、基于“索引与上下文分离”的数据架构。</p>
<h3>4.1 方向一：深化“要点提炼→Q&amp;A转换”策略</h3>
<p><strong>提升回答内容的的广度</strong>，需解决以下问题：</p>
<table>
<thead>
<tr>
<th style="text-align:left">面临问题</th>
<th style="text-align:left">描述内容</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">信息过载与丢失</td>
<td style="text-align:left">LLM一次性处理长文时，难以兼顾所有细节，导致重要但权重较低的信息被忽略。</td>
</tr>
<tr>
<td style="text-align:left">中心议题引力偏见</td>
<td style="text-align:left">LLM倾向于围绕文章的核心议题生成内容，对边缘但有价值的知识点覆盖不足。</td>
</tr>
<tr>
<td style="text-align:left">缺乏提问视角</td>
<td style="text-align:left">自动生成的Q&amp;A未能覆盖用户可能提出的多样化、多层次问题。</td>
</tr>
</tbody>
</table>
<p><strong>优化措施</strong>如下</p>
<table>
<thead>
<tr>
<th style="text-align:left">措施</th>
<th style="text-align:left">具体内容</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">分步式要点提炼</td>
<td style="text-align:left">将提炼过程拆分为两步。<br />&#8211; 首先，从全文生成一级要点列表；<br />&#8211; 然后，遍历该列表，对每个一级要点进行扩展，生成更细化的二级要点明细。此举旨在通过分解任务，确保细节信息得到充分捕获。</td>
</tr>
<tr>
<td style="text-align:left">多维视角问题生成</td>
<td style="text-align:left">遍历二级要点明细，利用提示词工程中的多角色扮演技巧，从概念定义、关联关系、潜在影响等多个维度生成问题列表，以此拓宽问题的覆盖面。</td>
</tr>
<tr>
<td style="text-align:left">预处理QA-答案</td>
<td style="text-align:left">遍历生成的问题列表，将“单个问题 + 全文内容”作为输入，生成对应的答案。</td>
</tr>
</tbody>
</table>
<p><strong>提升回答内容的深度</strong>，需解决以下问题：</p>
<table>
<thead>
<tr>
<th style="text-align:left">面临问题</th>
<th style="text-align:left">描述内容</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">“最小化提取”倾向</td>
<td style="text-align:left">“忠于原文”的强指令，可能导致模型倾向于直接摘抄，而非进行归纳、推理和总结。</td>
</tr>
<tr>
<td style="text-align:left">全局上下文利用不足</td>
<td style="text-align:left">尽管已提供全文作为上下文，但模型未能主动关联不同章节的内容，形成有深度的见解。</td>
</tr>
<tr>
<td style="text-align:left">引导性模糊</td>
<td style="text-align:left">缺乏明确的输出结构引导，导致答案内容平均化，缺乏重点和深度。</td>
</tr>
</tbody>
</table>
<p><strong>优化措施</strong>如下</p>
<table>
<thead>
<tr>
<th style="text-align:left">措施</th>
<th style="text-align:left">具体内容</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">柔化指令权重</td>
<td style="text-align:left">调整提示词中“忠于原文”的指令强度。例如，可以引入权重或优先级说明，鼓励模型在保证事实准确性的前提下，进行更高层次的逻辑组织和信息综合。</td>
</tr>
<tr>
<td style="text-align:left">结构化输出模板</td>
<td style="text-align:left">在提示词中设计更具引导性的输出模板，要求答案更有层次结构，引导其“深度”挖掘。</td>
</tr>
</tbody>
</table>
<h3>4.2 方向二：实施“索引与上下文分离”架构</h3>
<p>此方向旨在从根本上解决“要点提炼”过程中的信息压缩与损失问题。该策略的核心是，承认任何形式的“提炼”都可能丢失未来查询所需的关键信息，而丢失的这部分信息不仅影响广度，同时也影响深度。</p>
<p><strong>核心思想</strong></p>
<p>此方向旨在从根本上解决“要点提炼”过程中的信息压缩与损失问题。该策略的核心是，承认任何形式的“提炼”都可能丢失未来查询所需的关键信息。</p>
<p><strong>改进策略</strong>(和V1版本的方向二及方向三一致)</p>
<ul>
<li><strong>对原文进行结构化处理：</strong> 将原始文章改写为具有清晰父子层级的Markdown格式。在此结构中，父级单元（如一个完整章节或逻辑段落）因其语义完整性，被定义为“上下文块”**。**子级单元（如段落中的一个核心论点或一个标题）因其主题明确，被定义为“索引块”。</li>
<li><strong>基于“索引块”进行切分：</strong> 用于知识库的检索匹配。</li>
<li><strong>小块检索，大块召回：</strong> 当用户查询命中某个“索引块”时，系统不再返回这个小块本身，而是召回其所属的、语义更完整的父级“上下文块”，并将其提供给LLM。</li>
</ul>
<p>通过这种方式，既保证了检索的精准度，又为LLM提供了生成高质量答案所需的完整语境，有望同时改善广度和深度问题。</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/">Rag Agent，迭代史（二）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%ba%8c%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Rag Agent，迭代史（一）</title>
		<link>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%80%ef%bc%89/</link>
					<comments>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%80%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Tue, 18 Nov 2025 10:52:42 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=1285</guid>

					<description><![CDATA[<p>V1. MVP开始 《Rag Age&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%80%ef%bc%89/">Rag Agent，迭代史（一）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h2>V1. MVP开始</h2>
<p>《Rag Agent，迭代史》系列是通过Rag Agent应用的不断迭代，探索总结Rag应用的方法论。</p>
<p>本文记录版本V1的迭代内容。</p>
<h2>1. 版本内容</h2>
<p><strong>目标：</strong><br />
搭建一个简单的教程助手类的Agent，在ComfyUI For StableDiffusion领域为小伙伴提供入门指导。<br />
<strong>工具选型：</strong><br />
在AI的建议下，在coze和dify中选择了dify。<br />
<strong>基本框架：</strong><br />
越简单越好，知识库+智能体(能检索知识库召回内容)<br />
<img decoding="async" src="https://img.0to60.top/0260blog/V1%E7%89%88%E6%9C%AC%E6%A1%86%E6%9E%B6%E5%9B%BE.png" alt="V1版本框架图300"><br />
<em>V1版本整体框架图</em></p>
<h2>2. 执行步骤</h2>
<p>Learn By Doing ,直接开干，整个过程为3个步骤：</p>
<p><strong>第一步：</strong> 在dify中创建知识库→上传文章→自动清洗&amp;分块</p>
<table>
<thead>
<tr>
<th>创建知识库</th>
<th>上传文章</th>
<th>默认设置&amp;自动分块</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E5%88%9B%E5%BB%BA%E7%9F%A5%E8%AF%86%E5%BA%93.png" alt="创建知识库300"></p>
<p><em>1）dify中创建知识库</em></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E4%B8%8A%E4%BC%A0%E6%96%87%E7%AB%A0.png" alt="上传文章300"></p>
<p><em>2）上传文章</em></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E8%AE%BE%E7%BD%AE%E9%BB%98%E8%AE%A4_%E8%87%AA%E5%8A%A8%E5%88%86%E5%9D%97.png" alt="设置默认_自动分块300"></p>
<p><em>3）默认设置&amp;自动分块</em></td>
</tr>
</tbody>
</table>
<p><strong>第二步：</strong> 创建一个项目，应用类型选智能体，配置提示词和关联知识库</p>
<table>
<thead>
<tr>
<th>创建项目-智能体</th>
<th>配置智能体</th>
</tr>
</thead>
<tbody>
<tr>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE_%E6%99%BA%E8%83%BD%E4%BD%93%E5%BA%94%E7%94%A8.png" alt="创建项目_智能体应用300"></p>
<p><em>1）创建项目，类型为聊天助手</em></td>
<td><img decoding="async" src="https://img.0to60.top/0260blog/%E9%85%8D%E7%BD%AE%E6%99%BA%E8%83%BD%E4%BD%93.png" alt="配置智能体300"></p>
<p><em>2）配置提示词，关联知识库，其他配置默认</em></td>
</tr>
</tbody>
</table>
<p><strong>第三步：</strong> 调试预览</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/v1_%E8%B0%83%E8%AF%95%E9%A2%84%E8%A7%88.png" alt="v1_调试预览300"></p>
<p><em>调试预览</em></p>
<h2>3. 评估&amp;问题分析</h2>
<h3>3.1 评估结论</h3>
<p>实践结果未达到预期。Agent未能按设想基于文档内容回答，输出质量有较大偏差。</p>
<h3>3.2 关键问题1</h3>
<p><strong>答案质量低下</strong>：Agent的回答与原文内容“毫不相关”。其输出为通用、模糊的泛化知识，而非文章中的具体观点和逻辑，表明它并未有效利用提供的知识库。</p>
<p><strong>问题分析</strong></p>
<p><strong>原因1：默认文本切分导致上下文“碎片化”</strong></p>
<p>默认的切分策略通常基于固定长度（e.g., 每N个字符/Token一切），粗暴地将完整的句子、段落和逻辑链条从中间斩断。但是在检索知识库时，只会将有相关性的碎片内容召回，如下图所示，这些碎片内容不足以组成一个完整的概念阐述，LLM接收到该召回内容后，只能按照模型资深的逻辑进行回答。</p>
<p><img decoding="async" src="https://img.0to60.top/0260blog/v1_chunk%E5%8F%AC%E5%9B%9E.png" alt="v1_chunk召回|image 6300"><br />
<em>从知识库中召回的chunks</em></p>
<p><strong>0.0？思考</strong></p>
<p>既然粗暴切分是问题的根源，那我们为什么一定要切分呢？直接将整篇文章作为上下文传给LLM，不是更完整、更准确吗？(<strong>以下内容为AI生成</strong>)</p>
<p><strong>0.0！答案</strong></p>
<p>这是一个非常自然且重要的问题。答案是，对文本进行切分并非一个可选的优化项，而是由当前技术和工程现实决定的<strong>必要步骤</strong>。主要原因有三点：</p>
<ol>
<li><strong>技术限制：模型的上下文窗口 (Context Window)</strong>
<ul>
<li>每个LLM都有一个“上下文窗口”的限制，即它一次性可以接收和处理的文本总量（以Token计算）。例如，GPT-3.5的窗口是4k或16k tokens，而一篇几万字的深度文章或一本几十万字的书，其Token数量会轻易超出这个上限。强行输入超长的文本会导致API直接报错。虽然现在有像Gemini 1.5 Pro这样支持超长上下文（1M tokens）的模型，但窗口限制依然是绝大多数应用需要考虑的边界条件。</li>
</ul>
</li>
<li><strong>工程限制：成本与延迟 (Cost &amp; Latency)</strong>
<ul>
<li>LLM服务的调用成本与输入的Token数量正相关。在每次提问时都将整篇长文作为上下文发送，会产生巨大的计算开销，使得应用成本高昂。</li>
<li>同时，处理的文本越长，模型的响应时间也越长。这会严重影响用户体验，无法满足实时问答的需求。切分和检索的模式，确保了每次只向LLM发送少量、高度相关的上下文，从而在成本和速度上实现了工程可行性。</li>
</ul>
</li>
<li><strong>效果限制：“大海捞针”问题 (Needle in a Haystack Problem)</strong>
<ul>
<li>即使在上下文窗口允许的情况下，向模型输入过长的、包含大量无关信息的文本，也可能降低其回答的精确度。模型需要在庞大的信息“噪音”中找到关键的几句话（“大海捞针”），这本身就是一个挑战。研究表明，在超长上下文中，模型可能会出现“中间遗忘”现象，即对文本开头和结尾的信息记得更牢。</li>
<li>RAG中的“检索”步骤，本质上是一个高效的**“降噪”和“聚焦”**过程。它预先筛选出与问题最相关的几个知识片段，让LLM可以集中“注意力”在这些高质量信息上，从而生成更精准的答案。</li>
</ul>
</li>
</ol>
<p>因此，<strong>文本切分是不可避免的</strong>。我们的目标不是消除切分，而是找到一个办法，让每个切分的知识块都有相对全局的语义信息。</p>
<h2>4. 主要改进方向</h2>
<p>既然问题的核心在于召回采纳的上下文存在“语义孤立”，从而导致LLM无法有效利用，那么改进就应围绕提升上下文的语义完整性这一目标展开。主要探索以下三个方向：</p>
<p><strong>方向一：加工内容源数据</strong></p>
<ul>
<li>在知识入库前，对源数据进行预处理。通过格式化、标注或重构等手段，将原本松散的非结构化文本，加工成更结构化的、自包含的知识单元。例如，整理成独立的问答对（Q&amp;A pairs）、带有元数据（Metadata）的段落、或功能完整的代码块。</li>
</ul>
<p><strong>方向二：智能的切分策略</strong></p>
<ul>
<li><strong>引入重叠缓冲 :</strong> 在相邻的文本块（Chunks）之间保留一部分重叠内容。这是一种简单有效的“缓冲”机制，能确保在切分边界处的关键信息不会被割裂。</li>
<li><strong>利用语义边界 :</strong> 依据文本的内在结构进行切分，例如Markdown的标题层级、自然的段落、完整的句子，甚至是代码中的函数或类定义。这种方法尊重原文的逻辑结构，切分出的内容单元更为合理。</li>
</ul>
<p><strong>方向三：检索召回策略</strong><br />
任何切分策略都只能缓解而无法根除语义孤立问题。</p>
<ul>
<li><strong>索引与内容分离：</strong> 不再将检索到的小文本块直接作为最终上下文。而是将其视为“索引”或“指针”，用它来定位并召回一个更大的、包含更完整上下文的父级文档或段落。例如，先精准地检索到某个句子，再将该句子所在的整个段落提供给LLM。这种“小索引，大内容”（Small Chunk for search, Large Chunk for context）的模式，兼顾了检索的精确性和上下文的完整性。</li>
</ul>
<p><a rel="nofollow" href="https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%80%ef%bc%89/">Rag Agent，迭代史（一）</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/rag-agent%ef%bc%8c%e8%bf%ad%e4%bb%a3%e5%8f%b2%ef%bc%88%e4%b8%80%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hello，AI Agent</title>
		<link>https://0to60.top/hello%ef%bc%8cai-agent/</link>
					<comments>https://0to60.top/hello%ef%bc%8cai-agent/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Thu, 18 Sep 2025 08:05:17 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=1086</guid>

					<description><![CDATA[<p>引言 本文的作用是搭建第一个AI A&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/hello%ef%bc%8cai-agent/">Hello，AI Agent</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本文的作用是搭建第一个AI Agent。</p>



<h2 class="wp-block-heading">一、平台选择</h2>



<p>最后选择了Dify作为初步的学习工具。</p>



<p>选择过程很简单，直接问国内的deepseek</p>



<ul class="wp-block-list">
<li>Dify和Coze的各自特点和企业应用情况</li>



<li>若以提升职场竞争力为目标，初步选择哪个平台更好</li>
</ul>



<h3 class="wp-block-heading">1.1 平台基础对比</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>特性维度</th><th>Dify</th><th>Coze</th></tr></thead><tbody><tr><td><strong>核心定位</strong></td><td>企业级AI应用开发平台<a href="https://neo-static.sspai.com/post/102402" target="_blank" rel="noreferrer noopener"></a><a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td>低代码/零代码AI应用搭建平台，侧重对话机器人和轻量级自动化<a href="https://www.modb.pro/db/1950018049822699520" target="_blank" rel="noreferrer noopener"></a><a href="https://www.woshipm.com/evaluating/6091987.html" target="_blank" rel="noreferrer noopener"></a><a href="https://blog.csdn.net/quanbin222520/article/details/148791772" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>私有化部署</strong></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>支持强大</strong>（社区版免费，企业版功能更全），适合对数据安全要求高的场景<a href="https://neo-static.sspai.com/post/102402" target="_blank" rel="noreferrer noopener"></a><a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>开源版功能受限</strong>（插件、调试等缺失），且其商业版仅支持云端部署（字节火山引擎），数据不在本地<a href="https://www.modb.pro/db/1950018049822699520" target="_blank" rel="noreferrer noopener"></a><a href="https://www.woshipm.com/ai/6248385.html" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>企业级特性</strong></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>完善</strong>（RBAC权限、多租户、监控审计、知识库集成等）<a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>开源版缺失</strong>（团队协作、权限管理、监控审计等工具较弱）<a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>典型企业场景</strong></td><td>多语言客服系统、智能助理平台、需深度定制的SaaS化AI服务、金融风控、医疗文档处理等<a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td>电商运营、内容创作、社交媒体机器人、轻量级客服机器人（尤其擅长抖音、飞书生态）<a href="https://blog.csdn.net/quanbin222520/article/details/148791772" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>模型支持</strong></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>丰富且灵活</strong>（支持100+主流模型，OneAPI协议动态切换）<a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>较多，但生态绑定</strong>（国内版主推豆包、通义千问等，国际版支持GPT-4o等）<a href="https://blog.csdn.net/quanbin222520/article/details/148791772" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>开发者生态与社区</strong></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>非常活跃</strong>（GitHub stars 超10万<a href="https://www.modb.pro/db/1950018049822699520" target="_blank" rel="noreferrer noopener"></a><a href="https://www.woshipm.com/ai/6248385.html" target="_blank" rel="noreferrer noopener"></a>，社区贡献活跃，文档完善，支持二次开发）<a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>插件生态丰富</strong>（闭源版插件超3000个<a href="https://www.modb.pro/db/1950018049822699520" target="_blank" rel="noreferrer noopener"></a><a href="https://www.woshipm.com/ai/6248385.html" target="_blank" rel="noreferrer noopener"></a>，但开源版目前仅18个内置插件<a href="https://www.modb.pro/db/1950018049822699520" target="_blank" rel="noreferrer noopener"></a><a href="https://www.woshipm.com/ai/6248385.html" target="_blank" rel="noreferrer noopener"></a>，深度集成字节系生态<a href="https://blog.csdn.net/quanbin222520/article/details/148791772" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a>）</td></tr><tr><td><strong>学习与上手成本</strong></td><td>中等学习曲线，1-2天掌握基本操作<a href="https://neo-static.sspai.com/post/102402" target="_blank" rel="noreferrer noopener"></a></td><td>上手速度非常快，几小时内可创建简单AI应用<a href="https://neo-static.sspai.com/post/102402" target="_blank" rel="noreferrer noopener"></a></td></tr><tr><td><strong>企业市场反馈</strong></td><td>服务全球150个国家用户，支撑超400万次应用部署<a href="https://so.html5.qq.com/page/real/search_news?docid=70000021_16767eb99d121152&amp;faker=1" target="_blank" rel="noreferrer noopener"></a>；<strong>在大型企业、政府机构、金融医疗等合规要求高的领域认可度高</strong><a href="https://juejin.cn/post/7537000860490186798" target="_blank" rel="noreferrer noopener"></a><a href="https://www.51cto.com/aigc/6750.html" target="_blank" rel="noreferrer noopener"></a></td><td><strong>在中小型企业、初创公司、以及对数据安全不敏感的轻量级应用场景中更受欢迎</strong></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.2 市场占有率和落地情况</h3>



<ul class="wp-block-list">
<li><strong>Dify</strong>：
<ul class="wp-block-list">
<li><strong>占有率特点</strong>：虽然绝对用户数量可能不如Coze（因为Coze上手门槛更低，吸引了大量个人和轻用户），但Dify在<strong>高价值企业客户</strong>中的渗透率和认可度非常高。</li>



<li><strong>落地行业</strong>：主要集中在<strong>金融科技（风控、投研、智能投顾）、软件与SaaS服务商（为客户集成AI能力）、教育科技、医疗健康（智能问诊、文档处理）、以及大型企业的内部知识管理和自动化平台</strong>。</li>



<li><strong>原因</strong>：这些行业对数据的私密性、系统的稳定性和可定制性要求极高，Dify的<strong>开源+私有化部署</strong>能力是它们的刚需。企业愿意为此支付更高的费用（企业版）并获得更深度的技术支持。</li>
</ul>
</li>



<li><strong>Coze</strong>：
<ul class="wp-block-list">
<li><strong>占有率特点</strong>：凭借字节的流量和生态优势，Coze在<strong>用户数量和市场声量</strong>上非常庞大，尤其是在<strong>中小型企业、电商、新媒体运营、MCN机构</strong>等领域快速普及。</li>



<li><strong>落地场景</strong>：主要集中在<strong>智能客服（尤其抖音电商）、内容创作（自动生成文案、视频脚本）、社交媒体机器人（抖音、微信群助手）、以及飞书上的各种办公自动化小程序</strong>。</li>



<li><strong>原因</strong>：这些场景追求<strong>极致的上线速度</strong>和与现有生态（抖音、飞书、微信公众号）的<strong>无缝对接</strong>。Coze丰富的插件市场和模板市场正好满足了这一需求，让运营人员甚至无需技术背景也能快速搭建应用。</li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading">1.3 企业偏好</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>企业类型/需求</th><th>更可能的选择</th><th>原因分析</th></tr></thead><tbody><tr><td><strong>银行、券商、保险公司</strong></td><td><strong>Dify</strong></td><td><strong>合规与安全是第一生命线</strong>。必须私有化部署，模型和数据都必须掌控在自己手里。Dify的企业版解决方案是为此量身定做。</td></tr><tr><td><strong>政府、国企、医疗机构</strong></td><td><strong>Dify</strong></td><td>同样对数据安全有严格要求，且采购流程倾向于可控、可审计的私有化产品。</td></tr><tr><td><strong>软件公司、SaaS厂商</strong></td><td><strong>Dify</strong></td><td>需要将AI能力深度集成到自己的产品中，需要高度的<strong>可定制性和API控制力</strong>。Dify的工作流和API-first设计更友好。</td></tr><tr><td><strong>抖音电商服务商、MCN机构</strong></td><td><strong>Coze</strong></td><td><strong>生态决定选择</strong>。Coze能直接调用抖音的开放API，轻松实现自动回复评论、智能客服、达人对接等，效率无敌。</td></tr><tr><td><strong>互联网公司业务部门</strong></td><td><strong>Coze</strong></td><td>运营或产品团队需要一个快速原型工具来验证AI创意，<strong>不需要IT部门支持</strong>，几天甚至几小时内就能上线一个对话机器人。</td></tr><tr><td><strong>初创公司（轻资产）</strong></td><td><strong>Coze</strong></td><td>初期成本敏感，追求敏捷开发，且业务数据不涉及核心机密。Coze的免费额度和丰富模板能快速支持业务。</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.4 对你的职场竞争力的影响（经验移植性）</h3>



<ul class="wp-block-list">
<li><strong>学习 Dify 的经验更偏向“底层”和“通用”</strong>：
<ul class="wp-block-list">
<li>你积累的<strong>工作流设计、RAG优化、模型微调、API编排、私有化部署运维</strong>等经验，是<strong>高度可移植的</strong>。这些技能让你理解AI应用的核心架构，无论以后是用Dify、LangChain还是自己手写代码，这些概念都是相通的。</li>



<li>这意味着你的经验<strong>更容易受到技术驱动型公司的认可</strong>，职业路径可以走向<strong>AI工程师、解决方案架构师</strong>等更核心的技术岗位。</li>
</ul>
</li>



<li><strong>学习 Coze 的经验更偏向“上层”和“生态”</strong>：
<ul class="wp-block-list">
<li>你积累的<strong>插件使用、快速Prompt工程、多Agent社交编排、与字节系产品（抖音/飞书）的集成</strong>等经验，非常<strong>实用和高效</strong>。</li>



<li>这些经验在<strong>特定的业务场景（运营、增长、电商）和特定的生态（字节系）内价值极高</strong>。你的职业路径可以走向<strong>AI产品经理、智能运营专家、业务赋能专家</strong>等岗位。</li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading">二、Hello，AI agent</h2>



<ul class="wp-block-list">
<li>本次选择云端部署，私有部署会遇到大量环境问题</li>



<li>进入dify官网，注册登录</li>



<li>创建Agent类型的应用</li>
</ul>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/09/image-27-1024x486.png" alt="" class="wp-image-1088" srcset="https://0to60.top/wp-content/uploads/2025/09/image-27-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-27-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-27-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-27-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-27.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list">
<li>选择LLM供应商，此次采用的是通义千问，然后获取API Key。有点坑，最新的版本会报错，建议安装0.0.40版本。(可在右上角个人头像->设置->模型供应商中去选择配置)</li>
</ul>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/09/image-26-1024x486.png" alt="" class="wp-image-1087" srcset="https://0to60.top/wp-content/uploads/2025/09/image-26-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-26-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-26-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-26-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-26.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list">
<li>提示词设定，测试，发布。搞定</li>
</ul>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/09/image-28-1024x486.png" alt="" class="wp-image-1089" srcset="https://0to60.top/wp-content/uploads/2025/09/image-28-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-28-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-28-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-28-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-28.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<p>最后</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="612" height="216" src="https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1.jpg" alt="" class="wp-image-137" srcset="https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1.jpg 612w, https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1-300x106.jpg 300w" sizes="auto, (max-width: 612px) 100vw, 612px" /></figure>
<p><a rel="nofollow" href="https://0to60.top/hello%ef%bc%8cai-agent/">Hello，AI Agent</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/hello%ef%bc%8cai-agent/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AI Agent，启动</title>
		<link>https://0to60.top/ai-agent%ef%bc%8c%e5%90%af%e5%8a%a8/</link>
					<comments>https://0to60.top/ai-agent%ef%bc%8c%e5%90%af%e5%8a%a8/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 17 Sep 2025 09:42:34 +0000</pubDate>
				<category><![CDATA[AI Agent]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=1082</guid>

					<description><![CDATA[<p>引言 本文的目的： 一、为何开启AI&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/ai-agent%ef%bc%8c%e5%90%af%e5%8a%a8/">AI Agent，启动</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本文的目的：</p>



<ul class="wp-block-list">
<li>阐述为何开启AI Agent领域的原因</li>



<li>制定MVP执行路径</li>
</ul>



<h2 class="wp-block-heading">一、为何开启AI Agent领域</h2>



<h3 class="wp-block-heading">1.1 AI Agent能提供职场竞争力</h3>



<p>为啥，目前AI Agent在企业的落地方向有：</p>



<ol class="wp-block-list">
<li></li>
</ol>



<ul class="wp-block-list">
<li>效率提升及自动化，这是目前最集中的方面，场景归类有：
<ul class="wp-block-list">
<li>常见问题处理/信息查询通知等场景自动化。理解用户意图，调用内部知识库或API（如订单查询、物流跟踪），甚至能处理复杂的对话流程，并在必要时无缝转接给人工。<strong>显著降低响应等待成本。</strong></li>



<li>内部流程自动化，自动化执行重复性、规则明确的办公室任务，如数据录入、报告生成、邮件分类与回复，释放员工精力到更具创造性的工作中。<strong>大幅提升信息流转效率。</strong></li>



<li></li>



<li></li>
</ul>
</li>



<li>决策支持与数据洞察？策略输出
<ul class="wp-block-list">
<li>通过访问公网数据（社交媒体、行业报告）等，自动洞察分析报告，实时监控市场动态、竞争对手情报和消费者情绪，为产品开发和市场策略提供数据驱动的依据。如：新产品上市前的市场调研Agent、舆情监控Agent。</li>
</ul>
</li>
</ul>



<ul class="wp-block-list">
<li>创新业务与个性化服务
<ul class="wp-block-list">
<li>原有业务过程中嵌入Agent提升服务效率或体验。企业助理，员工AI助理，用户小秘等概念。</li>



<li>AI Agent本身也是一种产品形态，可切入垂直领域，做业务创新。</li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading">1.2 探索一人成军的可能</h3>



<p>作为人，受限于工具，不仅记忆、思维方式又或是解决能力，有很多事情都无法做成，而如果有机会一人成军，光是想象都兴奋。要达成这种目标，还需借助工具的力量，AI agent是一个不错的途径。</p>



<h2 class="wp-block-heading">二、制定MVP执行路径</h2>



<ol class="wp-block-list">
<li>选定AI Agent工具平台</li>



<li>制作一个自己的第一个AI Agent，Hello Agent</li>



<li>输出《Hello，AI Agent》</li>
</ol>
<p><a rel="nofollow" href="https://0to60.top/ai-agent%ef%bc%8c%e5%90%af%e5%8a%a8/">AI Agent，启动</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/ai-agent%ef%bc%8c%e5%90%af%e5%8a%a8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，一致性角色实战篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Mon, 15 Sep 2025 09:25:00 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<category><![CDATA[Comfyui实践篇]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=1015</guid>

					<description><![CDATA[<p>引言 为避免陷入学习陷阱，以阶段性目&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/">ComfyUI，一致性角色实战篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>为避免陷入学习陷阱，以阶段性目标为导引，约束学习路径。</p>



<p>本期学习目标为实现一致性角色，最终表现为训练一个Flux LoRa模型，整体思路为：</p>



<ul class="wp-block-list">
<li>人物角色初始化：得到一张满意的T-POSE正面全身照和高清的头部图像。</li>



<li>角色多视角实现：基于初始化角色，得到不同视角的的图片。</li>



<li>丰富角色表情：给所有图片增加表情。</li>



<li>丰富背景：给增加表情后的图片增加背景。（至此，得到训练模型的图片素材）</li>



<li>素材处理：给素材批量修改大小及打标。</li>



<li>模型训练。</li>
</ul>



<h2 class="wp-block-heading">一、人物角色初始化</h2>



<p>此步骤较为简单，目标有两个。</p>



<ul class="wp-block-list">
<li>获得一张T-POSE正面全身照。</li>



<li>得到头部的高清放大图，作为之后脸部特征的依据。</li>
</ul>



<h3 class="wp-block-heading">1.1 T-Pose角色图生成</h3>



<p>此处采用的是FLUX模型。</p>



<p>一般来说，获取一个角色要么随机，要么是想这个角色带有某个目标人物的脸部特征。在Flux中，可加入一个PuLID模块，用于提取目标人物的脸部特征。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image.png" alt="" class="wp-image-1018" srcset="https://0to60.top/wp-content/uploads/2025/09/image.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">1.2 头部高清放大</h3>



<p>基本思路：</p>



<ul class="wp-block-list">
<li>提取T-Pose角色的头部区域</li>



<li>SD放大+FaceDetail，SD放大过程中为防止和原图相差过大，通过图片反推提示词+ControlNet_Tile保留原图特征。</li>



<li>为保留原角色图片色彩风格，增加一个色彩匹配节点。</li>
</ul>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-1.png" alt="" class="wp-image-1020" srcset="https://0to60.top/wp-content/uploads/2025/09/image-1.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-1-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-1-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-1-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-1-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-1-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-1-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">二、角色多视角图</h2>



<p>此步骤主要目的是基于第一步得到的正面T-Pose图片得到多视角图，整体思路为：</p>



<ul class="wp-block-list">
<li>获取多视角参考图，为后续的图片生成提供Controlnet引导(Pose，depth，cany)。(如果已经有了多视角CN控制图，可以省略此步)</li>



<li>基于T-Pose图，在多视角参考图提供的CN控制下，生成多视角图片。</li>



<li>由于参考生图通常会使得面部特征相差较大，还需进行脸部处理，用换脸思路即可。</li>
</ul>



<h3 class="wp-block-heading">2.1 获取多视角参考图</h3>



<p>可以在网上搜寻多视角的参考图，关键词如：pose sheet，但通常很难得到能直接用的参考图。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/09/image-3-1024x486.png" alt="" class="wp-image-1022" srcset="https://0to60.top/wp-content/uploads/2025/09/image-3-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-3-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-3-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-3-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-3.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>有些UP/博主也会直接分享通用的CN控制图，如下图，但抽卡表现上稳定性不高。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="297" height="300" src="https://0to60.top/wp-content/uploads/2025/09/image-2.png" alt="" class="wp-image-1021"/></figure>



<p>在多次实践后，为生成较为稳定的结果，本次采用的思路是：</p>



<ul class="wp-block-list">
<li>利用MV-Adapter，基于T-Pose图先生成<strong>六视角</strong>图，虽然细节特征会相差较大，但整体身型/色彩的一致性有较好表现，之后提取的CN控制图会较为契合目标。</li>
</ul>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-4.png" alt="" class="wp-image-1023" srcset="https://0to60.top/wp-content/uploads/2025/09/image-4.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-4-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-4-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-4-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-4-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-4-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-4-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">2.2 生成多视角角色图片</h3>



<p><strong>前置准备：</strong></p>



<p>T-Pose图提供整体身型、服饰、发型等元素信息，多视角参考图提供CN-控制信息(本次使用是Pose图)。</p>



<p><strong>整体思路：</strong></p>



<ul class="wp-block-list">
<li>利用Fill+Redux的组合，可以生成和T-Pose相似的图片(整体身型，内容，色彩等)，但缺点是姿势不能控制。（PS: Comfyui自带的Redux相当强大，极难更改姿势信息，建议使用Redux Adv）</li>



<li>在Fill+Redux的基础上，增加Controlnet模块，控制姿势。</li>
</ul>



<p>工作流核心图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-5.png" alt="" class="wp-image-1024" srcset="https://0to60.top/wp-content/uploads/2025/09/image-5.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-5-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-5-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-5-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-5-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-5-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-5-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>Fill+Redux组合工作流采用后得到想要的多视角图片</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-6.png" alt="" class="wp-image-1025" srcset="https://0to60.top/wp-content/uploads/2025/09/image-6.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-6-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-6-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-6-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-6-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-6-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-6-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading"><strong>2.3 </strong>换脸</h3>



<p>2.2 生成的多视角图虽然整体内容非常相似，但在脸部特征上会有较大区别，所以会在此基础上，利用换脸工作流进行脸部特征处理，此时1.2步骤中得到的头部图就起到了比较好的作用。</p>



<p>换脸工作流较多，SD1,5/XL或Flux都有较为成熟的处理方法，本次采用的是Flux，整体思路为：</p>



<ul class="wp-block-list">
<li>将目标图片(需要换脸的图片)的头部区域截取下来。</li>



<li>将其Resize到100W像素左右(+-30%)，Flux在此大小上生成效果较好。</li>



<li>通过Fill重绘，对截取后图片的脸部区域进行重绘，此处同时采用了PuLID+Redux+Ace(Potrait)进行脸部特征提取。</li>



<li>将重绘后的图片还原到目标图片上。</li>
</ul>



<p>工作流核心图示如下：</p>



<p>重绘前的准备</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-7.png" alt="" class="wp-image-1026" srcset="https://0to60.top/wp-content/uploads/2025/09/image-7.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-7-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-7-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-7-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-7-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-7-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-7-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>Fill+Redux+Ace(Portrait)+PuLID应用：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-9-1024x576.png" alt="" class="wp-image-1028" srcset="https://0to60.top/wp-content/uploads/2025/09/image-9-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-9-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-9-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-9-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-9-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-9-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-9.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>将重绘后的脸部区域还原到目标图片中</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-10.png" alt="" class="wp-image-1029" srcset="https://0to60.top/wp-content/uploads/2025/09/image-10.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-10-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-10-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-10-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-10-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-10-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-10-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">三、丰富角色表情</h2>



<p>此步骤的目标为生成的多视角图进行表情处理，整体思路为：</p>



<ul class="wp-block-list">
<li>图片剪裁，只保留肩部以上区域。这样大多的素材会集中在头部。</li>



<li>表情移植</li>
</ul>



<h3 class="wp-block-heading">3.1 图片剪裁</h3>



<p>略，随便搭个工作流即能批量处理即可</p>



<h3 class="wp-block-heading">3.2 表情移植</h3>



<p>表情移植的一个准备工作是找到表情参考图片，方法有很多，这里列举一些：</p>



<ul class="wp-block-list">
<li>可以自己生成一些表情图，但是通过基本模型生成的人物表情不够丰富，可以寻找一些表情LoRa.</li>



<li>寻找一些现成的表情参考图，如搜索关键词：Expression Sheet.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="911" src="https://0to60.top/wp-content/uploads/2025/09/image-12.png" alt="" class="wp-image-1032" srcset="https://0to60.top/wp-content/uploads/2025/09/image-12.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-12-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-12-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-12-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-12-1536x729.png 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>有了表情参考图后，就可以利用livePortrait进行表情移植，值得一提的是，LP在不同风格（写实、3D、2D）的表情移植上不如人意，特别是眼睛的表达上，在此，经过大量实践，得到以下工作流。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-11.png" alt="" class="wp-image-1031" srcset="https://0to60.top/wp-content/uploads/2025/09/image-11.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-11-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-11-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-11-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-11-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-11-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-11-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">四、丰富背景</h2>



<p>丰富背景的方式有很多，Flux也可以利用Fill+Redux重绘的方式进行背景更换，本次采用的是IC-Light，截止写作为止，IC-Light本地部署只支持了SD15，效果上，会兼顾背景和光影效果。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-13.png" alt="" class="wp-image-1033" srcset="https://0to60.top/wp-content/uploads/2025/09/image-13.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-13-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-13-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-13-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-13-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-13-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-13-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>至此训练素材就生成完毕(生成过程中，其实也可以用InstantID保持脸部特征)</p>



<figure class="wp-block-video"><video height="906" style="aspect-ratio: 680 / 906;" width="680" controls src="https://0to60.top/wp-content/uploads/2025/09/20250915164626_rec_.mp4"></video></figure>



<h2 class="wp-block-heading">五、素材处理</h2>



<h3 class="wp-block-heading">5.1 图片大小的预处理</h3>



<p>由于本次生成图片都是768*768，比较符合训练需要，所以实践中赞未涉及。</p>



<p>略</p>



<h3 class="wp-block-heading"><strong>5.2 图片批量打标</strong></h3>



<p>很多模型训练工具都提供了打标功能，如Fluxgym、秋叶模型训练器等，但是都有其缺点，目前采用的是joy caption，注意：触发提示词尽量要用一个不常见的词，实践中用的Utwin其实并不可取。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-14.png" alt="" class="wp-image-1036" srcset="https://0to60.top/wp-content/uploads/2025/09/image-14.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-14-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-14-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-14-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-14-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-14-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-14-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading"><strong>六、模型训练</strong></h2>



<p>模型训练，可以随便选一个训练器，本次实践中采用的是秋叶模型训练器。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-15.png" alt="" class="wp-image-1037" srcset="https://0to60.top/wp-content/uploads/2025/09/image-15.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-15-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-15-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-15-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-15-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-15-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-15-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>主要参数：</p>



<ul class="wp-block-list">
<li>每张图片训练次数/epoch，没地方设置，但是实际是5次/img，当你开始训练时，会将图片路径下的所有图片打包到一个文件夹，以times_randomtext的形式进行命名，times即表示每张图片训练多少次。</li>



<li>epoch总数，实践设置为10</li>



<li>每2epoch保存一次模型</li>



<li>network_dims为32</li>



<li>学习率：1e-4</li>
</ul>



<p>这是第一次进行模型训练，有很多影响因素值得研究，仅这次而言。</p>



<ul class="wp-block-list">
<li>模型明显将发型及晚礼服肩带特征学习进去，这不在目标范围，明显和素材及打标方式强相关。</li>



<li>脸部特征其实并没有达到我想要的程度，不过在3D风格上有意想不到的效果</li>
</ul>



<p>实际生图效果如下：</p>



<figure class="wp-block-image size-full lightbox"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-16.png" alt="" class="wp-image-1038" srcset="https://0to60.top/wp-content/uploads/2025/09/image-16.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-16-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-16-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-16-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-16-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-16-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-16-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>至此，人物角色一致性的实战就到此告一段落，每个步骤都有多种方式实现，之后会尝试以视频的方式进行分享讲解，敬请期待。</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/">ComfyUI，一致性角色实战篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://0to60.top/wp-content/uploads/2025/09/20250915164626_rec_.mp4" length="4916764" type="video/mp4" />

			</item>
		<item>
		<title>ComfyUI，Flux入门总结篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Sun, 14 Sep 2025 03:46:59 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<category><![CDATA[FLUX]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=940</guid>

					<description><![CDATA[<p>引言 本篇文章的阅读前置条件(必须)&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，Flux入门总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本篇文章的阅读前置条件(必须)：</p>



<ul class="wp-block-list">
<li>需阅读<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931">《ComfyUI，SD基础总结篇》</a></li>
</ul>



<p>介绍内容包含：</p>



<ul class="wp-block-list">
<li>核心概念的理解</li>



<li>基本工作流及主要控制模块总结</li>
</ul>



<p>在<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931">《ComfyUI，SD基础总结篇》</a>中，我们已经了解了 Stable Diffusion 1.5 和 SDXL。它们就像拥有精湛技艺的<strong>“雕塑家”</strong>，从“混沌石料”中一步步雕刻出令人惊叹的作品，代表着当前主流的 AI 图像生成技术。</p>



<p></p>



<p>现在，是时候揭开 AI 绘画领域另一条前沿技术路径的面纱了——介绍 Flux。Flux 不再是 SDXL 的简单升级，它代表了图像生成方式上的一种架构创新，为 AI 绘画带来了新的可能性。它并非要取代 SDXL，而是提供了一个不同的、有潜力的技术方向。</p>



<h2 class="wp-block-heading">一、Flux核心理解</h2>



<p>虽然在底层技术原理上，会有较大的区别。但在应用层的理解上，我们仍然可以使用SD15/XL的理解<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931" target="_blank" rel="noreferrer noopener nofollow">《ComfyUI，SD基础总结篇》</a>，一句话：</p>



<p><strong><strong><strong>独具特色的雕塑家拿着原始石料在设计需求说明书的指引下按某种雕塑策略进行雕塑创作</strong></strong></strong>，同样的，也有以下核心概念。</p>



<ul class="wp-block-list">
<li><strong>雕塑家：</strong>Diffusion Model，每个雕塑家都有自己的特色，如：Flux1-dev，Flux1-fill-dev，Flux1-cany/depth-dev，Flux1-kontext等。</li>



<li><strong>原始石料：</strong>latent image，潜空间图像，SD1.5&amp;SDXL&amp;FLUX都是在潜空间进行图像生成的，至于为什么需要在潜空间中进行，最大原因是能极大的压缩空间，使得寻常硬件得以计算。总之，可以将其理解为创作所需的原始石料，以下如何获取原始石料的方式：
<ul class="wp-block-list">
<li>直接提供latent image，设定长宽。</li>



<li>将原始空间图像(寻常人眼感知的图片)通过VAE Encode的方式转换成潜空间图像。</li>
</ul>
</li>



<li><strong>作品去色/上色器</strong>：VAE Encode/Decode，将原始空间图像(人眼寻常感知的图片)转变成潜空间图像，这个过程也称为编码Encode，好比对雕塑成品进行去色，从而得到石料本体；同时也支持从潜空间图像转换成原始空间图像，这个过程称为Decode，好比对雕塑完毕的石料本体进行上色。这个去色和上色规则记录在VAE model中，即需要加载这个模型。</li>



<li><strong>设计需求说明书</strong>：Text Embedding(pos + neg)，用于指导雕塑家进行雕刻，雕塑家每次雕刻都需参照设计需求说明书。如何获得需求设计说明书：
<ul class="wp-block-list">
<li>通过一个转换器Text Embedding Encode将自然语言(人类语言，通常是英文)转换成雕塑家能理解的设计需求说明书，转换规则被记录在CLIP model中，即需要加载这个模型。</li>
</ul>
</li>



<li><strong>雕塑策略</strong>：调度器(scheduler)、去噪步数(steps)，采样器(sampler)。其好比雕刻策略，先制定整个雕刻计划(“路线图”)，决定了在整个生成过程需要去除的石料应该如何逐渐减少；再定义执行步骤数量，越多，耗费时间越长，就越细致；最后，基于路线图，在每一步中具体执行雕刻动作，计算并将多余的石料进行雕刻去除。</li>
</ul>



<h2 class="wp-block-heading">二、核心组件/概念理解</h2>



<p>主要介绍与SD15/XL有区别的一些组件和概念</p>



<ul class="wp-block-list">
<li><strong>DualCLIPLoader：</strong>和在SD15及XL中一样，Flux依然需要一个CLIP模型将自然语言转换成设计需求说明书，只是这里需要指定两个模型：CLIP_I和CLIP_T5。其设计思路与SDXL基本一致。</li>



<li><strong>LoadVae：</strong>与SD15和XL不一样的是，Flux在使用上会单独指定配套的VAE模型，一般名称叫ae.sft或者ae.safetensors.</li>



<li><strong>FluxGuidance：</strong>此处与SD15和XL有较大区别，对标其CFG。
<ul class="wp-block-list">
<li>Flux将引导条件融合到一起，不再区分positive和negative。（若使用ksampler，negative可接空条件）</li>



<li>在flux的实际使用中，不再使用cfg参数，取代而代之的是guidance参数，表示条件引导的程度。（若依然使用ksampler，将其设置为1，否则会产生糊图。）</li>



<li>guidance的参数值，在Flux1-dev中，一般设置为3.5，在Fill+redux组合使用中，一般在[30-50]中选择。</li>
</ul>
</li>



<li><strong>Redux：</strong>Flux提供的配套风格模型，就实际使用效果来说，其实就是通过Clip vision encode提取参考图的细节信息，再通过apply style model(redux模型作为规则转换器)并将其补充到<strong>设计需求说明书</strong>中，值得注意的是，redux的引导强度相当强烈，若使用原生自带的节点，基本上很难和CN及其他控制模块共同作用与图像生成，建议使用redux adv节点(实测有效)。</li>
</ul>



<h2 class="wp-block-heading"><strong>三、Flux工作流</strong>总结</h2>



<p>在实践探索过程中，FLUX在思路上和SD15/XL并没有什么大的差别。先学习了基本文生图/图生图/重绘之后，再加入一些其他控制模块，主要包括：</p>



<ul class="wp-block-list">
<li>LoRa：有一些比较有意思的LoRa，包括消除LoRa，图像编辑LoRa</li>



<li>IP-Adapter：对雕塑家进行增强训练(风格内容参考）</li>



<li>PuLID：对嗲苏佳进行增加训练(脸部参考)</li>



<li>Controlnet：对需求设计说明书进行补充说明</li>



<li>Redux：对需求设计说明书进行补充说明</li>
</ul>



<p>这样就能得到FlUX工作流的各种变体。</p>



<p>本部分主要介绍内容：</p>



<ul class="wp-block-list">
<li>FLUX.1-DEV基本工作流</li>



<li>FLUX.1-FILL-DEV基本工作流</li>



<li>Redux模块&amp;其余控制模块，和SD15/XL其实并为太大区别</li>
</ul>



<p>FLUX.1-cany/depth模型并无太多应用场景，此处主要对FLUX特有的模块进行进行介绍，另外对FLUX.1-DEV和FLUX.1-FILL-DEV模型进行工基本作流总结。</p>



<h3 class="wp-block-heading">3.2 FLUX.1-DEV 工作流</h3>



<h4 class="wp-block-heading">3.2.1 基本文生图</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-17-1024x576.png" alt="" class="wp-image-1058" srcset="https://0to60.top/wp-content/uploads/2025/09/image-17-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-17-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-17-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-17-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-17-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-17-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-17.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>和SD15/XL差别不大，主要区别在于：</p>



<ul class="wp-block-list">
<li>model/clip/vae的加载方式不一样：
<ul class="wp-block-list">
<li>model的加载节点是Load Diffusion Model</li>



<li>clip是dualcliploader，需要指定一个Clip_I和T5模型</li>



<li>vae也要单独指定与Flux配套的模型，ae.sft</li>
</ul>
</li>



<li>ksampler使用变化
<ul class="wp-block-list">
<li>中的cfg参数固定为1(该参数已经没啥用了)，设计需求说明书的遵循程度变为了另一个flux参数：guidance，越高，约束能力越强，反之越能发挥自由度。</li>



<li>由于Flux不再区分正负prompt，使用ksampler时，neg-prompt为空即可。</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">3.2.2 基本图生图</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-18-1024x576.png" alt="" class="wp-image-1060" srcset="https://0to60.top/wp-content/uploads/2025/09/image-18-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-18-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-18-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-18-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-18-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-18-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-18.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>没什么好说的，一般来说很少用到直接图生图的情况，目前就两种：</p>



<ul class="wp-block-list">
<li>放大图生图重绘增加细节</li>



<li>粗略的风格转绘</li>
</ul>



<h3 class="wp-block-heading">3.2 FLUX.1-FILL-DEV工作流</h3>



<h4 class="wp-block-heading">3.2.1 局部重绘（inpaint）</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-23-1024x576.png" alt="" class="wp-image-1075" srcset="https://0to60.top/wp-content/uploads/2025/09/image-23-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-23-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-23-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-23-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-23-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-23-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-23.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>大方向和SD15/XL类型，在使用上有以下差异：</p>



<ul class="wp-block-list">
<li>重绘时，是用FILL模型</li>



<li>基本工作流中，FluxXGuidance参数一般设置为30，也可以尝试其他的。</li>



<li>FILL模型的所有工作流中，都建议加入一个节点Differential Diffusion，它的核心作用正是<strong>参照一个已有的图像，从而让新生成的内容在风格、色彩或氛围上与之保持协调一致</strong>。</li>
</ul>



<h4 class="wp-block-heading">3.2.2 扩展绘制（outpaint）</h4>



<p>所谓的扩展绘制其实和重绘区别不大，只是不图片原有区域进行绘制，增加新的区域进行内容补充。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-24-1024x576.png" alt="" class="wp-image-1076" srcset="https://0to60.top/wp-content/uploads/2025/09/image-24-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-24-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-24-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-24-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-24-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-24-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-24.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">3.3 FLUX其他控制模块</h3>



<h4 class="wp-block-heading"><strong>3.3.1 一些好玩的LoRa</strong></h4>



<ul class="wp-block-list">
<li>消除LoRa，结合FILL模型，可以很好的消除不需要的元素，也能起到修复效果。</li>



<li>加速LoRa，能让出图步数控制在8步甚至4步内。</li>



<li>编辑LoRa，结合FILL模型，能实现图像编辑效果。具体在此不再细说</li>
</ul>



<h4 class="wp-block-heading">3.3.2 FLUX.1-Redux-DEV 模块</h4>



<p>Redux是Flux中特有的一个模块，使用工作流图示如下：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-19-1024x576.png" alt="" class="wp-image-1061" srcset="https://0to60.top/wp-content/uploads/2025/09/image-19-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-19-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-19-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-19-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-19-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-19-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-19.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>基于输入输出来看这个模块，其实就两个步骤：</p>



<ul class="wp-block-list">
<li>其实就是将图片信息抽取出来(CLIP Vision Encode)，CLIP Vision模型提供抽取规则。</li>



<li>再将抽取的信息通过一个转化器（Apply Style Model）增加到需求设计说明书中(Embedding)，Redux模型提供转换规则。</li>
</ul>



<p>就实践而言，Redux对整体的色彩风格、内容、结构都提取得比较到位，但是在一些细节特征上表现不太好(如脸部特征)。</p>



<h4 class="wp-block-heading">3.3.3 Flux IPAdapter模块</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-20-1024x576.png" alt="" class="wp-image-1072" srcset="https://0to60.top/wp-content/uploads/2025/09/image-20-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-20-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-20-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-20-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-20-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-20-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-20.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>使用上，和SD15/XL区别不大，需使用xlabs团队提供的x-flux-comfyui插件</p>



<p>基于输入输出来看这个模块，</p>



<ul class="wp-block-list">
<li>其实就是先基于CLIP Vision模型的规则将图片信息抽取出，在通过FLUX Adapter模型对雕塑家(diffusion model)进行训练。</li>
</ul>



<h4 class="wp-block-heading">3.3.4 PuLID模块</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-21-1024x576.png" alt="" class="wp-image-1073" srcset="https://0to60.top/wp-content/uploads/2025/09/image-21-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-21-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-21-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-21-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-21-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-21-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-21.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>对标FaceID，SDXL中也可使用。<br>使用FLUX版本需要结合PuLID-Flux-Enhanced插件使用。</p>



<p>用于提取脸部信息，并让雕塑家(diffusion model)增强训练学习.</p>



<h4 class="wp-block-heading">3.3.5 Controlnet</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-25-1024x576.png" alt="" class="wp-image-1077" srcset="https://0to60.top/wp-content/uploads/2025/09/image-25-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-25-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-25-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-25-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-25-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-25-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-25.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>没什么好说的，为设计需求说明书增加额外条件信息。</p>



<h2 class="wp-block-heading">三、最后</h2>



<p>Flux的的变体工作流基本上就是基本工作流+控制模块的灵性组合，后续有机会可能出视频或者直播进行细致讲解，敬请期待。</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，Flux入门总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
