# LLMとWebから回答アプリ

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

<figure><img src="/files/ikRC64TxbdczzrPWpRYi" alt=""><figcaption></figcaption></figure>

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

LLMとWebから回答アプリでは、ユーザーが入力した質問に対して、まずLLMの持っている情報から回答生成を行い、その後Webの情報から回答生成を行います。

### 質問を入力する（質問応答ノード） <a href="#ga-node" id="ga-node"></a>

ユーザーに入力を求めます。

* 応答スタイル：テキスト

ユーザーの入力した情報を下記の変数に保存します。

* 変数：＠QUERY
  * 変数種別：会話変数
  * タイプ：文字列

<figure><img src="/files/STEpwbISWZwggOGrjNf4" alt="" width="563"><figcaption></figcaption></figure>

### LLMからの回答を生成（LLM実行ノード） <a href="#ga-node" id="ga-node"></a>

LLM実行ノードでは質問応答ノードでユーザーが入力した内容をプロンプトで指定し実行しています。

* ベースモデル：OPENAI GPT-4o
* プロンプト：LLMと会話

<figure><img src="/files/MGqYaUZK9hoHfzXdm8a5" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/9pa9Kf3gHiG8foeOMF7z" alt="" width="563"><figcaption></figcaption></figure>

### Webからの回答を生成（回答生成ノード） <a href="#ga-node" id="ga-node"></a>

回答生成ノードでは質問応答ノードでユーザーが入力した内容を保存した変数情報(@QUERY)に対する回答を生成します。

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

* ベースモデル：OPENAI GPT-4o
* グループプロンプト：回答生成
* 検索ソース：ウェブ
* 回答生成後：次のノードへ
  * 回答生成に成功した場合、次のノードへ進みます。
* 回答が見つからなかった場合のアクションを指定：OFF
  * LLMの方で回答生成自体には成功したものの、対象となる検索ソースから的確な回答が見つからず、「回答が見つかりませんでした」などのメッセージを表示した場合に、別途のアクションを指定できるオプションです。

<figure><img src="/files/uvKxxPHp8QbO3lObtqbc" alt="" width="559"><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://docs.allganize.ai/alli-llm-app-market/app-market/default-apps/app-all/llmtowebkaraapuri.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.
