---
title: "跨部门知识库命名：实操清单"
url: https://memory.wiki/16aWO9dG
updated: 2026-11-20T21:59:06.186Z
source: "memory.wiki"
---
# 跨部门知识库命名：实操清单

## 为什么「跨部门知识库命名」对本地 RAG 很重要

部门前缀；禁止笼统 docs。检索增强生成通常是团队基于本地模型做的第一个正经项目，因为文档留在内网，也不用微调。它同样是小设计决定大信任的地方。

## 先做好入库

垃圾输入会产出自信的错误答案。在考虑嵌入模型之前：

- 保留结构：PDF 或 Office 文件转换后，标题、表格和列表要还在。
- 每个分块都带元数据：来源文件、章节、版本和文档日期。
- 没有负责人或没有日期的文档拒收，过期政策是负债。
- 保留原始文件，分块器改进后可以重新入库。

## 分块与检索

先用中等分块大小加一定重叠，再用你自己的问题评测，而不是照搬博客参数。中文需要按句子切分的分块器，不能套用英文的空格规则。纯向量检索会漏掉零件号、合同编号、SKU 这类精确标识，所以要在向量库旁边保留关键词索引并合并结果。政策随时间变化时，检索要偏向最新的有效版本。

## 可重复的评测

整理一组真实问题，附上标准答案和应当支撑答案的文档。每次修改分块、嵌入模型或提示词后都跑一遍，同时看答案和检索到的段落。如果正确段落没有被检索出来，提示词再怎么改也没用。

## 运维

- 备份向量库，并实际演练一次恢复。
- 按部门或客户拆分集合，方便执行权限规则。
- 记录每个回答引用了哪些来源。
- 明确助手必须拒答的内容，并公布出来。

## 一个实际例子

一家小型制造企业希望工程师能查询内部技术规范。第一版只用向量检索，经常返回错误版本的文档。团队把文档日期和版本号加进元数据，排序前过滤掉已被替代的版本，并为零件号保留关键词索引。他们还改写了分块方式，把表格单独存成记录。改完后用同一批评测问题重跑，检查正确来源是否出现在检索结果中。直到检索稳定，他们才开始花时间调整回答提示词。

延伸阅读：[本地 AI 教程中心](https://microaione.com/tutorials/)，以及[MicroAI One 软件](https://microaione.com/microai-one/)。


## 速记要点

- 检索文本和上传文件一律视为不可信。
- 演练恢复，而不只是做备份。
- 商用前先读模型许可证。
- 每次请求都记录模型名称和版本。

*作者：[本地AI 1号网](https://microaione.com/)，深圳团队，专注本地大模型软硬件、装机与私有化部署。*

---

## Summary
构建高质量的本地检索增强生成系统需要通过规范的文档入库、结合关键词与向量的混合检索以及基于真实问题的持续评测来确保准确性。在优化提示词之前，必须优先保证检索环节能够稳定获取最新且正确的文档来源。

## Themes
- RAG system optimization
- Document management strategy
- Retrieval performance tuning
- Local AI operations

## Key takeaways
- Standardize document naming with department prefixes to avoid ambiguous retrieval results.
- Implement a mandatory metadata policy including source, version, and date for all ingested files.
- Use sentence-based splitting for Chinese text instead of English-style whitespace rules.
- Maintain a benchmark set of questions and standard answers to validate changes in embedding models or chunking strategies.
- Filter out superseded document versions during the retrieval process to ensure accuracy.

## Insights
- Vector search alone is insufficient for technical identifiers like SKU or part numbers and requires a hybrid keyword index approach.
- The quality of retrieval is the primary bottleneck for RAG performance, rendering prompt engineering ineffective if the source context is missing.
- Document metadata is not just for organization but acts as a critical filter for version control and access permissions.

## Open questions / gaps
- What specific technical criteria define an optimal chunk size and overlap for different document types?
- How should the system handle conflicting information between two valid documents from different departments?

