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

Use in Chat

After retrieval testing passes, you can select one or more knowledge bases in a normal conversation and have the model answer based on the retrieved snippets while showing sources.

The conversation is responsible for organizing the answer, while the knowledge base is responsible for providing evidence. First confirm the correct snippets in [Retrieval Test], then determine whether the prompt or chat model needs adjustment.

Prerequisites

Check item
Qualified status

Chat model

Supports tool calls

Knowledge base materials

At least one material is ready

Current message

No files attached at the same time

Retrieval quality

Key questions can find the correct source and complete snippet

Complete a Q&A with sources

1

1. Select a model that supports tool calls

Create or open a normal conversation, and confirm in the model selector that the current model supports tool calls. If the knowledge base entry says the capability is insufficient, switch models first.

2

2. Open knowledge base selection

Click the add button in the lower-left corner of the input area, select [Knowledge Base], then check one or more target bases.

3

3. Confirm the selection status

The knowledge base name should appear in the input area. When the question concerns only one topic, prefer selecting only one base to reduce competition from irrelevant snippets.

对话输入区已经选择员工差旅制度知识库并输入真实问题
Before sending, confirm that the selected knowledge base and the current question belong to the same information scope.
4

4. Clearly define the task, scope, and format

For example:Answer the accommodation cap for domestic first-tier cities only based on the selected knowledge bases; list different rank levels separately and mark the source after each item.

5

5. Open source verification

Check the source name, snippet content, and applicable conditions. Content not specified in the materials should not be filled in as fact.

6

6. If it fails, go back to retrieval testing

Use the same question to check the snippets returned by the knowledge base. If retrieval is wrong, fix the materials, parsing, or search first; if retrieval is correct, then adjust the prompt and chat model.

召回测试中展示相关度、来源名称和命中片段的结果列表
When the conversation answer is unsatisfactory, the retrieval result can help determine whether the problem is at the retrieval layer or the answering layer.

How the answer is formed

从资料解析、关键词和向量检索到合并重排并交给对话回答的知识库架构图
The chat model sees the final retrieved snippets, not all the materials in the knowledge base automatically.

Query a clear rule

Answer only based on the selected knowledge bases: What is the accommodation cap for domestic first-tier cities? If standards differ by rank level, please list them separately and mark the source after each item.

Compare multiple materials

Compare the approval differences between domestic business trips and overseas business trips. Present it in a table by "trigger conditions, approver, pre-departure materials"; mark anything not stated in the materials as "Not specified".

Require distinguishing facts from suggestions

First list the facts supported by the original policy text, then provide operational suggestions separately. Suggestions must not be written as policy requirements, and keep the source name for each fact.

Choose one knowledge base or multiple knowledge bases

Situation
Recommendation
Reason

Single policy or product issue

Select only one base

Reduce competition from irrelevant snippets

Cross-department or cross-product comparison

Select multiple bases and explain the purpose of each

Help the model maintain source boundaries

Mixed results from multiple bases

Split into multiple questions and verify separately

First confirm that each base can retrieve independently

Need long-term multi-step research

Switch to an Agent bound to knowledge bases

Better suited for continuous search, organization, and file delivery

Configuration notes

Configuration item
Recommended starting point
Function
Notes

Number of knowledge bases

1

Control the scope of materials

Increase only when there is a real cross-base need

Question scope

Clearly write "only based on the knowledge base"

Reduce common-sense completion

Important conclusions still need source verification

Output format

Table or itemized list

Easy to verify item by item

Require "Not specified" instead of guessing

Regression issue

Use the same question as in the retrieval test

Distinguish between retrieval and answer issues

Change only one variable per round

Consolidate conversation content back into the knowledge base

Cherry Studio can save messages, topics, or notes to the knowledge base. Before saving, delete model guesses, duplicate content, and temporary discussions, and use a title that clearly indicates the topic and version.

After saving, it becomes a new material snapshot and will not sync in real time with the original conversation or note. When the content changes, it needs to be saved again or replaced.

User case

Xiaolin asked about the accommodation cap in the [Employee Business Travel Policy]. The first answer mixed in model common sense, so he changed the prompt to "write Not specified when the material does not state it" and required the source to be kept for each item. Then he opened the citations one by one to verify the city tier, rank level, and amount.

The completion standard is: every amount can be directly supported by the cited snippet, and exceptions not written in the policy will not be filled in by the model itself.

FAQ

Why is the knowledge base entry grayed out?

First select a model that supports tool calls, and remove the current message attachment; then confirm that there is at least one knowledge base with ready materials.

Why is there no source in the answer?

Confirm that the input area still shows the selected knowledge base, then put the same question into retrieval testing. If there is no correct retrieval, fix the knowledge base first.

What if the source is correct but the conclusion is inaccurate?

Require the model to answer only based on the citations, break the task into smaller factual items, and manually verify important conclusions. At this point, it is usually a prompt, model capability, or context organization issue.

Continue reading

Last updated

Was this helpful?