MENU
  • サービス
    • Struccle(ストラクル)
      • スクレイピングテンプレート
    • AI エージェント
  • 事例
  • 料金
  • ブログ
  • FAQ
  • サポート
    • クイックスタート
    • 操作ガイド
    • Struccle コミュニティ
  • 会社概要
    • About us
    • お問い合わせ
  • 資料
上場企業から個人まで、スクレイピングツールの決定版
Struccle
  • サービス
    • Struccle(ストラクル)
      • スクレイピングテンプレート
    • AI エージェント
  • 事例
  • 料金
  • ブログ
  • FAQ
  • サポート
    • クイックスタート
    • 操作ガイド
    • Struccle コミュニティ
  • 会社概要
    • About us
    • お問い合わせ
  • 資料
   12/31まで無料相談受付中
   無料で始める
Struccle
  • サービス
    • Struccle(ストラクル)
      • スクレイピングテンプレート
    • AI エージェント
  • 事例
  • 料金
  • ブログ
  • FAQ
  • サポート
    • クイックスタート
    • 操作ガイド
    • Struccle コミュニティ
  • 会社概要
    • About us
    • お問い合わせ
  • 資料
  1. ホーム
  2. AI_Agent
  3. AI Agent開発日記 2025/05/03

AI Agent開発日記 2025/05/03

2025 5/03
AI_Agent
2025年5月3日
目次

この記事について

本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。

やりたいこと

Agent Builder を用いたデータストア参照型対話エージェントの作成において、
既存のデータストア機能だとデータ数増加により回答率の低下が発生する為、elastic + dataflow + bigqueryで作成した検索が可能なデータストアを実装したい。

前回の調査日記

あわせて読みたい
AI Agent開発日記 2025/05/01 この記事について 本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。 やりたいこと Agent Builder を用いたデータス...

agentbuilderのデータストアtoolとしてElastic Cloudで検索できるよう設定する。

  • やりたいこと
    • Agent Builder Tool から POST メソッドで Elasticsearch への認証付き検索が動作する状態になったが、_source が空になるため原因を調査する。
  • 現状
    • 最終的に下記のようなスキーマ形式に設定し正しいresponseが得られるようになった。
    • 次やりたいこと
      • 対話型での検証を行っていなかったため、Tool Description や playbook を整備し、チャット経由でも正常に検索できるか確認したい。

現状のスキーマ

openapi: 3.0.0
info:
  title: Elasticsearch Search API
  version: v1
servers:
  - url: 'elasticのデプロイurl'
paths:
  /famous-song/_search:
    post:
      summary: Search documents in Elasticsearch using POST
      description: Executes a search query against the 'famous-song' index using POST request with query in the body. Requires ApiKey authentication via Header.
      operationId: searchFamousSongsPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: object
                  description: Query in Elasticsearch Query DSL format. Example - {"match_all":{}}
                size:
                  type: integer
                  description: Number of hits to return.
                  default: 10
              required:
                - query
      responses:
        '200':
          description: Successful response with search results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  took:
                    type: integer
                  timed_out:
                    type: boolean
                  _shards:
                    type: object
                  hits:
                    type: object
                    properties:
                      total:
                        type: object
                      max_score:
                        type: number
                      hits:
                        type: array
                        items:
                          type: object
                          properties:
                            _index:
                              type: string
                            _id:
                              type: string
                            _score:
                              type: number
                            _source:
                              type: object
                              properties:
                                famous_song:
                                  type: string
                                name:
                                  type: string
                                id:
                                  type: string
                              required:
                                - famous_song
                                - name
                                - id
        '400':
          description: Bad Request. Invalid request body or query syntax.
        '401':
          description: Unauthorized. Invalid API Key or authentication setup.
        '404':
          description: Not Found. Index 'famous-song' not found.
        '500':
          description: Internal Server Error. Elasticsearch error.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: "Elasticsearch API Key authentication. Value should be 'ApiKey YOUR_BASE64_ENCODED_ID:API_KEY'. Provide this full value in Agent Builder auth settings."
security:
  - ApiKeyAuth: []
AI_Agent
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
カテゴリー
人気記事
  • 【SUUMOスクレイピング】Struccleで物件データを全件収集
  • 【食べログスクレイピング】Struccleで飲食店データを全件収集し、法人リスト作成
  • 【ホットペッパービューティースクレイピング】Struccleでヘアサロンデータを全件収集
  • Struccle、DataStructor活用企業様の紹介
  • 【料金事例】営業コンサル企業が営業リスト収集のためSPEEDAから営業リスト収集
新着記事
  • 【決定版】Chromeスクレイピング拡張機能比較!7選
  • 「カスタム収集」の基本的な使い方
  • 「カスタム収集」とは?
目次
目次