MENU
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
データ流通、検索エンジン開発のプロフェッショナル
DataStructor
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
DataStructor
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
  1. ホーム
  2. AI_Agent
  3. Agent開発
  4. AI Agent開発日記 2025/05/03

AI Agent開発日記 2025/05/03

2025 5/03
AI_Agent 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: []

人気記事

  • BigQueryの無料枠を活用しよう!制限と注意点、活用方法を解説
  • BigQueryでエラー解決!よくあるエラーと対処法
  • BigQueryのレベル別学習リソースまとめ!初心者から上級者まで役立つ情報源
  • 【SUUMOスクレイピング】Struccleで物件データを全件収集
  • BigQuery入門!無料データでSQLの基本文字列関数をマスター
AI_Agent Agent開発
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次
カテゴリー
  • AI_Agent (110)
    • Agent開発 (110)
  • BigQuery (100)
    • BigQueryTips (11)
    • BigQueryでデータ分析 (49)
    • BigQueryのFAQ (1)
    • BigQuery入門 (8)
    • BigQuery学習教材 (22)
    • BigQuery導入ガイド (3)
    • BigQuery最新情報 (3)
    • BigQuery活用事例 (4)
  • Struccle (153)
    • Struccleでスクレイピング (10)
      • suumoの物件データを収集&分析 (1)
      • アニマルジョブの電話番号、メールアドレスを全件収集 (1)
      • データ集計 (6)
      • ホットペッパービューティーのヘアサロンデータを収集&分析 (1)
      • 食べログの飲食店データを収集&分析 (1)
    • Struccleデータ料金事例 (142)
      • 商品分析 (15)
      • 営業リスト (88)
      • 競合分析&市場調査 (58)
      • 自動車 (11)
      • 自社活用 (7)
    • Struccle活用企業様の紹介 (1)
  • 当ブログのコーディング実行環境設定 (2)
目次