Loading...
正在加载...
请稍候

LightRAG: 简单快速的检索增强生成

✨步子哥 (steper) 2025年11月29日 09:38
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LightRAG: 简单快速的检索增强生成</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Noto Sans SC', sans-serif; background-color: #f5f7fa; color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; background: linear-gradient(135deg, #e6f1ff 0%, #f0f4f8 100%); padding: 40px; position: relative; overflow: hidden; } .bg-accent { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(64, 169, 255, 0.1) 0%, rgba(64, 169, 255, 0) 70%); z-index: 0; } .bg-accent-1 { top: -100px; right: -100px; } .bg-accent-2 { bottom: -150px; left: -150px; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-size: 50px; font-weight: 700; color: #1a73e8; margin-bottom: 15px; line-height: 1.2; } .subtitle { font-size: 24px; color: #5f6368; max-width: 90%; margin: 0 auto; } .section { background-color: white; border-radius: 16px; padding: 25px; margin-bottom: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); position: relative; z-index: 1; } .section-title { display: flex; align-items: center; font-size: 28px; font-weight: 700; color: #1a73e8; margin-bottom: 15px; } .section-title .material-icons { margin-right: 10px; font-size: 32px; } .dilemma-container { display: flex; justify-content: space-between; margin-top: 20px; } .dilemma-card { width: 48%; padding: 20px; border-radius: 12px; background-color: #f8f9fa; } .dilemma-card h3 { font-size: 20px; margin-bottom: 10px; color: #1a73e8; } .dilemma-card p { font-size: 16px; color: #5f6368; } .dilemma-arrow { display: flex; align-items: center; justify-content: center; font-size: 24px; color: #ea4335; } .architecture { display: flex; flex-direction: column; gap: 20px; } .arch-step { display: flex; align-items: flex-start; gap: 15px; } .step-number { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background-color: #1a73e8; color: white; font-weight: 700; flex-shrink: 0; } .step-content { flex-grow: 1; } .step-content h3 { font-size: 18px; margin-bottom: 5px; color: #1a73e8; } .step-content p { font-size: 16px; color: #5f6368; } .comparison-table { width: 100%; border-collapse: collapse; margin-top: 15px; } .comparison-table th, .comparison-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e0e0e0; } .comparison-table th { background-color: #f1f3f4; font-weight: 500; color: #1a73e8; } .highlight { background-color: #e8f0fe; padding: 2px 5px; border-radius: 4px; font-weight: 500; } .advantage { display: flex; align-items: center; margin-bottom: 10px; } .advantage .material-icons { color: #34a853; margin-right: 10px; } .use-cases { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; } .use-case { flex: 1 0 30%; background-color: #f1f3f4; padding: 15px; border-radius: 8px; display: flex; align-items: center; } .use-case .material-icons { color: #1a73e8; margin-right: 10px; } .use-case p { font-size: 16px; color: #5f6368; } .image-container { text-align: center; margin: 20px 0; } .image-container img { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .dual-retrieval { display: flex; justify-content: space-between; margin-top: 20px; gap: 20px; } .retrieval-level { flex: 1; padding: 15px; border-radius: 8px; background-color: #f8f9fa; } .retrieval-level h3 { font-size: 18px; margin-bottom: 10px; color: #1a73e8; display: flex; align-items: center; } .retrieval-level h3 .material-icons { margin-right: 8px; } .retrieval-level p { font-size: 16px; color: #5f6368; } </style> </head> <body> <div class="poster-container"> <div class="bg-accent bg-accent-1"></div> <div class="bg-accent bg-accent-2"></div> <header class="header"> <h1 class="title">LightRAG: 简单快速的检索增强生成</h1> <p class="subtitle">跳出"二选一"困境,同时具备图谱的深度和向量检索的速度</p> </header> <section class="section"> <h2 class="section-title"> <i class="material-icons">help_outline</i> RAG系统的两难问题 </h2> <div class="dilemma-container"> <div class="dilemma-card"> <h3>传统RAG</h3> <p>使用简单向量检索,成本低、速度快,但答案常常碎片化,无法理解复杂关联</p> </div> <div class="dilemma-arrow"> <i class="material-icons">compare_arrows</i> </div> <div class="dilemma-card"> <h3>GraphRAG</h3> <p>能理解数据里复杂的关联,但构建成本高昂,更新困难,检索速度慢</p> </div> </div> </section> <section class="section"> <h2 class="section-title"> <i class="material-icons">lightbulb</i> LightRAG的核心思想 </h2> <p>LightRAG提出了一种轻量级的思路,核心不是去建造一个庞大臃肿的知识图谱,而是用一种更巧妙、更经济的方式,让系统同时具备图谱的深度和向量检索的速度。</p> <div class="image-container"> <img src="https://sfile.chatglm.cn/moeSlide/image/fd/fd8087af.jpg" alt="LightRAG架构图"> </div> <div class="dual-retrieval"> <div class="retrieval-level"> <h3><i class="material-icons">filter_1</i> 低层检索</h3> <p>聚焦实体属性与直接关系,精确检索特定节点或边的信息</p> </div> <div class="retrieval-level"> <h3><i class="material-icons">filter_2</i> 高层检索</h3> <p>聚合跨实体的全局主题,提供对更高层次概念和摘要的洞察</p> </div> </div> </section> <section class="section"> <h2 class="section-title"> <i class="material-icons">architecture</i> LightRAG的架构设计 </h2> <div class="architecture"> <div class="arch-step"> <div class="step-number">1</div> <div class="step-content"> <h3>实体和关系提取</h3> <p>使用LLM从文本块中提取实体(节点)和关系(边)</p> </div> </div> <div class="arch-step"> <div class="step-number">2</div> <div class="step-content"> <h3>LLM生成键值对</h3> <p>为每个实体和关系生成文本键值对,键是检索索引词,值是总结性文本</p> </div> </div> <div class="arch-step"> <div class="step-number">3</div> <div class="step-content"> <h3>图谱去重</h3> <p>合并不同文本块中的相同实体和关系,减小图规模</p> </div> </div> <div class="arch-step"> <div class="step-number">4</div> <div class="step-content"> <h3>增量更新</h3> <p>新文档独立处理后与主图谱合并,无需重建整个索引</p> </div> </div> </div> </section> <section class="section"> <h2 class="section-title"> <i class="material-icons">compare</i> LightRAG vs GraphRAG </h2> <table class="comparison-table"> <tr> <th>比较维度</th> <th>LightRAG</th> <th>GraphRAG</th> </tr> <tr> <td>检索成本</td> <td><span class="highlight">极低 (< 100 token)</span></td> <td>高昂 (610,000 token)</td> </tr> <tr> <td>更新方式</td> <td><span class="highlight">增量更新</span></td> <td>全量重建</td> </tr> <tr> <td>检索速度</td> <td><span class="highlight">快速</span></td> <td>较慢</td> </tr> <tr> <td>答案多样性</td> <td><span class="highlight">高 (76.4% vs 23.6%)</span></td> <td>低</td> </tr> <tr> <td>答案全面性</td> <td><span class="highlight">高 (83.6% vs 16.4%)</span></td> <td>低</td> </tr> </table> <div class="image-container"> <img src="https://sfile.chatglm.cn/moeSlide/image/1e/1edc2493.jpg" alt="LightRAG流程图"> </div> </section> <section class="section"> <h2 class="section-title"> <i class="material-icons">stars</i> LightRAG的优势 </h2> <div class="advantage"> <i class="material-icons">check_circle</i> <p>检索成本降低99%,同时保持高质量的答案生成</p> </div> <div class="advantage"> <i class="material-icons">check_circle</i> <p>支持增量更新,适合动态数据环境</p> </div> <div class="advantage"> <i class="material-icons">check_circle</i> <p>双层检索机制,兼顾细节与全局信息</p> </div> <div class="advantage"> <i class="material-icons">check_circle</i> <p>在多个评估维度上全面优于现有方法</p> </div> </section> <section class="section"> <h2 class="section-title"> <i class="material-icons">category</i> 适用场景 </h2> <div class="use-cases"> <div class="use-case"> <i class="material-icons">update</i> <p>动态数据环境</p> </div> <div class="use-case"> <i class="material-icons">speed</i> <p>高效检索需求</p> </div> <div class="use-case"> <i class="material-icons">hub</i> <p>跨领域综合查询</p> </div> <div class="use-case"> <i class="material-icons">question_answer</i> <p>智能客服系统</p> </div> <div class="use-case"> <i class="material-icons">analytics</i> <p>企业知识管理</p> </div> <div class="use-case"> <i class="material-icons">school</i> <p>学术研究辅助</p> </div> </div> </section> </div> </body> </html>

讨论回复

0 条回复

还没有人回复,快来发表你的看法吧!