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

AI Agent開発日記 2025/04/30

2025 4/30
AI_Agent Agent開発
2025年4月30日
目次

この記事について

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

やりたいこと

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

前回の調査日記

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

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

  • やりたいこと
    • agentbuilderのtoolを設定後下記エラーが発生したから解決したい。
  • 試したこと
    • toolを設定
      • 名前
        • 有名な曲検索tool
      • type
        • openapi
      • Description
        • このtoolはユーザーからの検索指示によってトリガーされます。
          Elasticsearchでユーザーのクエリを元に検索し、検索結果を返します。
      • Schema
        • yaml形式
        • 内容は下記に記載
      • Authentication
        • Authentication type
          • apikey
        • API Key Location
          • request header
        • apikey
          • Raw value
            • elasticsearchのapikeyを指定
  • 現状
    • agentbuilderのtoolのスキーマと認証情報を設定後、下記の認証情報に間違いがあるというエラーが発生したから修正中。

現状のスキーマ


openapi: 3.0.0
info:
  title: Elasticsearch Property Search API
  version: v1
servers:
  - url: 'elasticのエンドポイントURL'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
security:
  - ApiKeyAuth: []
paths:
  /famous-song/_search:
    post:
      summary: Search properties in Elasticsearch
      description: Executes a search query against an Elasticsearch index for properties.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: object
                  description: Query in Elasticsearch Query DSL format.
      responses:
        '200':
          description: Successful response with search results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  took:
                    type: integer
                    description: Time taken for the query in milliseconds.
                  timed_out:
                    type: boolean
                    description: Indicates if the query timed out.
                  _shards:
                    type: object
                    properties:
                      total:
                        type: integer
                      successful:
                        type: integer
                      skipped:
                        type: integer
                      failed:
                        type: integer
                  hits:
                    type: object
                    properties:
                      total:
                        type: object
                        properties:
                          value:
                            type: integer
                          relation:
                            type: string
                      max_score:
                        type: number
                      hits:
                        type: array
                        items:
                          type: object
                          properties:
                            _index:
                              type: string
                            _type:
                              type: string
                            _id:
                              type: string
                            _score:
                              type: number
                            _source:
                              type: object
                              properties:
                                property_id:
                                  type: integer
                                location:
                                  type: string
                                type:
                                  type: string
                                status:
                                  type: string
                                nearest_station:
                                  type: string
                                price:
                                  type: integer
                                area_sqm:
                                  type: number

エラー内容

generic::UNAUTHENTICATED: {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/famous-song/_search]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\", charset=\"UTF-8\""]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/famous-song/_search]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\", charset=\"UTF-8\""]}},"status":401}

人気記事

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