> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/ja/quickstart/tu-xiang-bian-shi-zhi-yuan.md).

# 画像認識のサポート

視覚言語モデル（VLM）と従来の OCR の違い、および MaiAgent が会話の添付ファイル、ナレッジベースのドキュメント、ナレッジベースの画像ファイルで画像を処理する方法について説明します。

## VLM（Vision Language Model）とは？ <a href="#what-is-vlm" id="what-is-vlm"></a>

視覚言語モデル（Vision Language Model、VLM）は、画像とテキストを同時に理解できます。画像内の文字を認識するだけでなく、物体、表、グラフ、それらの関係も理解し、画像の内容に基づいて質問に回答したり、説明を生成したりできます。

## VLM と従来の OCR の比較 <a href="#vlm-vs-ocr" id="vlm-vs-ocr"></a>

従来の光学文字認識（OCR）は、画像から文字を見つけて抽出することに特化しています。画像全体の意味や文字以外の内容を理解するうえでは、できることが限られています。

| 特性     | 従来の OCR               | VLM                          |
| ------ | --------------------- | ---------------------------- |
| 主な機能   | 画像から文字を抽出します          | 画像の内容を理解し、テキスト情報と組み合わせます     |
| 処理範囲   | 文字のみを処理します            | 文字、物体、グラフ、レイアウトを処理します        |
| 理解のレベル | 文字を認識します              | シーン、関係性、文脈を理解・推論します          |
| 一般的な用途 | ドキュメントのスキャンや文字抽出に使います | 画像に関する質疑応答、グラフの解釈、画像の説明に使います |

## MaiAgent が画像を処理する場面 <a href="#where-images-are-handled" id="where-images-are-handled"></a>

### 会話に添付された画像 <a href="#chat-attachments" id="chat-attachments"></a>

ユーザーが会話で画像をアップロードすると、画像は Agent の大規模言語モデルに直接渡され、内容が解釈されます。そのため、Agent はマルチモーダル対応のモデルを使用する必要があります。モデルが対応していない場合、応答に「選択した LLM はマルチモーダルに対応していません。」と表示されます。対応モデルについては、ユーザーマニュアルの[モデルの利用権限](https://docs.maiagent.ai/org/model-access)をご覧ください。

1回のリクエストでモデルに送信できる画像数には上限があり、プラットフォームの設定で決まります（デフォルトは20枚です）。API でアップロードする場合、添付ファイルの `type` を `image` にすると、画像が視覚入力としてモデルに送信されます。`other` にすると、代わりにドキュメント解析フローで処理されます。[メッセージの添付ファイルの処理方法](/tech/ja/api-integration/api_knowledge.md#attachment-processing)をご覧ください。

### ナレッジベースのドキュメント内の画像とスキャンページ <a href="#document-images" id="document-images"></a>

PDF、Word、PowerPoint などのドキュメントに含まれる画像、グラフ、スキャンページは、パーサーで内容を読み取ることで検索できるようになります。

* **Vision Parser**：クラウドのマルチモーダルモデルでドキュメントを1ページずつ読み取り、画像、グラフ、スキャンページの内容をテキストに変換します。
* **MaiAgent Parser (Offline)**：マルチモーダルモデルを設定すると、PDF に対して OCR と画像の説明生成も行います。オフラインでの運用が必要な環境に適しています。
* **MaiAgent Parser**：埋め込み画像を抽出しますが、画像の内容はテキストに変換しません。ナレッジベースがマルチモーダル対応の Embedding モデルを使用している場合、抽出された画像自体もベクトルインデックスに登録されます。

アップロード時に <mark style="color:blue;">自動検出（デフォルト）</mark> を選択すると、スキャンファイルや画像を含むドキュメントには、上記の画像を処理できるパーサーが使用されます。各パーサーの違いと料金は [Parser 解析ツール](/tech/ja/quickstart/parser.md)をご覧ください。

### ナレッジベースの画像ファイル <a href="#image-files" id="image-files"></a>

画像ファイル（`.png`、`.jpg`、`.jpeg`、`.gif`、`.webp`、`.tiff`）は、ナレッジベースに直接アップロードし、画像自体をベクトルインデックスに登録できます。ナレッジベースでマルチモーダル対応の Embedding モデル（MaiAgent クラウドでは Cohere Embed V4.0）を使用する必要があり、対応していない場合はファイルの解析に失敗します。[Embedding モデル](/tech/ja/quickstart/embedding.md)をご覧ください。

{% hint style="info" %}
3つの場面はそれぞれ独立しています。Agent のモデルがマルチモーダルに対応していても、ナレッジベースで画像ファイルを処理できるとは限りません。逆も同様です。導入を計画する際は、Agent のモデル、ナレッジベースのパーサー、Embedding モデルをそれぞれ確認してください。
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/tech/ja/quickstart/tu-xiang-bian-shi-zhi-yuan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
