Skip to content

Migrating an Existing Knowledge Base ​

If you already have a knowledge base — an LLM Wiki, a set of Skills, a documentation folder — you do not have to start from nothing. Create a Context knowledge workspace, describe the existing base to the Agent, and let it plan the migration up to the work-start report, where you review the approach and decide the batches.

The migration prompt ​

Once the workspace exists, start with:

text
Research what Context can do, then migrate the current knowledge base:

- Location, content and document scope of the current knowledge base:
- How it is produced today (scripts, prompts, and so on):
- Desired published structure and form: keep it as is, or new requirements
- Historical Q&A or an evaluation question set, to show how the knowledge base is used

Turn this into a research report, continue up to the work-start report and pause.
I will review the approach and plan the batches.

The last item matters most: real questions tell the Agent what the knowledge base is for, and they become your evaluation set later.

Bringing the existing material in ​

Existing material can be connected in different ways, depending on whether it should become a source of new articles or stay where it is:

  • Document directories — register a folder of existing documents as a source so its contents are captured and cited. See Document Directories.
  • Same-repository docs and Skills — documents and authored Skills already kept in the same repository are registered as an entrance; the originals stay where they are and remain the only place to edit them. See Same-Repository Docs.
  • External entrances — content elsewhere that pages should link to, declared in imports.yaml without downloading or capturing it. See External Entrances.

Switch over after you have measured ​

Keep the old knowledge base running until the new one is proven. Run the same question set against both and compare quality, time and tool calls, as described in Evaluating Your Knowledge Base.

迁移已有知识库 ​

如果你已经有一个知识库,比如 LLM Wiki、一组 Skill 或一个文档目录,就不必从零开始。创建一个 Context 知识工作区,向 Agent 描述现有知识库,让它规划迁移,直到给出开工报告;你在开工报告处审核方案并决定批次。

迁移提示词 ​

知识工作区创建好后,从下面这段开始:

text
Research what Context can do, then migrate the current knowledge base:

- Location, content and document scope of the current knowledge base:
- How it is produced today (scripts, prompts, and so on):
- Desired published structure and form: keep it as is, or new requirements
- Historical Q&A or an evaluation question set, to show how the knowledge base is used

Turn this into a research report, continue up to the work-start report and pause.
I will review the approach and plan the batches.

最后一项最重要:真实问题能告诉 Agent 这个知识库是用来做什么的,之后它们也会成为你的评估题集。

接入现有材料 ​

现有材料可以用不同方式接入,取决于它应当成为新文章的来源,还是保留在原处:

  • 文档目录:把一个现有文档目录登记为来源,其内容会被采集并引用。参见文档目录。
  • 同仓库文档与 Skill:已经放在同一仓库中的文档和自编 Skill 会登记为入口;原文件留在原处,并且仍是唯一的编辑位置。参见同仓库文档。
  • 外部入口:页面需要链接到的其他位置的内容,在 imports.yaml 中声明,不下载也不采集。参见外部入口。

测量之后再切换 ​

在新知识库得到验证之前,保持旧知识库继续运行。用同一套题集分别测试两者,比较质量、耗时和工具调用次数,方法见评测知识库效果。