---
sitemap:
  changefreq: yearly
  priority: 0.5
type: docs
group: 統合
g_num: 6
o_num: 1
title: "REST API リファレンス – Procurize.AI 開発者向けドキュメント"
description: "Procurize.AI の完全な REST API リファレンスです。API トークンを使用してドキュメント、アンケート、RAG、レポートにプログラムからアクセスする方法を学びます。認証、エンドポイント、サンプルを含みます。"
breadcrumb: REST API リファレンス
index_title: "REST API リファレンス"
brief: "Procurize.AI の完全な REST API リファレンスです。API トークンを使用してドキュメント、アンケート、RAG、ファイル、レポートにプログラムからアクセスできます。認証、すべてのサポートモジュール、リクエスト/レスポンス例を含みます。"
---

Procurize.AI REST API リファレンス#

API トークンを使用して、ナレッジベース(ドキュメント、アンケート、RAG、レポート)にプログラムからアクセスできます。

対象: Procurize.AI API v1
認証: X-API-Key ヘッダーによる API キー(トークン管理は API Tokens を参照)
ベース URL: https://api.procurize.com

概要#

Procurize.AI REST API は、プラットフォームの主要機能へプログラムからアクセスできるようにします。これにより、Procurize.AI を社内システムと統合し、ナレッジベース管理を自動化し、カスタムワークフローを構築できます。

サポートモジュール(トークン認証):

認証#

認証が必要なすべてのエンドポイントは、リクエストヘッダーに API トークンを渡す必要があります。

ヘッダー
X-API-Key<YOUR_API_TOKEN>

例:

curl -X GET "https://api.procurize.com/v1/..." \
  -H "X-API-Key: your-api-token-here"

💡 トークンは組織に紐付いているため、リクエストで組織 ID を指定する必要はありません。

ベース URL#

すべての REST API エンドポイントは以下の URL 配下で提供されます。

https://api.procurize.com

エラー処理#

API は標準的な HTTP ステータスコードを使用します。

コード意味
200 OKリクエスト成功
201 Createdリソースが正常に作成された
204 No Contentリクエスト成功、レスポンスボディなし
400 Bad Requestパラメータが無効、またはリクエストが不正
401 UnauthorizedAPI トークンが欠如または無効
403 Forbiddenトークンにこの操作の権限がない
404 Not Foundリソースが存在しない
500 Internal Server Error予期しないサーバーエラー

エラー応答には機械可読なエラーコードと人間可読なメッセージが含まれます。

モジュールリファレンス#

RagArticle#

GET /questionnaire/rag/articles/summary#

概要: ホームページ用サマリー

パラメータ:

名前場所必須説明
projquerystring (uuid)いいえプロジェクト ID

レスポンス (200):

{
  "active": 5
}

GET /questionnaire/rag/articles/total#

概要: 記事数

パラメータ:

名前場所必須説明
qquerystringいいえ記事名またはコードでフィルタ
statequeryarrayいいえ状態でフィルタ
projectqueryarrayいいえプロジェクトでフィルタ
typequeryarrayいいえドキュメントタイプでフィルタ

レスポンス (200):

42

GET /questionnaire/rag/articles/list#

概要: 記事一覧取得

パラメータ:

名前場所必須説明
qquerystringいいえ記事名またはコードでフィルタ
statequeryarrayいいえ状態でフィルタ
projectqueryarrayいいえプロジェクトでフィルタ
typequeryarrayいいえドキュメントタイプでフィルタ
squerystringいいえソートフィールド
ascquerybooleanいいえ昇順ソート
psqueryinteger (int32)いいえページサイズ
pqueryinteger (int32)いいえ1 から始まるページ番号

レスポンス (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 42,
    "totalPages": 5
  },
  "items": [
    {
      "code": "ART-001",
      "org": "00000000-0000-0000-0000-000000000000",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Article Title",
      "description": "Article description",
      "documentTypes": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "name": "Type Name",
          "plural": "Type Names",
          "count": 5
        }
      ],
      "size": 150,
      "revision": {
        "id": "00000000-0000-0000-0000-000000000000",
        "collectionId": "00000000-0000-0000-0000-000000000000",
        "rev": 3,
        "date": "2025-01-15T10:30:00Z",
        "author": {
          "id": "user123",
          "name": "John Doe",
          "email": "john.doe@example.com",
          "login": "johndoe",
          "ra": true
        },
        "authorName": "John Doe",
        "analysisSummary": {
          "id": "00000000-0000-0000-0000-000000000000",
          "initiator": {
            "id": "user123",
            "name": "John Doe",
            "email": "john.doe@example.com",
            "login": "johndoe",
            "ra": true
          },
          "created": "2025-01-15T10:30:00Z",
          "state": "Completed",
          "stateDate": "2025-01-15T10:35:00Z",
          "stateDetails": "Analysis completed successfully",
          "operationId": "op-12345"
        }
      },
      "type": "Article",
      "state": "Active",
      "projects": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "items": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "isShared": false
    }
  ]
}

POST /questionnaire/rag/file-to-md#

概要: ファイルから Markdown コンテンツを取得

リクエストボディ (multipart/form-data):

{
  "url": "https://example.com/file.pdf",
  "file": "binary"
}

レスポンス (200):

"Markdown content from file"

POST /questionnaire/rag/article/create#

概要: 記事作成

リクエストボディ (multipart/form-data):

{
  "code": "ART-001",
  "name": "Article Title",
  "description": "Article description",
  "content": "# Article Content\n\nThis is the article content.",
  "url": "https://example.com/file.pdf",
  "file": "binary"
}

レスポンス (200):

{
  "code": "ART-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Article Title",
  "description": "Article description",
  "documentTypes": null,
  "size": 150,
  "revision": null,
  "type": "Article",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/article/check#

概要: 記事の存在確認

パラメータ:

名前場所必須説明
codequerystringはい記事コード

レスポンス (200):

true

GET /questionnaire/rag/article-info#

概要: コードで記事情報取得

パラメータ: 同上

レスポンス (200):

{
  "code": "ART-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Article Title",
  "description": "Article description",
  "documentTypes": null,
  "size": 150,
  "revision": null,
  "type": "Article",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/article#

概要: コードで記事コンテンツ取得

パラメータ:

名前場所必須説明
codequerystringはい記事コード
formatquerystringいいえtrue の場合は HTML コンテンツを返す。省略時は Markdown 形式で返す
splitquerybooleanいいえtrue の場合は RAG 要素で分割したコンテンツを返す
cssquerybooleanいいえtrue の場合は CSS を含む HTML/PDF コンテンツを返す

レスポンス (200):

"# Article Title\n\nThis is the article content in Markdown format."

POST /questionnaire/rag/article#

概要: 記事メタデータ更新

リクエストボディ:

{
  "code": "ART-001",
  "name": "Updated Article Title",
  "description": "Updated description",
  "projects": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "documentTypes": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Type Name",
      "plural": "Type Names"
    }
  ],
  "isShared": true,
  "state": "Active"
}

レスポンス (200):

{}

DELETE /questionnaire/rag/article#

概要: 記事削除

パラメータ: code (query, string, 必須)


GET /questionnaire/rag/article/pdf#

概要: コードで記事を PDF 取得

パラメータ: code (query, string, 必須)

レスポンス (200):

(pdf binary)

GET /questionnaire/rag/article/content#

概要: 記事コンテンツ取得

パラメータ: code (query, string, 必須)

レスポンス (200):

{
  "content": "# Article Title\n\nContent here."
}

POST /questionnaire/rag/article/content#

概要: 記事コンテンツ更新

リクエストボディ (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Updated Content",
  "file": "binary"
}

POST /questionnaire/rag/plural#

概要: 名詞の複数形取得

パラメータ:

名前場所必須説明
nounquerystringいいえ複数形に変換したい名詞

レスポンス (200):

{
  "plural": "Articles"
}

POST /questionnaire/rag/article/find-types#

概要: AI で記事を解析しタイプを返す

リクエストボディ (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Article Content"
}

レスポンス (200):

[
  {
    "plural": "Types"
  }
]

POST /questionnaire/rag/article/format-with-ai#

概要: AI で記事コンテンツを整形

リクエストボディ (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Article Content"
}

レスポンス (200):

{
  "formattedContent": "# Formatted Article Content"
}

POST /questionnaire/rag/article/improve-on-suggestions#

概要: 提案に基づきドキュメントを改善

リクエストボディ (multipart/form-data):

{
  "suggestions": [
    {
      "sectionTitle": "Introduction",
      "suggestion": "Add more details here."
    }
  ],
  "code": "ART-001",
  "content": "# Article Content"
}

レスポンス (200):

{
  "improvedContent": "# Improved Content"
}

GET /questionnaire/rag/article/parts#

概要: 記事パーツ一覧取得

パラメータ:

名前場所必須説明
idqueryarrayはい記事パーツの ID リスト

レスポンス (200):

[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "code": "part-1",
    "title": "Introduction",
    "orderNumber": 1,
    "content": "Introduction content."
  }
]

GET /questionnaire/rag/article/revisions#

概要: 記事リビジョン一覧取得

パラメータ: code (query, string, 必須)

レスポンス (200):

[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "collectionId": "00000000-0000-0000-0000-000000000000",
    "rev": 1,
    "date": "2025-01-15T10:30:00Z",
    "author": {
      "id": "user123",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "login": "johndoe",
      "ra": true
    },
    "authorName": "John Doe",
    "analysisSummary": {
      "id": "00000000-0000-0000-0000-000000000000",
      "initiator": {
        "id": "user123",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "login": "johndoe",
        "ra": true
      },
      "created": "2025-01-15T10:30:00Z",
      "state": "Completed",
      "stateDate": "2025-01-15T10:35:00Z",
      "stateDetails": "Analysis completed",
      "operationId": "op-12345"
    }
  }
]

GET /questionnaire/rag/article/revisions/info/{id}#

概要: 記事リビジョン情報取得

パラメータ: id (path, string (uuid), 必須)

レスポンス (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "collectionId": "00000000-0000-0000-0000-000000000000",
  "rev": 1,
  "date": "2025-01-15T10:30:00Z",
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "authorName": "John Doe",
  "analysisSummary": {
    "id": "00000000-0000-0000-0000-000000000000",
    "initiator": {
      "id": "user123",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "login": "johndoe",
      "ra": true
    },
    "created": "2025-01-15T10:30:00Z",
    "state": "Completed",
    "stateDate": "2025-01-15T10:35:00Z",
    "stateDetails": "Analysis completed",
    "operationId": "op-12345"
  }
}

GET /questionnaire/rag/article/revisions/{id}#

概要: 記事リビジョンコンテンツ取得

パラメータ: id (path, string (uuid), 必須)

レスポンス (200):

"# Article Revision Content\n\nPrevious version."

GET /questionnaire/rag/article/analyze#

概要: AI で記事コンテンツを解析

パラメータ:

名前場所必須説明
codequerystringはい記事コード
revqueryinteger (int32)いいえリビジョン番号
forcequerybooleanいいえ既存の未完了解析結果がある場合に新規解析を強制し削除する

レスポンス (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "initiator": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "created": "2025-01-15T10:30:00Z",
  "state": "Completed",
  "stateDate": "2025-01-15T10:35:00Z",
  "stateDetails": "Analysis completed",
  "operationId": "op-12345"
}

GET /questionnaire/rag/article/analyze/{id}#

概要: 記事解析結果取得

パラメータ: id (path, string (uuid), 必須)

レスポンス (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "initiator": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "created": "2025-01-15T10:30:00Z",
  "state": "Completed",
  "stateDate": "2025-01-15T10:35:00Z",
  "stateDetails": "Analysis completed",
  "operationId": "op-12345",
  "fragments": [
    "fragment-1",
    "fragment-2"
  ],
  "ownInconcies": "Own inconsistencies found",
  "ragInconcies": "RAG inconsistencies found",
  "proposals": "Improvement proposals"
}

GET /questionnaire/rag/messages/list#

概要: メッセージ一覧取得

パラメータ:

名前場所必須説明
idquerystring (uuid)はいRAG コレクション ID
itemquerystring (uuid)いいえRAG アイテム ID
messagequerystring (uuid)いいえメッセージ ID
ascquerybooleanいいえ昇順ソート
psqueryinteger (int32)いいえページサイズ
pqueryinteger (int32)いいえ1 から始まるページ番号

レスポンス (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "replyTo": null,
      "questionnaire": null,
      "section": null,
      "question": null,
      "ragCollection": "00000000-0000-0000-0000-000000000000",
      "ragItem": "00000000-0000-0000-0000-000000000000",
      "targetId": "00000000-0000-0000-0000-000000000000",
      "targetType": "Question",
      "targetNum": 1,
      "author": {
        "id": "user123",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "login": "johndoe",
        "ra": true
      },
      "text": "Message content",
      "created": "2025-01-15T10:30:00Z",
      "updated": "2025-01-15T10:30:00Z",
      "replies": 0
    }
  ]
}

POST /questionnaire/rag/messages/add#

概要: 新規メッセージ追加

パラメータ:

名前場所必須説明
idquerystring (uuid)はいRAG コレクション ID
itemquerystring (uuid)いいえRAG アイテム ID
messagequerystring (uuid)いいえ返信対象メッセージ ID

リクエストボディ:

{
  "text": "New message content"
}

レスポンス (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "replyTo": null,
  "questionnaire": null,
  "section": null,
  "question": null,
  "ragCollection": "00000000-0000-0000-0000-000000000000",
  "ragItem": "00000000-0000-0000-0000-000000000000",
  "targetId": "00000000-0000-0000-0000-000000000000",
  "targetType": "Question",
  "targetNum": 1,
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "text": "New message content",
  "created": "2025-01-15T10:30:00Z",
  "updated": "2025-01-15T10:30:00Z",
  "replies": 0
}

POST /questionnaire/rag/message#

概要: 既存メッセージ更新

パラメータ:

名前場所必須説明
cquerystring (uuid)はいRAG コレクション ID
idquerystring (uuid)はいメッセージ ID

リクエストボディ:

{
  "text": "Updated message content"
}

レスポンス (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "replyTo": null,
  "questionnaire": null,
  "section": null,
  "question": null,
  "ragCollection": "00000000-0000-0000-0000-000000000000",
  "ragItem": "00000000-0000-0000-0000-000000000000",
  "targetId": "00000000-0000-0000-0000-000000000000",
  "targetType": "Question",
  "targetNum": 1,
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "text": "Updated message content",
  "created": "2025-01-15T10:30:00Z",
  "updated": "2025-01-15T10:45:00Z",
  "replies": 0
}

DELETE /questionnaire/rag/message#

概要: 既存メッセージ削除

パラメータ: id (query, string (uuid), 必須)

レスポンス (200):

{}

RagFaq#

GET /questionnaire/rag/faq-collections/summary#

概要: ホームページ用サマリー

パラメータ: proj (query, string (uuid), いいえ)

レスポンス (200):

{
  "active": 3
}

GET /questionnaire/rag/faq-collections/total#

概要: FAQ コレクション数

パラメータ:

名前場所必須説明
qquerystringいいえコレクション名またはコードでフィルタ
statequeryarrayいいえ状態でフィルタ
projectqueryarrayいいえプロジェクトでフィルタ

レスポンス (200):

3

GET /questionnaire/rag/faq-collections/list#

概要: FAQ コレクション一覧取得

パラメータ: 同上(q, state, project, s, asc, ps, p

レスポンス (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 3,
    "totalPages": 1
  },
  "items": [
    {
      "code": "FAQ-001",
      "org": "00000000-0000-0000-0000-000000000000",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "FAQ Collection",
      "description": "FAQ collection description",
      "documentTypes": null,
      "size": 5,
      "revision": null,
      "type": "Faq",
      "state": "Active",
      "projects": null,
      "items": null,
      "isShared": false
    }
  ]
}

GET /questionnaire/rag/faq-collections/find-items#

概要: FAQ アイテム検索

パラメータ:

名前場所必須説明
qquerystringはい質問でフィルタ
projectquerystring (uuid)いいえプロジェクトでフィルタ
psqueryinteger (int32)いいえページサイズ
pqueryinteger (int32)いいえ1 から始まるページ番号

レスポンス (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "index": 0,
      "question": "What is this product?",
      "answer": "This is a great product.",
      "comment": "Product FAQ",
      "state": "Active"
    }
  ]
}

POST /questionnaire/rag/faq-collection/create#

概要: 新規 FAQ コレクション作成

リクエストボディ (multipart/form-data):

{
  "code": "FAQ-001",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "content": "Content here",
  "file": "binary"
}

レスポンス (200):

{
  "code": "FAQ-001",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "documentTypes": null,
  "size": 5,
  "revision": null,
  "type": "Faq",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

POST /questionnaire/rag/faq-collection#

概要: FAQ コレクションメタデータ更新

リクエストボディ:

{
  "code": "FAQ-001",
  "name": "Updated FAQ Collection",
  "description": "Updated description",
  "projects": null,
  "documentTypes": null,
  "isShared": false,
  "state": "Active"
}

DELETE /questionnaire/rag/faq-collection#

概要: FAQ コレクション削除

パラメータ: code (query, string, 必須)

GET /questionnaire/rag/faq-collection#

概要: FAQ コレクション取得

パラメータ: code (query, string, 必須)

レスポンス (200):

{
  "code": "FAQ-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "documentTypes": null,
  "size": 5,
  "revision": null,
  "type": "Faq",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/faq-collection/check#

概要: FAQ コレクションの存在確認

パラメータ: code (query, string, 必須)

レスポンス (200):

true

GET /questionnaire/rag/faq-collection/items-total#

概要: FAQ アイテム数取得

パラメータ:

名前場所必須説明
codequerystringはいコレクションコード
qquerystringいいえアイテム内容でフィルタ

リクエストボディ:

["Active", "Default"]

レスポンス (200):

5

GET /questionnaire/rag/faq-collection/items#

概要: FAQ アイテム一覧取得

パラメータ: code, q, state, s, asc, ps, p(同様)

レスポンス (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "index": 0,
      "question": "What is this product?",
      "answer": "This is a great product.",
      "comment": "Product FAQ",
      "state": "Active"
    }
  ]
}

POST /questionnaire/rag/faq-collection/item/create#

概要: 新規 FAQ アイテム作成

リクエストボディ:

{
  "code": "FAQ-001",
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

レスポンス (200):

{
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

GET /questionnaire/rag/faq-collection/item#

概要: FAQ アイテム取得

パラメータ: code (query, string, 必須), index (query, integer (int32), 必須)

レスポンス (200):

{
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

POST /questionnaire/rag/faq-collection/item#

概要: FAQ アイテム更新

リクエストボディ:

{
  "code": "FAQ-001",
  "index": 0,
  "newIndex": 1,
  "question": "Updated question?",
  "answer": "Updated answer.",
  "comment": "Updated comment",
  "state": "Active"
}

DELETE /questionnaire/rag/faq-collection/item#

概要: FAQ アイテム削除

パラメータ: code (query, string, 必須), index (query, integer (int32), 必須)


RagQuery#

POST /questionnaire/rag/query#

概要: RAG ナレッジベースでクエリ実行

リクエストボディ:

{
  "project": "00000000-0000-0000-0000-000000000000",
  "excludeCollections": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "question": "What is this product?",
  "yourCompanyName": "Acme Corp",
  "yourCompanyAlias": "Acme",
  "customerName": "John Doe",
  "options": [
    "option1",
    "option2"
  ],
  "multiselect": false,
  "nArticles": 5,
  "nFaqs": 3,
  "threshold": 0.5,
  "debug": false,
  "withJustification": true,
  "withConfidenceLevel": true,
  "withFragments": true,
  "nAttempts": 3
}

レスポンス (200):

{
  "attempt": 1,
  "preparedQuery": {
    "original": "What is this product?",
    "enhanced": "What is this product and its features?"
  },
  "ragItems": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "distance": 0.25
    }
  ],
  "question": "What is this product?",
  "generalInstructions": "Based on the knowledge base, here is the answer:",
  "text": "This product is a great solution for your needs.",
  "explanation": "The answer was found in multiple sources with high confidence."
}

POST /questionnaire/rag/query-stream#

概要: RAG ナレッジベースでストリームクエリ実行

リクエストボディ: 同上

レスポンス (200):

[
  {
    "text": "This product is a great solution",
    "fragments": [
      {
        "id": "00000000-0000-0000-0000-000000000000",
        "part": 1,
        "distance": 0.25,
        "type": "Article",
        "code": "ART-001",
        "title": "Product Title",
        "fragment": "Product content fragment"
      }
    ]
  },
  {
    "text": " for your needs.",
    "fragments": []
  }
]

POST /questionnaire/rag/query-fragments#

概要: RAG ナレッジベースでフラグメント検索

リクエストボディ:

{
  "project": "00000000-0000-0000-0000-000000000000",
  "exclude_documents": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "query": "What is this product?",
  "top_k": 5,
  "similarity_threshold": 0.5,
  "prepare_query": true
}

レスポンス (200):

{
  "results": [
    {
      "document_id": "00000000-0000-0000-0000-000000000000",
      "document_code": "ART-001",
      "document_title": "Product Title",
      "revision": 3,
      "chunk_index": 0,
      "content": "Product content fragment",
      "metadata": {
        "author": "John Doe",
        "created_at": "2025-01-15T10:30:00Z",
        "last_updated_at": "2025-01-15T10:35:00Z",
        "doc_categories": [
          "Product",
          "Information"
        ]
      },
      "similarity_score": 0.85
    }
  ]
}

関連記事#

トップへ
言語を選択