# ドキュメントから回答自動生成

## フローの全体図 <a href="#overall" id="overall"></a>

<figure><img src="https://3244404108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR2CRA2CisD1pVQUgqd1g%2Fuploads%2FDN86tLdHgAhZ5gr1oERj%2Fimage.png?alt=media&#x26;token=7c8d40c8-0af0-410c-a50d-65f07e612d58" alt=""><figcaption></figcaption></figure>

## 概要 <a href="#outline" id="outline"></a>

ドキュメントから回答生成アプリは回答生成ノードを使って、事前にAlli LLM App Market環境にアップロードしたドキュメントから、ユーザーが入力した質問の回答文を生成します。

### 登録されているドキュメントから回答を生成する（回答生成ノード） <a href="#ga-node" id="ga-node"></a>

回答生成ノードでユーザーが入力した質問の回答を登録されてるドキュメントから生成します。

回答生成ノードではグループプロンプトと呼ばれる種類のプロンプトのみセットすることができます。標準でセットされている回答生成のプロンプトは弊社の仕組み（RAG）とLLMの最適な組合せでのプロンプトを提供しています。

* モデル：GPT4\_TURBO
* グループプロンプト：回答生成
* 検索ソース：ドキュメント
* 回答生成後：再度質問する
  * 回答生成に成功した場合、繰り返し質問ができるよう回答生成ノードにとどまる設定にしています
* 回答が見つからなかった場合のアクションを指定：ON
  * LLMの方で回答生成自体には成功したものの、対象となる検索ソースから的確な回答が見つからず、「回答が見つかりませんでした」などのメッセージを表示した場合に、別途のアクションを指定できるオプションです。

<div><figure><img src="https://3244404108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR2CRA2CisD1pVQUgqd1g%2Fuploads%2FuNjHPTE317j5LYot8JUg%2Fimage.png?alt=media&#x26;token=0a1d39d3-9808-457f-b546-220e1842cfe7" alt=""><figcaption></figcaption></figure> <figure><img src="https://3244404108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR2CRA2CisD1pVQUgqd1g%2Fuploads%2FrRI9Vzw6mAxpgTJh6g2g%2Fimage.png?alt=media&#x26;token=28a6257c-ad2b-442f-bc54-d6bb66ae5663" alt=""><figcaption></figcaption></figure></div>


---

# 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://docs.allganize.ai/alli-llm-app-market/app-market/default-apps/app-all/generative-answer.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.
