# HTMLドキュメントに接続する

[**Microsoft OneDriveで文書をインデックスする**](https://docs.allganize.ai/alli-userguide/knowledge-base/source/connect-microsoft-onedrive)のと同様に、Alliは、指定されたHTMLページからテキストデータをクロールし、ドキュメント化し、ナレッジベースに追加することができます 。

まず、ナレッジベース＞ソース設定に移動します。 ナレッジベースの可能なソースとして、OneDriveとHTMLドキュメントが表示されます。 \[HTMLドキュメント]タブの\[追加]ボタンをクリックして開始します。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/04/html%E9%80%A3%E6%90%BA1.png?resize=635%2C272&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

ポップアップが表示されますので、データをクロールするHTMLドキュメントのURLを入力します。指定したページは、必ずパブリックページでなければならないという点に注意してください。また、ドキュメントの名前を決定する方法を選択することもできます。ドキュメントの名前は、URLを使用するか、HTMLドキュメントのタイトル、または直接名前を指定することができます。

<figure><img src="https://3246530324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVKCSdGPopMt2sSDjiJua%2Fuploads%2FnDPgvsxMMc8LNzrSzbEz%2FHTM%E9%80%A3%E6%90%BA.png?alt=media&#x26;token=e9422db7-d39b-4938-ab0c-a8e36e8434d4" alt="" width="375"><figcaption></figcaption></figure>

「下位URLの正規表現」の下にある「下位URLを使用」にチェックを入れると、URL欄に入力したページに貼られたリンクのページ内容をインデックスすることができます。

正規表現を利用して、クロールしたいページを指定してください。

#### **例1）<https://example.allganize.ai/ページ内のリンクで、> <https://example.allganize.ai/○○と続くページすべてのインデックスを作成する場合>**

<figure><img src="https://3246530324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVKCSdGPopMt2sSDjiJua%2Fuploads%2F5eTpWmUk67li9ylPXwvq%2F%E4%B8%8B%E4%BD%8D%E8%A1%A8%E7%8F%BE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB1.png?alt=media&#x26;token=10d749a5-0a89-4623-8906-ea0a5e27fc6d" alt="" width="375"><figcaption></figcaption></figure>

**例2)<https://example.allganize.ai/のページ内でhttps://example.allganize.ai/productを含むページをインデックスを作成する場合>**

<figure><img src="https://3246530324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVKCSdGPopMt2sSDjiJua%2Fuploads%2FiK00TaXValrKkV1Ryliq%2F%E4%B8%8B%E4%BD%8D%E8%A1%A8%E7%8F%BE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB2.png?alt=media&#x26;token=fac6f2ae-7924-4f84-9206-641b2110b4a0" alt="" width="375"><figcaption></figcaption></figure>

この設定の場合は、「<https://example.allganize.ai/product\\_alli> 」や「<https://example.allganize.ai/product/alli」など、https://example.allganize.ai/> ドメインの下にある「product」で始まるすべてのリンクをクロールします。

下位URL 機能を使用する場合、メイン URL のコンテンツはインデックスされないのでご注意ください。

\[保存]ボタンをクリックすると、「HTMLドキュメント」セクションに追加したアイテムが表示されます。ドキュメント名を表示するには、そのまま待つか、\[今すぐ取り込む]をクリックします。なお、インポートデータが多い場合は時間がかかることがあります。ステータス トグルがオンの場合、UTC午前０時毎に自動更新が行われドキュメントを最新の状態に保ちます。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/04/html%E9%80%A3%E6%90%BA4.png?resize=689%2C161&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

作成されたドキュメントは、\[ドキュメント]タブに保存されます。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/04/html%E9%80%A3%E6%90%BA5.png?resize=690%2C192&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

## アップデート <a href="#update" id="update"></a>

6/17/2024: HTMLソースの下位表現の説明を追加しました。


---

# 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/alliyzgaido/knowledge-base/source/connect-html-documents.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.
