# 知识库（暂未上架）

{% hint style="info" %}

### 集成-知识库组件

{% endhint %}

<figure><img src="/files/BFY4t3meVVxM0zwCC4Z6" alt="" width="251"><figcaption></figcaption></figure>

{% hint style="info" %}
知识库是知识工程中的结构化，特点就是易操作，易利用，全面且有组织的知识集群。我们可以通过知识库，存储海量的知识。然后通过知识库组件+MossAi组件相结合，来实现知识问答；

知识库组件：分别由“输入提问内容”、“选择知识库”、“保存变量”三部分组成。

注意：在你没有设置自己的知识库前，是无法获取到知识库内容的。所以想要设置自己的知识库，请前往“知识库”页面进行设置
{% endhint %}

<figure><img src="/files/2fITMwo3w3wDlh0I0UQ3" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
我们演示一下完整的示例
{% endhint %}

1、我们先用气泡组件设置引导词

2、用输入文本组件，定义一个变量为“提问内容”

<figure><img src="/files/rfw1o7r5eLnbn3i6wo11" alt="" width="375"><figcaption></figcaption></figure>

3、设置知识库组件

* 1、在“输入提问内容”位置，填写变量“提问内容”

<figure><img src="/files/Uq4DzHgWX6h3M0evErWV" alt="" width="375"><figcaption></figcaption></figure>

* 2、选择已创建的知识库

<figure><img src="/files/AT5deXkKuVtG64ZzK8ah" alt="" width="375"><figcaption></figcaption></figure>

* 3、保存变量为“知识库内容”，并且用气泡文本组件输出出来

<figure><img src="/files/heV4v5XAB5Y64klhhWCl" alt="" width="375"><figcaption></figcaption></figure>

* 4、利用MossAi组件设置System和user，然后定义变量为“mossAI内容”

<figure><img src="/files/CePNA3cqx4QTpE7im0KE" alt="" width="375"><figcaption></figcaption></figure>

* 5、把“mossAI内容”变量传输到气泡文本组件中，这样我们整套流程就完成了

<figure><img src="/files/unGnvCR6JlxSaISEoQb8" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
当我们运行之后，它就会根据你提出的问题，去调用知识库的内容进行回到。然后得到的答案利用AI组件进行润色。这样我们整套流程就完成了
{% endhint %}

<figure><img src="/files/kgq3zQ1xNOvkaYvMKPkv" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://doc.nyai.chat/jin-jie-jiao-cheng-gong-zuo-liu/ji-cheng-zu-jian/zhi-shi-ku-zan-wei-shang-jia.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
