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

Use in Chat

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

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

Prerequisites for use

Check item
Qualified status

Chat model

Supports tool calls

Knowledge base materials

At least one material is ready

Current message

No attachments added at the same time

Retrieval quality

Key questions can find the correct source and complete snippet

Complete a Q&A session with sources

1

1. Select a model that supports tool calls

Create or open a regular 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 at the lower left of the input area, choose [Knowledge Base], then check one or more target libraries.

3

3. Confirm the selection status

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

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

4. State the task, scope, and format clearly

For example:Answer only based on the selected knowledge base: what is the accommodation cap for first-tier cities in China? If standards differ by rank, list them item by item and mark the source after each item.

5

5. Open source verification

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

6

6. If it fails, go back to the retrieval test

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 results can help determine whether the problem is in the retrieval layer or the answer layer.

How the answer is formed

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

Ask about a clear rule

Answer only based on the selected knowledge base: what is the accommodation cap for first-tier cities in China? If standards differ by rank, please list them item by item, and mark the source after each item.

Compare multiple materials

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

Require distinguishing facts from suggestions

First list the facts supported by the original text of the policy, then give operational suggestions separately. Suggestions must not be written as policy requirements, and each fact should retain the source name.

Choose one knowledge base or multiple

Situation
Recommendation
Reason

Single policy or product issue

Select only one library

Reduce competition from irrelevant snippets

Cross-department or cross-product comparison

Select multiple libraries and explain each one's purpose

Help the model keep source boundaries clear

Mixed results from multiple libraries

Split into multiple questions and verify separately

First confirm that each library can retrieve independently

Need long-term multi-step research

Switch to an Agent bound to a knowledge base

More suitable for continuous search, organization, and file delivery

Configuration notes

Configuration item
Recommended starting point
Effect
Notes

Number of knowledge bases

1

Control the scope of materials

Increase only when there is a real cross-library need

Question scope

Explicitly write 'only based on the knowledge base'

Reduce common-sense filling-in

Important conclusions still need source verification

Output format

Table or itemized list

Convenient for item-by-item acceptance

Ask for 'Not stated' instead of guessing

Regression issue

Use the same question as in the retrieval test

Distinguish retrieval problems from answer problems

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 discussion, and use a title that clearly indicates the topic and version.

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

User case

Xiaolin asked about the accommodation cap in [Employee Business Travel Policy]. The first answer mixed in model common sense, so he changed the prompt to 'write Not stated when it is not specified in the materials' and required the source to be retained for each item. He then opened the citations one by one to verify the city tier, rank, and amount.

The acceptance criterion 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 on its own.

Common questions

Why is the knowledge base entry grayed out?

First select a model that supports tool calls and remove the current message attachments; 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 the retrieval test. If there is no correct retrieval, fix the knowledge base first.

What should I do 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. This is usually a prompt, model capability, or context organization issue.

Continue reading

Last updated

Was this helpful?