> 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/en-us/question-contact/knowledge.md).

# AI Fundamentals

This page explains the most common terms in Cherry Studio to help you determine whether you should change the model, adjust the prompt, or add tools.

<figure><img src="https://1658303467-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>Agents organize tasks, while the model generates content; the knowledge base, skills, and tools provide information, methods, and operational capabilities respectively.</p></figcaption></figure>

## Model services, models, and API keys

* Model service: the vendor, cloud platform, or local runtime environment that provides model access;
* Model: the capability to perform specific tasks such as text, vision, image generation, embedding, or reranking;
* API address: the service endpoint where Cherry Studio sends requests;
* API Key: the credential used by the provider to identify the account and authorize requests.

The same provider can offer multiple models. An API Key can connect to the service, but that does not mean every model is enabled, nor does it mean the interface types are necessarily compatible.

## Tokens and context window

A token is the basic unit used by a model when processing text, and it is not equivalent to a Chinese character or a word. Inputs, history messages, tool definitions, knowledge base content, and outputs all consume context.

The context window is the total amount that can be handled in a single request. When approaching the limit, Cherry Studio may compress earlier content; important facts should be placed in explicit prompts, files, knowledge bases, or Agent memory, rather than relying only on a sentence from a long time ago.

## Sampling parameters

| Parameters  | Effect                               | Adjustment direction                                                        |
| ----------- | ------------------------------------ | --------------------------------------------------------------------------- |
| Temperature | Controls output randomness           | Lower for factual tasks, and can be increased moderately for creative tasks |
| Top P       | Limits the candidate word range      | Usually adjust only one of it and Temperature as the main focus             |
| Max Tokens  | Limits the length of a single output | Too low may truncate the output; too high does not mean better content      |

Different models may vary slightly in their support for and interpretation of parameters. If there is no clear issue, first use the product defaults instead of copying so-called "universal parameters" from the internet.

## Embedding and Rerank

* Embedding model: converts text into vectors for similarity retrieval in the knowledge base;
* Reranking model: reorders the initial retrieval results to improve the ranking of the most relevant content.

They are not responsible for generating the final answer. If the knowledge base returns no results, first check document processing and embeddings; if results exist but the ranking is not ideal, then consider reranking.

## Assistant and Agent

* Assistant: centered on continuous conversation, fixed roles, and output style;
* Agent: centered on goal execution, working directory, tools, and multi-step tasks.

For simple Q\&A, an assistant is more direct; use an Agent when you need files, terminal, subtasks, channels, or scheduled tasks.

## Skills, tools, MCP, and knowledge base

| Concept        | One-sentence understanding                                       |
| -------------- | ---------------------------------------------------------------- |
| Tools          | An action the Agent can perform                                  |
| skills         | Tell the Agent how to work using a fixed method                  |
| MCP            | Connect external tools and resources to the Agent                |
| Knowledge base | Restrict the materials that the Agent or assistant can retrieve  |
| Memory         | Save stable facts and experience across tasks for the same Agent |

## Multimodal and image generation models

Multimodal models can understand different inputs such as images and text; image generation models are specialized in generating images. The Agent's main model is responsible for understanding your request, while the built-in \[Generate Image] tool calls the image generation model selected under \[Settings] → \[Default Model].

{% hint style="info" %}
Being able to see images, generate images, and call tools are three different capabilities. When choosing a model, first confirm what the task requires; do not look only at the model name.
{% endhint %}

<details>

<summary>Are local models always more private?</summary>

Running the model locally can reduce sending content to the model provider, but web search, MCP, channels, and other external tools may still transmit data. Privacy depends on the entire workflow, not just the model location.

</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/en-us/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.
