> 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/zhong-wen-fan-ti/question-contact/knowledge.md).

# AI 基礎知識

呢頁解釋 Cherry Studio 入面最常見嘅術語，幫你判斷應該改模型、改提示詞，定係增加工具。

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2F0ViuZ27Pm2UCLuL5Py8p%2Fclipboard.png?alt=media&amp;token=a9389ce5-80c6-49da-b5a4-60d5fe7024c4" alt="Agent、模型、知识库、技能、内置工具、MCP、API Key 和 Token 的关系图"><figcaption><p>Agent 組織任務，模型生成內容；知識庫、技能同工具分別提供資料、方法同操作能力。</p></figcaption></figure>

## 模型服務、模型同 API Key

* 模型服務：提供模型調用嘅廠商、雲平台或者本地運行環境；
* 模型：完成文本、視覺、繪畫、嵌入或者重排序等具體任務嘅能力；
* API 地址：Cherry Studio 發送請求嘅服務入口；
* API Key：服務商識別帳號同授權調用嘅憑據。

同一個服務商可以提供多種模型。API Key 可以連接服務，唔代表每個模型都已經開通，亦唔代表接口類型一定兼容。

## Token 同上下文視窗

Token 係模型處理文本時使用嘅基本單位，唔等同於漢字或者單詞。輸入、歷史消息、工具定義、知識庫內容同輸出都會佔用上下文。

上下文視窗係一次請求可以處理嘅總量。接近上限時，Cherry Studio 可能會壓縮較早內容；重要事實應該放入明確嘅提示詞、文件、知識庫或者 Agent 記憶，唔好只依賴好耐以前一句說話。

## 採樣參數

| 參數          | 作用       | 調整方向                     |
| ----------- | -------- | ------------------------ |
| Temperature | 控制輸出隨機性  | 事實任務偏低，創意任務可以適當提高        |
| Top P       | 限制候選詞範圍  | 通常同 Temperature 只會重點調整一個 |
| Max Tokens  | 限制單次輸出長度 | 過低會截斷，過高唔代表內容更好          |

唔同模型對參數嘅支援同意思可能會有少少差異。冇明確問題時，先用產品預設值，唔好套用網上嘅「萬能參數」。

## Embedding 同 Rerank

* 嵌入模型：將文本轉換成向量，用於知識庫相似度檢索；
* 重排序模型：對初步檢索結果重新排序，提高最相關內容嘅位置。

佢哋唔負責生成最終回答。知識庫冇結果時，先檢查文件處理同嵌入；結果有但排序唔理想，再考慮重排序。

## 助手同 Agent

* 助手：以持續對話、固定角色同輸出風格為中心；
* Agent：以目標執行、工作目錄、工具同多步驟任務為中心。

簡單問答用助手會更直接；需要文件、終端、子任務、頻道或者定時任務時用 Agent。

## 技能、工具、MCP 同知識庫

| 概念  | 一句話理解                    |
| --- | ------------------------ |
| 工具  | Agent 可以執行嘅一個動作          |
| 技能  | 話俾 Agent 知點樣用固定方法工作      |
| MCP | 將外部工具同資源接入 Agent         |
| 知識庫 | 畀 Agent 或助手限定可檢索嘅資料      |
| 記憶  | 為同一個 Agent 保存跨任務嘅穩定事實同經驗 |

## 多模態同繪畫模型

多模態模型可以理解圖片、文本等唔同輸入；繪畫模型專門生成圖片。Agent 嘅主模型負責理解你嘅要求，內置【生成圖片】工具就會調用【設置】→【默認模型】入面揀選嘅繪畫模型。

{% hint style="info" %}
可以睇圖、可以生成圖、可以調用工具係三種唔同能力。揀模型時先確認任務需要乜嘢，唔好只睇模型名稱。
{% endhint %}

<details>

<summary>本地模型一定更私隱嗎？</summary>

模型喺本地運行可以減少將內容發送去模型服務商，但網絡搜尋、MCP、頻道同其他外部工具仍然可能傳輸資料。私隱取決於成條工作流，唔只取決於模型位置。

</details>


---

# 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/zhong-wen-fan-ti/question-contact/knowledge.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.
