<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>编程语言 - 分类 - cfanzp学习笔记</title>
    <link>https://cfanzp008.github.io/categories/language/</link>
    <description>编程语言 - 分类 - cfanzp学习笔记</description>
    <generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>cfan.zp@qq.com (cfanzp)</managingEditor>
      <webMaster>cfan.zp@qq.com (cfanzp)</webMaster><lastBuildDate>Thu, 02 Apr 2026 10:00:00 &#43;0800</lastBuildDate><atom:link href="https://cfanzp008.github.io/categories/language/" rel="self" type="application/rss+xml" /><item>
  <title>RAG 深度解读：检索增强生成技术原理与实践</title>
  <link>https://cfanzp008.github.io/rag-deep-analysis/</link>
  <pubDate>Thu, 02 Apr 2026 10:00:00 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/rag-deep-analysis/</guid>
  <description><![CDATA[RAG 深度解读：检索增强生成技术原理与实践 背景与问题 大型语言模型（LLM）在生成代码、总结文章、回答问题等方面表现出色，但存在一个根本性限制：它们只知道训练数据中的信息。
训练数据是有限的，且存在以下问题：
知识截止日期（Knowledge Cutoff）：模型的知识停留在训练数据收集的时间点，无法获取实时信息 领域知识缺失：通用模型缺乏特定领域的专业知识，如企业内部文档、产品规格等 幻觉问题（Hallucination）：模型可能生成看似合理但实际错误的内容 训练成本高昂：想让模型学习新知识，需要重新训练或微调，成本巨大 RAG（Retrieval-Augmented Generation，检索增强生成）正是为解决这些问题而设计的架构。
什么是 RAG RAG 是一种优化 LLM 性能的架构，通过连接外部知识库，让模型在生成响应时能够访问最新的、领域特定的、权威的数据。
RAG 这个名称本身就描述了它的工作流程：
Retrieval（检索）：从外部知识库查询相关信息 Augmented（增强）：将检索到的信息添加到提示中作为上下文 Generation（生成）：基于增强后的提示生成最终响应 RAG 核心流程 RAG 系统遵循五阶段流程：
1 用户提交问题 → 检索知识库 → 返回相关信息 → 构建增强提示 → LLM生成响应 阶段详解 用户提交提示（Prompt）：用户提出问题或请求 信息检索（Retrieval）：检索模型查询知识库，获取相关数据 信息返回：从知识库返回相关信息到集成层 提示增强（Augmentation）：RAG 系统将原始用户提示与检索到的上下文结合，构建增强提示 生成响应（Generation）：LLM 基于增强后的提示生成最终响应，返回给用户 RAG 系统核心组件 RAG 系统包含四个主要组件：
1. 知识库（Knowledge Base） 知识库是 RAG 系统的外部数据仓库，可以包含多种数据源：
PDF 文档 文本文件、指南 网站内容 音频文件 数据库记录 知识库中的数据需要经过**向量化（Embedding）**处理，转换为数值向量表示，才能进行语义搜索。
2. 检索器（Retriever） 检索器是执行语义搜索的 AI 模型，其工作流程：
将用户查询转换为向量表示（使用相同的嵌入模型） 在知识库中搜索相似的向量 返回最相关的文档片段 3.]]></description>
</item>
<item>
  <title>go build提示timeout如何解决？</title>
  <link>https://cfanzp008.github.io/go-build-timeout/</link>
  <pubDate>Thu, 15 Jun 2023 22:30:44 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/go-build-timeout/</guid>
  <description><![CDATA[]]></description>
</item>
<item>
  <title>Go语言中pprof的使用</title>
  <link>https://cfanzp008.github.io/go-pprof/</link>
  <pubDate>Fri, 21 Apr 2023 14:35:37 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/go-pprof/</guid>
  <description><![CDATA[]]></description>
</item>
<item>
  <title>使用python开发一个简单的邮件发送脚本</title>
  <link>https://cfanzp008.github.io/python_mail/</link>
  <pubDate>Mon, 17 Apr 2023 17:32:19 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/python_mail/</guid>
  <description><![CDATA[]]></description>
</item>
<item>
  <title>lua-pbc(lua的protobuf库)如何使用？</title>
  <link>https://cfanzp008.github.io/lua-pbc/</link>
  <pubDate>Tue, 30 Aug 2022 08:36:15 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/lua-pbc/</guid>
  <description><![CDATA[lua-pbc(lua的protobuf库)如何使用？ lua-pbc是什么? lua-pbc,即lua protocol buffer fro c,是云风写的一个给lua使用的protobuf封包解包的库,如果你想用skynet来写游戏等服务端应用，lua-pbc是不错的选择。
lua-pbc github地址为: https://github.com/cloudwu/pbc
关于pbc的设计，大家可以看一下云风的博客: https://blog.codingnow.com/2011/12/protocol_buffers_for_c.html
lua-pbc如何使用？ 这里有几个接个api需要熟悉一下
编写protobuf的proto文件 User.proto
1 2 3 4 package tutorial; message User { optional string name = 1; } 引入模块protobuf
1 local pb = require &#34;protobuf&#34; 注册文件
1 pb.register_file &#34;User.pb&#34; encode
1 2 3 4 local msg_table = { name = &#34;test1&#34; } pb.encode(&#34;tutorial.User&#34;,msg_table}, decode
1 local msg_table = pb.decode(&#34;tutorial.Person&#34;, buf) 使用感受 lua-pbc使用了很长一段时间，官方skynte升级支持lua5.4以后，pbc还是可以正常工作的。 pbc的接口设计是比较简洁的，用起来也非常方便。想深入了解的同学，建议去看看源码。
参考 pbc: https://github.com/cloudwu/pbc pbc binding lua: https://github.]]></description>
</item>
<item>
  <title>GOPROXY配置</title>
  <link>https://cfanzp008.github.io/goproxy/</link>
  <pubDate>Tue, 23 Aug 2022 19:50:28 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/goproxy/</guid>
  <description><![CDATA[GOPROXY配置 最近在使用hugo时需要依赖go环境在安装依赖包的时候，速度很慢，之前都是配置外网环境解决的。其实go环境有国内的替代域名资源可以使用。 在go环境下，需要下载依赖包的时候，如果没有外网环境的话，很多包默认是无法下载下来的，解决办法就是修改一下GOPROXY的配置
1 go env -w GOPROXY=https://goproxy.io,direct ]]></description>
</item>
<item>
  <title>lua面向对象编程</title>
  <link>https://cfanzp008.github.io/lua-new/</link>
  <pubDate>Mon, 08 Aug 2022 09:18:02 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/lua-new/</guid>
  <description><![CDATA[lua面向对象编程 对象定义: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 local logger = require &#34;common.]]></description>
</item>
<item>
  <title>Lua开发手册</title>
  <link>https://cfanzp008.github.io/lua-man/</link>
  <pubDate>Sun, 31 Jul 2022 09:47:48 &#43;0800</pubDate>
  <author>cfanzp</author>
  <guid>https://cfanzp008.github.io/lua-man/</guid>
  <description><![CDATA[lua5.3开发手册 https://cloud.tencent.com/developer/doc/1141 云风翻译:http://cloudwu.github.io/lua53doc/manual.html lua5.4开发手册 官网英文版:http://www.lua.org/manual/5.4/manual.html lua匹配库Lpeg 官网: http://www.inf.puc-rio.br/~roberto/lpeg/ 帮助: https://www.jianshu.com/p/e8e1c5abfdbb tutorial: https://lua-users.org/wiki/LpegTutorial luasocket github: https://github.com/lunarmodules/luasocket 使用demo: https://blog.csdn.net/h1023417614/article/details/52297408 lua md5 github: https://github.com/keplerproject/md5 jemalloc http://jemalloc.net/ ]]></description>
</item>
<item>
  <title>rust语言基础</title>
  <link>https://cfanzp008.github.io/language-rust/</link>
  <pubDate>Sat, 30 Jul 2022 19:44:42 &#43;0800</pubDate>
  <author>cfanzp</author>
  <guid>https://cfanzp008.github.io/language-rust/</guid>
  <description><![CDATA[rust语言基础 rust语言的优点 c/c++ 性能好，但是类型系统和内存都不太安全。 java/c#, 有GC,内存安全有很多优秀的特性，但性能不行。 Rust:安全，无需GC,易于维护 rust的缺点 难学 Rust特别擅长的领域 高性能Web Service WebAssemble 命令行工具 网络编程 嵌入式设备 系统编程 Rust的用户和案例 Google:新操作系统Fuschia,Rust:30% Amazon：基于Linux开发的直接可以在裸机、虚拟机上运行容器的操作系统 System76：纯Rust开发了下一代安全操作系统Redox 蚂蚁金服:库操作系统Occlum 斯坦福和密歇根大学:嵌入式实时操作系统，应用于Google的加密产品。 微软:Rust重写Windows系统中的一些低级组件 微软:WinRT/Rust项目 Dropbox、Yelp、LINE、npm、百度、华为、Deno等 注意 Rust有很多独有的概念，他们和现在大多主流语言都不通。 学习Rust必须从基础概念一步一步学，否则会懵。 参考教材 Rust权威指南(The rust programming language) Rust安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 curl --proto &#39;=https&#39; --tlsv1.]]></description>
</item>
</channel>
</rss>
