> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/jp/advanced-basic/cases/private-knowledge-qa.md).

# プライベートナレッジベースQA

人事チームは同僚に現行制度を確認してほしいが、Agent が常識で回答を補完することは望んでいない。この事例では、資料の範囲、検索テスト、回答ルールをまとめている。内容が見つからない場合、Agent は明確にそう説明すべきだ。

<figure><img src="/files/6cd73c187ee86f2e1ec999794062dd6fc8756b4e" alt="新建知识库时的名称、嵌入模型和保存入口"><figcaption><p>単一のテーマごとに独立したナレッジベースを作成し、現行資料と旧資料が混在しないようにする。</p></figcaption></figure>

<figure><img src="/files/d79a322590aeb377fbbf5ee9b260ecbca4456c35" alt="知识库 RAG 的分段、返回和过滤设置"><figcaption><p>検索結果が不安定なときにのみ、資料構造に応じて RAG 設定を調整する。</p></figcaption></figure>

<figure><img src="https://3562065924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-413972fdce3631aee8d1619db3a9936b2dfc3774%2Fcherry-v2-guide-knowledge-recall.png?alt=media" alt="员工差旅制度知识库对海外租车能否报销问题给出的实际召回结果"><figcaption><p>① 実際の質問でテストする；② 返された資料、原文の抜粋、関連度を確認する。ここが安定してから、ナレッジベースを Agent に使わせる。</p></figcaption></figure>

## 操作手順

{% stepper %}
{% step %}

### 1. テーマを単一にしたナレッジベースを構築する

現行資料をまとめ、重複や期限切れの版を削除する。ファイル名にはテーマと有効範囲を明記する。
{% endstep %}

{% step %}

### 2. 実際の質問で検索テストを行う

少なくとも、紛らわしい条項、口語的な聞き方、答えのない質問をテストする。返される抜粋が安定するまで、資料や RAG 設定を調整する。
{% endstep %}

{% step %}

### 3. 専用 Agent を作成する

このナレッジベースだけを紐づけ、プロンプトで「資料を優先して引用する。見つからないときは未発見と答える。常識で制度を補完しない」と要求する。権限は最小範囲に保つ。
{% endstep %}

{% step %}

### 4. 小さな範囲から使い始める

まずは社内検索に使い、承認や専門的判断を直接置き換えない。誤答した質問を収集し、資料と検索テストに戻って修正する。
{% endstep %}
{% endstepper %}

## 質問例のルール

```
回答時はまず結論を示し、その後に資料名と関連段落を記載する。資料同士が矛盾する場合は矛盾点を列挙し、こちらで選ばない。ナレッジベースに答えがない場合は、必ず「現在の資料では見つかりません」と書く。
```

## 推奨の組み合わせと完成基準

| 項目      | 推奨方法                                            |
| ------- | ----------------------------------------------- |
| ナレッジベース | 1つのテーマに1組の資料、重複版と旧版を削除する                        |
| 検索テスト   | 標準的な言い回し、口語的な言い回し、答えのない質問を同時にテストする              |
| Agent   | 必要なナレッジベースだけを紐づけ、資料の引用を求め、補完しないようにする            |
| 完了基準    | 正しい段落を見つけられる。矛盾する資料は列挙される。答えがないときは、未発見だと明確に伝える。 |

{% hint style="danger" %}
プライベートナレッジベース内の内容は、選択した埋め込みモデルおよび対話モデルのサービスによって処理される。使用前に資料の機密要件とサービス範囲を確認し、秘密鍵やアカウント認証情報を知識資料として取り込まない。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/jp/advanced-basic/cases/private-knowledge-qa.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
