[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-towardsai--ragbook-notebooks":3,"tool-towardsai--ragbook-notebooks":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":81,"owner_twitter":82,"owner_website":83,"owner_url":84,"languages":85,"stars":90,"forks":91,"last_commit_at":92,"license":80,"difficulty_score":93,"env_os":94,"env_gpu":95,"env_ram":94,"env_deps":96,"category_tags":109,"github_topics":110,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":119,"updated_at":120,"faqs":121,"releases":122},3769,"towardsai\u002Fragbook-notebooks","ragbook-notebooks","Repository for the \"Building LLMs for Production\" book by Towards AI.","ragbook-notebooks 是 Towards AI 出版的《Building LLMs for Production》一书的官方配套代码库，汇集了书中所有章节的可交互 Jupyter Notebook。它旨在解决开发者在大语言模型（LLM）从理论走向生产落地过程中遇到的实践难题，通过提供结构化的代码示例，帮助用户跨越从理解架构到构建应用的鸿沟。\n\n这套资源非常适合希望系统掌握 RAG（检索增强生成）技术、提示工程及应用开发的 AI 工程师、研究人员和技术爱好者。内容覆盖全面，从基础的 Transformer 架构解析，到使用 LangChain 和 LlamaIndex 构建新闻摘要、YouTube 视频总结等实际应用，再到高级的 RAG 优化策略、知识图谱构建及输出质量评估。\n\n其独特亮点在于“循序渐进”的实战导向：不仅演示了如何调用模型，更深入探讨了文本分割、链式调用（Chains）、自我批判机制（Self-Critique）以及利用 LangSmith 进行监控等生产级关键技巧。所有笔记均支持在 Google Colab 中直接运行，让用户能够边学边改，快速验证想法，是","ragbook-notebooks 是 Towards AI 出版的《Building LLMs for Production》一书的官方配套代码库，汇集了书中所有章节的可交互 Jupyter Notebook。它旨在解决开发者在大语言模型（LLM）从理论走向生产落地过程中遇到的实践难题，通过提供结构化的代码示例，帮助用户跨越从理解架构到构建应用的鸿沟。\n\n这套资源非常适合希望系统掌握 RAG（检索增强生成）技术、提示工程及应用开发的 AI 工程师、研究人员和技术爱好者。内容覆盖全面，从基础的 Transformer 架构解析，到使用 LangChain 和 LlamaIndex 构建新闻摘要、YouTube 视频总结等实际应用，再到高级的 RAG 优化策略、知识图谱构建及输出质量评估。\n\n其独特亮点在于“循序渐进”的实战导向：不仅演示了如何调用模型，更深入探讨了文本分割、链式调用（Chains）、自我批判机制（Self-Critique）以及利用 LangSmith 进行监控等生产级关键技巧。所有笔记均支持在 Google Colab 中直接运行，让用户能够边学边改，快速验证想法，是将大模型技术转化为实际生产力的优质学习指南。","# ragbook-notebooks\nThis is a repository gathering all the notebooks for the Towards AI RAG book.\n\n## Chapter 2\n- [Transformers_Architectures.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2002%20-%20Transformers_Architectures.ipynb)\n- [Understanding_Transformer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2002%20-%20Understanding_Transformer.ipynb)\n\n## Chapter 4\n- [Intro_to_Prompt_Engineering_Tips_and_Tricks.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2004%20-%20Intro_to_Prompt_Engineering_Tips_and_Tricks.ipynb)\n\n## Chapter 5\n- [Building_Applications_Powered_by_LLMs_with_LangChain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Building_Applications_Powered_by_LLMs_with_LangChain.ipynb)\n- [Build_a_News_Articles_Summarizer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Build_a_News_Articles_Summarizer.ipynb)\n- [LlamaIndex_Introduction.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20LlamaIndex_Introduction.ipynb)\n\n## Chapter 6\n- [Using_Prompt_Templates.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Using_Prompt_Templates.ipynb)\n- [Getting_the_Best_of_Few_Shot_Prompts_and_Example_Selectors.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Getting_the_Best_of_Few_Shot_Prompts_and_Example_Selectors.ipynb)\n- [Managing_Outputs_with_Output_Parsers.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Managing_Outputs_with_Output_Parsers.ipynb)\n- [Improving_Our_News_Articles_Summarizer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Improving_Our_News_Articles_Summarizer.ipynb)\n- [Creating_Knowledge_Graphs_from_Textual_Data_Unveiling_Hidden_Connections.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Creating_Knowledge_Graphs_from_Textual_Data_Unveiling_Hidden_Connections.ipynb)\n\n## Chapter 7\n- [What_are_Text_Splitters_and_Why_They_are_Useful_.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20What_are_Text_Splitters_and_Why_They_are_Useful_.ipynb)\n- [Chains_and_Why_They_Are_Used.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Chains_and_Why_They_Are_Used.ipynb)\n- [Create_a_YouTube_Video_Summarizer_Using_Whisper_and_LangChain_.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Create_a_YouTube_Video_Summarizer_Using_Whisper_and_LangChain_.ipynb)\n- [Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain.ipynb)\n- [Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain_Example.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain_Example.ipynb)\n\n## Chapter 8\n- [Mastering_Advanced_RAG.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20Mastering_Advanced_RAG.ipynb)\n- [RAG_Metrics&Evaluation.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20RAG_Metrics%26Evaluation.ipynb)\n- [LangSmith_Introduction.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20LangSmith_Introduction.ipynb)\n\n## Chapter 9\n- [Building Agents for Analysis Report Creation](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Building%20Agents%20for%20Analysis%20Report%20Creation.ipynb)\n- [Query and Zummarize a DB with LlamaIndex](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Query%20and%20Zummarize%20a%20DB%20with%20LlamaIndex.ipynb)\n- [Building Agents with OpenAI Assistants](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Building%20Agents%20with%20OpenAI%20Assistants.ipynb)\n- [Using_AutoGPT_with_LangChain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Using_AutoGPT_with_LangChain.ipynb)\n- [LlamaIndex_RAG_AGENT.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20LlamaIndex_RAG_AGENT.ipynb)\n- [MultiModal_Fincance_+_DeepMemory.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20MultiModal_Fincance_%2B_DeepMemory.ipynb)\n\n## Chapter 10\n- [FineTuning_a_LLM_LIMA_CPU.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_LIMA_CPU.ipynb)\n- [FineTuning_a_LLM_Financial_Sentiment_CPU.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_Financial_Sentiment_CPU.ipynb)\n- [Create_Dataset_For_Cohere_Fine_Tuning.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20Create_Dataset_For_Cohere_Fine_Tuning.ipynb)\n- [Fine_Tuning_using_Cohere_for_Medical_Data.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20Fine_Tuning_using_Cohere_for_Medical_Data.ipynb)\n- [FineTuning_a_LLM_QLoRA.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_QLoRA.ipynb)\n- [FineTuning_Reward_Model.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_Reward_Model.ipynb)\n- [FineTune_RLHF.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTune_RLHF.ipynb)\n\n## Chapter 11\n- [Benchmark_Inference.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2011%20-%20Benchmark_Inference.ipynb)\n","# ragbook-notebooks\n这是一个收集 Towards AI RAG 书籍所有笔记本的仓库。\n\n## 第2章\n- [Transformers_Architectures.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2002%20-%20Transformers_Architectures.ipynb)\n- [Understanding_Transformer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2002%20-%20Understanding_Transformer.ipynb)\n\n## 第4章\n- [Intro_to_Prompt_Engineering_Tips_and_Tricks.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2004%20-%20Intro_to_Prompt_Engineering_Tips_and_Tricks.ipynb)\n\n## 第5章\n- [Building_Applications_Powered_by_LLMs_with_LangChain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Building_Applications_Powered_by_LLMs_with_LangChain.ipynb)\n- [Build_a_News_Articles_Summarizer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Build_a_News_Articles_Summarizer.ipynb)\n- [LlamaIndex_Introduction.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20LlamaIndex_Introduction.ipynb)\n\n## 第6章\n- [Using_Prompt_Templates.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Using_Prompt_Templates.ipynb)\n- [Getting_the_Best_of_Few_Shot_Prompts_and_Example_Selectors.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Getting_the_Best_of_Few_Shot_Prompts_and_Example_Selectors.ipynb)\n- [Managing_Outputs_with_Output_Parsers.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Managing_Outputs_with_Output_Parsers.ipynb)\n- [Improving_Our_News_Articles_Summarizer.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Improving_Our_News_Articles_Summarizer.ipynb)\n- [Creating_Knowledge_Graphs_from_Textual_Data_Unveiling_Hidden_Connections.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2006%20-%20Creating_Knowledge_Graphs_from_Textual_Data_Unveiling_Hidden_Connections.ipynb)\n\n## 第7章\n- [What_are_Text_Splitters_and_Why_They_are_Useful_.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20What_are_Text_Splitters_and_Why_They_are_Useful_.ipynb)\n- [Chains_and_Why_They_Are_Used.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Chains_and_Why_They_Are_Used.ipynb)\n- [Create_a_YouTube_Video_Summarizer_Using_Whisper_and_LangChain_.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Create_a_YouTube_Video_Summarizer_Using_Whisper_and_LangChain_.ipynb)\n- [Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain.ipynb)\n- [Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain_Example.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2007%20-%20Guarding_Against_Undesirable_Outputs_with_the_Self_Critique_Chain_Example.ipynb)\n\n## 第8章\n- [Mastering_Advanced_RAG.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20Mastering_Advanced_RAG.ipynb)\n- [RAG_Metrics&Evaluation.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20RAG_Metrics%26Evaluation.ipynb)\n- [LangSmith_Introduction.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2008%20-%20LangSmith_Introduction.ipynb)\n\n## 第9章\n- [Building Agents for Analysis Report Creation](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Building%20Agents%20for%20Analysis%20Report%20Creation.ipynb)\n- [Query and Zummarize a DB with LlamaIndex](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Query%20and%20Zummarize%20a%20DB%20with%20LlamaIndex.ipynb)\n- [Building Agents with OpenAI Assistants](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Building%20Agents%20with%20OpenAI%20Assistants.ipynb)\n- [Using_AutoGPT_with_LangChain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20Using_AutoGPT_with_LangChain.ipynb)\n- [LlamaIndex_RAG_AGENT.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20LlamaIndex_RAG_AGENT.ipynb)\n- [MultiModal_Fincance_+_DeepMemory.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2009%20-%20MultiModal_Fincance_%2B_DeepMemory.ipynb)\n\n## 第10章\n- [FineTuning_a_LLM_LIMA_CPU.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_LIMA_CPU.ipynb)\n- [FineTuning_a_LLM_Financial_Sentiment_CPU.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_Financial_Sentiment_CPU.ipynb)\n- [Create_Dataset_For_Cohere_Fine_Tuning.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20Create_Dataset_For_Cohere_Fine_Tuning.ipynb)\n- [Fine_Tuning_using_Cohere_for_Medical_Data.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20Fine_Tuning_using_Cohere_for_Medical_Data.ipynb)\n- [FineTuning_a_LLM_QLoRA.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_a_LLM_QLoRA.ipynb)\n- [FineTuning_Reward_Model.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTuning_Reward_Model.ipynb)\n- [FineTune_RLHF.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2010%20-%20FineTune_RLHF.ipynb)\n\n## 第11章\n- [Benchmark_Inference.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2011%20-%20Benchmark_Inference.ipynb)","# ragbook-notebooks 快速上手指南\n\n`ragbook-notebooks` 是 Towards AI RAG 书籍的配套代码仓库，汇集了从 Transformer 架构、提示工程、LangChain\u002FLlamaIndex 应用开发到高级 RAG、Agent 构建及大模型微调的全流程 Jupyter Notebook 示例。所有笔记均基于 Google Colab 运行，无需本地配置复杂环境即可立即开始学习。\n\n## 环境准备\n\n本项目主要依赖 **Google Colab** 云端环境，推荐直接使用浏览器访问，无需本地安装 Python 或 GPU 驱动。\n\n- **系统要求**：现代浏览器（Chrome, Edge, Firefox 等）\n- **账号要求**：Google 账号（用于登录 Colab 并保存副本）\n- **前置依赖**：无（Colab 预装了 PyTorch, TensorFlow, LangChain, LlamaIndex, Transformers 等主流 AI 库）\n- **网络建议**：由于资源托管在 GitHub 和 Google Colab，国内用户访问可能较慢。建议使用稳定的网络环境，或在本地搭建 Jupyter Lab 环境后下载 `.ipynb` 文件运行（需自行配置 Python 3.9+ 环境及对应依赖）。\n\n## 安装步骤\n\n本仓库无需传统“安装”，只需在 Google Colab 中打开对应的 Notebook 并创建副本即可。\n\n### 方式一：直接在 Google Colab 中运行（推荐）\n\n1. 访问 [ragbook-notebooks GitHub 仓库](https:\u002F\u002Fgithub.com\u002Ftowardsai\u002Fragbook-notebooks)。\n2. 点击任意章节下的 `.ipynb` 链接（例如：[Chapter 05 - Building Applications Powered by LLMs with LangChain](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Building_Applications_Powered_by_LLMs_with_LangChain.ipynb)）。\n3. 页面加载后，点击右上角 **\"在 Colab 中打开\" (Open in Colab)**。\n4. 进入 Colab 后，点击 **文件 (File)** > **在 Drive 中保存副本 (Save a copy in Drive)**，以便编辑和运行。\n\n### 方式二：本地运行（可选）\n\n若需在本地运行，请执行以下命令：\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Ftowardsai\u002Fragbook-notebooks.git\ncd ragbook-notebooks\n\n# 创建虚拟环境（可选）\npython -m venv ragbook-env\nsource ragbook-env\u002Fbin\u002Factivate  # Linux\u002FmacOS\n# ragbook-env\\Scripts\\activate   # Windows\n\n# 安装基础依赖（根据具体 Notebook 需求补充）\npip install torch transformers langchain llama-index jupyter notebook\n```\n\n> 注意：不同 Notebook 可能需要额外安装特定库（如 `cohere`, `auto-gpt`, `whisper` 等），请在运行前查看对应 Notebook 顶部的依赖安装单元格。\n\n## 基本使用\n\n以下以 **第 5 章：使用 LangChain 构建 LLM 应用** 为例，演示最简使用流程：\n\n1. 在 Colab 中打开笔记本：  \n   [Building_Applications_Powered_by_LLMs_with_LangChain.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftowardsai\u002Fragbook-notebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002FChapter%2005%20-%20Building_Applications_Powered_by_LLMs_with_LangChain.ipynb)\n\n2. 依次运行每个代码单元格（按 `Shift + Enter`）。首个单元格通常为环境变量设置：\n\n```python\nimport os\nos.environ[\"OPENAI_API_KEY\"] = \"your-openai-api-key-here\"\n```\n\n> ⚠️ 请将 `\"your-openai-api-key-here\"` 替换为你自己的 OpenAI API 密钥。部分示例也支持其他模型后端（如 Hugging Face、Cohere），请按注释修改。\n\n3. 运行后续单元格，即可看到 LangChain 链式调用、文档加载、向量存储及问答生成的完整流程输出。\n\n4. 尝试修改提示词（Prompt）或输入文本，观察模型响应变化，深入理解 RAG 与应用构建逻辑。\n\n---\n\n通过逐个章节实践这些 Notebook，你将系统掌握从基础 Transformer 原理到生产级 RAG 系统与 Agent 开发的完整技能树。建议按章节顺序学习，并结合官方书籍深化理解。","某初创公司的算法团队正急于构建一个能自动总结长篇新闻并提取关键实体关系的智能分析系统，以辅助投资决策。\n\n### 没有 ragbook-notebooks 时\n- 团队成员需从零摸索 Transformer 架构原理，花费数周时间复现基础代码，严重拖慢项目启动进度。\n- 在构建新闻摘要功能时，缺乏成熟的提示词工程（Prompt Engineering）模板，导致模型输出不稳定，经常产生幻觉或格式错误。\n- 面对复杂的长文本处理，不知道如何选择合适的文本分割策略（Text Splitters）和构建知识图谱，只能凭经验盲目尝试，效果甚微。\n- 缺少系统的评估指标和自批判链（Self-Critique Chain）示例，无法有效量化模型性能或拦截不良输出，上线风险极高。\n\n### 使用 ragbook-notebooks 后\n- 直接复用书中第 2 章的 Transformer 架构笔记，团队在半天内就完成了底层模型的理解与环境搭建，迅速进入应用开发阶段。\n- 依托第 4 章和第 6 章的提示词技巧与输出解析器示例，快速优化了新闻摘要的指令，使输出格式标准化且准确率大幅提升。\n- 参考第 7 章和第 8 章关于文本分割、链式调用及高级 RAG 的实战代码，成功构建了包含隐藏实体关系的知识图谱，实现了深度分析。\n- 利用内置的评估指标笔记本和自批判链案例，建立了自动化测试流程，有效过滤了错误信息，确保了系统在生产环境中的可靠性。\n\nragbook-notebooks 将抽象的大模型理论转化为可立即运行的生产级代码，帮助团队从“盲目试错”转向“高效落地”，极大缩短了从概念验证到产品上线的周期。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftowardsai_ragbook-notebooks_563fe54a.png","towardsai","Towards AI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ftowardsai_613ce690.png","The leading AI community and content platform focused on making AI accessible to all.",null,"pub@towardsai.net","towards_ai","https:\u002F\u002Ftowardsai.net","https:\u002F\u002Fgithub.com\u002Ftowardsai",[86],{"name":87,"color":88,"percentage":89},"Jupyter Notebook","#DA5B0B",100,536,198,"2026-04-03T18:01:49",1,"未说明","部分笔记本（如第 10 章微调任务）可能需要 GPU，具体型号和显存未说明；其他章节可能在 CPU 或 Colab 免费层级运行",{"notes":97,"python":94,"dependencies":98},"该项目主要为 Jupyter Notebook 集合，设计用于在 Google Colab 环境中运行。用户可直接通过提供的链接在 Colab 中打开并执行，无需本地配置环境。若需本地运行，需自行安装上述依赖库。第 10 章涉及大模型微调（LIMA, QLoRA, RLHF），对计算资源要求较高，建议使用高性能 GPU 环境。",[99,100,101,102,103,104,105,106,107,108],"transformers","langchain","llama-index","torch","openai","whisper","auto-gpt","cohere","datasets","accelerate",[15,13,26,14],[111,112,113,100,114,115,116,117,118],"agent","agents","ai","llamaindex","llm","llms","python","rag","2026-03-27T02:49:30.150509","2026-04-06T08:45:30.430596",[],[]]