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

Knowledge Base Getting Started

A knowledge base organizes files, notes, directories, or web pages into a reusable, searchable collection of materials. First use recall tests to confirm the system can find the correct passages, then hand the knowledge base over for use in chat or agents.

If you only need to handle a small piece of text temporarily, pasting it directly into the chat is faster. When the materials will be reused repeatedly and the answer must be based on internal sources, then create a knowledge base.

When is it suitable to use

Requirement
Recommended approach
Reason

Look up employee policies, product manuals, project materials

Create a knowledge base

The materials will be reused, and you need to reliably quote the original text

Temporarily analyze an attachment

Upload it directly in the chat

No need for long-term maintenance or indexing

The materials are still being organized

First sort it out with [Notes]

Avoid unverified content being treated as a formal answer

Need to automatically process materials for the long term

Bind the agent after creating the knowledge base

The agent can continuously use the same material scope during tasks

What happens during one answer

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

First, learn these terms

Name
Meaning in this task

Knowledge base

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

Material item

An imported file, a file in a note or directory, or a webpage snapshot

Chunk

A small passage used for retrieval after materials are split

Recall

The process of finding relevant passages based on the question

Embedding model

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

Reranking model

Scores and sorts candidate passages again; also optional

Complete your first use in 5 minutes

1

1. Create a knowledge base with a clear scope

Open [Knowledge Base] in the left navigation bar → click the add button above the knowledge base list. Use “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]. When you need to match conversational questions or synonyms, then configure an embedding model.

3

3. Add materials

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

知识库中的文件、笔记、目录和链接四种资料入口
Choose the entry point according to the source of the materials; do not import unrelated 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. Randomly check the text and chunks to confirm there is no garbled text, missing pages, or obvious ordering errors.

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

5. Complete recall testing

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

6

6. Enter chat or bind an agent

After 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
Recommended starting point
Function
Applicable scenario
Notes

Knowledge base scope

A clear topic

Controls which materials participate in retrieval together

Policies, product materials, 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 included

There is a large difference between conversational wording and the original text

Cloud model billing and data handling depend on the service provider

Test questions

3–5 real questions

Establish a long-term regression baseline

After each update to the materials or settings

Do not test only with the material title and original sentences

Enter formal use

Materials, chunks, and recall all pass

Avoid bringing parsing or retrieval problems into the chat

All knowledge bases

The chat model cannot recover key information that was not recalled

How to tell it is ready to use

  • All required materials are shown as available, and none remain stuck in processing or error status for a long time.

  • Randomly open one or two materials; the text and chunks have no garbled text, missing pages, or obvious ordering errors.

  • Use fixed questions for recall testing; the correct source should consistently appear in the first few results.

User case

Xiaolin wants colleagues to look up travel policies. He creates an [Employee Travel Policy] knowledge base, imports three materials on lodging, transportation, and approval, and does not configure an embedding model at first. After the three materials are ready, he tests with questions such as “What is the Beijing lodging limit?” 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 contains 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.

FAQ

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 organizing the answer. If the recall stage does not find key information, 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 text and chunks and complete recall testing. Import success only means the processing flow has finished; it does not mean the results are complete or correctly ranked.

After changing the chunking settings, will old materials change automatically?

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

Continue reading

Last updated

Was this helpful?