For the complete documentation index, see llms.txt. This page is also available as Markdown.

Knowledge base basics

A knowledge base organizes files, notes, directories, or web pages into a reusable collection of materials that can be searched repeatedly. First use recall testing to confirm the system can find the correct passages, then hand the knowledge base over to a conversation or Agent.

If you only need to handle a small piece of text temporarily, it is faster to paste it directly into the conversation. Build a knowledge base when the materials will be reused repeatedly and the answer must be based on internal sources.

When is it suitable to use

Need
Recommended approach
Reason

Query employee policies, product manuals, and project materials

Build a knowledge base

The materials will be reused, and you need stable citation of the original text

Temporarily analyze an attachment

Upload directly in the conversation

No long-term maintenance or indexing needed

The materials are still being organized

First organize it with [Notes]

Avoid unverified content being treated as an official answer

Need to automatically process materials over the long term

Bind to an Agent after building the knowledge base

The Agent can continuously use the same material scope during tasks

What happens in a single answer

从资料解析、分块、BM25 与向量检索到合并、重排和 Top K 的知识库检索架构图
The materials are first parsed and split into chunks, then candidate passages are found using keywords or semantic search; the chat model is only responsible for forming an answer based on the recalled content.

Get to know these terms first

Name
Meaning in this task

Knowledge base

A set of materials and retrieval settings organized around the same topic

Material entry

An imported file, note, file in a directory, or web page snapshot

Chunk

A small passage used for retrieval after the materials are split

Recall

The process of finding relevant passages based on a question

Embedding model

Converts text into vectors to match content with different wording but similar meaning; optional

Reranking model

Scores and reorders candidate passages again; also optional

Complete your first use in 5 minutes

1

1. Create a knowledge base with a clear scope

Open the left navigation [Knowledge Base] → click the Add button above the knowledge base list. Use the format “object + purpose” for the name, for example [Employee Travel Policy].

2

2. Choose a retrieval method

For your first try, you can set [Embedding Model] to [Do not use]. Configure an embedding model later when you need to match conversational wording or synonyms.

3

3. Add materials

After entering the knowledge base, click the Add Material button and choose [File], [Note], [Directory], or [Link].

知识库中的文件、笔记、目录和链接四种资料入口
Choose the entry point according to the source of the materials; do not import irrelevant directories just to reduce the number of steps.
4

4. Wait for the materials to become ready

After processing is complete, the materials will appear in the list. Spot-check the main text and Chunks to make sure there is no garbled text, missing pages, or obvious misordering.

包含多条已处理资料的员工差旅制度知识库
After the materials are ready, you still need to spot-check the content; import completion does not mean the retrieval quality is already qualified.
5

5. Complete the recall test

Open [Recall Test], enter a real question whose answer you already know, and check whether the correct source appears among the first few results.

6

6. Enter chat or bind an Agent

Once recall is stable, select the knowledge base in the chat input area; when you need a long-term workflow, bind the knowledge base on the Agent editing page.

Configuration item
Product default value
Recommended starting point
Function
Applicable scenarios
Notes

Knowledge base scope

A clear topic

Controls which materials participate in retrieval together

Policies, products, project materials

Content with different permissions or lifecycles should be separated

Embedding model

Do not use

Do not use for now

Determines whether vector retrieval is added

Conversational wording differs greatly from the original text

Billing and data handling for cloud models depend on the provider

Test questions

3 to 5 real questions

Establish a long-term regression baseline

After each materials or settings update

Do not test using only the material title and original sentences

Enter formal use

Materials, Chunks, and recall all pass

Avoid bringing parsing or retrieval problems into the conversation

All knowledge bases

The chat model cannot make up key information that was not recalled

How to tell when it is ready to use

  • All required materials show as available, with none stuck in processing or error status for a long time.

  • Randomly open one or two materials; the main text and Chunks should have no garbled text, missing pages, or obvious misordering.

  • Use fixed questions for recall testing, and the correct source should consistently appear among the first few results.

User case

Xiaolin wants colleagues to be able to query the travel policy. He creates an [Employee Travel Policy] knowledge base, imports three materials covering lodging, transportation, and approvals, and leaves the embedding model unconfigured for now. After the three materials are ready, he tests with questions like “What is the lodging limit in Beijing?” and “Who approves amounts over 5,000 yuan?”

The completion standard is: for each question, the correct policy source can be found, and the passage includes both the applicable conditions and the conclusion. Only after meeting this standard does he bind the knowledge base to the Agent responsible for employee Q&A.

Common questions

What is the difference between a knowledge base and a chat model?

The knowledge base is responsible for finding passages from your materials, while the chat model is responsible for understanding the question and forming the answer. If key information is not found during recall, simply switching the chat model usually will not solve the problem.

Can it be used directly after materials are imported successfully?

You still need to spot-check the main text and Chunks, and complete a recall test. Successful import only means the processing flow has finished; it does not mean the results are complete or correctly ranked.

Will old materials change automatically after modifying the chunking settings?

No. To make existing materials use the new chunking settings, you need to perform [Reindex], then retest with the same set of questions.

Continue reading

Last updated

Was this helpful?