HAL_DATA_techBlog

HALDATAの技術ブログです。

Eコマースアシスタントシステム – 従来のチャットボットからマルチエージェントアシスタントへ

文責/ベトナム エンジニア: Souta

ネット通販サイトでは、AIチャットボットを実装する要望が高まってきています。
しかし、現時点で多くのAIチャットボットは、「この機能がある商品を教えて」といった簡単な質問にしか対応できません。

例えば、
「引用元のレビューを見たい」
「実際に使った人の感想を知りたい」
などのより詳しい情報を求めたとき、
AIチャットボットは、保持データが少なかったり、各種作業を同時にこなせなかったりして、うまく対応できないことがよくあります。

では、こうした基本的なAIチャットボットを、どうすれば
**本物の「買い物アシスタント」**に進化させられるのでしょうか?

一緒に探ってみましょう。

1. Google ADKのマルチエージェント的な考え方:「専門家チーム」を動かす

GoogleのAgent Development Kit(ADK)は、「マルチエージェント方式」という新しい仕組みを導入しました。これは、大きな作業をいくつかの小さな作業に分け、それぞれのエージェント(仮想の担当者)が特定の作業だけを専門的に行うという考え方です。エージェントは自分の担当する作業をとても高い精度でこなすことが求められます。

このやり方には、いくつかのメリットがあります。たとえば:

  • 一つのエージェントに負担が集中せず、効率的に働ける

  • 作業の指示(プロンプト)を分けて管理しやすくなる

  • システムの機能をプラグインのように簡単に追加・変更できる

  • 必要に応じて、作業を同時に進めたり、順番に行ったりできる

このように、ADKの仕組みは柔軟で使いやすく、さまざまな場面に対応できるよう工夫されています。

 

2. イーコマース・アシスタントのアーキテクチャ概要

私たちは、先ほど紹介した仕組みをもとに「イーコマース・アシスタント」というシステムを開発しました。
このシステムは、いくつかの役割を持つエージェント(仮想の担当者)が階層的に働く構造になっており、それぞれの階層には明確な担当が割り振られています。

  • オーケストレーター・エージェント(Orchestrator Agent)
    ユーザーと直接やり取りをしながら、さまざまなツールやエージェント向けツールをうまく活用して、リクエストを実現するための調整を行います。
  • シンセサイザー・エージェント(Synthesizer Agent)
    集められた生のデータを分かりやすく整理し、ユーザーに伝える役割を担っています。
  • これらのエージェントは、Google ADKに組み込まれている**シーケンシャル・エージェント(Sequential Agent)**という仕組みの中で動作しています。
    このシーケンシャル・エージェントにより、各エージェントが決められた順番でスムーズに処理を進めることが可能になっています。

3. Orchestrator Agentのツールシステム

上で紹介したシステムは、私たちが使っているすべてのエージェントを表しているわけではありません。
実は、オーケストレーター・エージェントの中には、複数の**エージェントツール(Agent Tool)が組み込まれています。
では、この「エージェントツール」**とは一体何なのか? そして、なぜそれを使っているのでしょうか?

私たちが直面したあるケースを見てみましょう。

以前は、それぞれの作業に対応するために、個別のサブエージェントを作成して対応していました。
しかし、複数のエージェントを連携させて動かす必要がある場面になると、うまくいかないことがありました。
というのも、オーケストレーターが一度サブエージェントに処理を任せてしまうと、その間は他のエージェントを同時に調整できず、結果をうまく統合できなくなってしまったのです。

この問題を解決するために、私たちはGoogle ADKの**「エージェントツール」**という考え方を取り入れました。
これは、エージェントをツールのように扱い、「処理を実行して結果だけを返す」ようにする仕組みです。
この方法により、オーケストレーターは全体の流れを常にコントロールし続けることができるようになりました。

3.1. ビューポイント分析エージェントツール(Viewpoint Analysis Agent Tool)

ビューポイント分析エージェントツール(Viewpoint Analysis Agent Tool)は、あらかじめ設定された特定の視点から商品を評価するための仕組みです。

各商品カテゴリにおいて、ユーザーが購入時に重視する観点に基づいてレビューを分類・採点する分析システムを構築しています。
こうして得られた構造化データを活用し、ユーザーが選んだ視点にもっとも合致する上位の商品を提示します。

3.2. 類似検索エージェントツール(Similarity Agent Tool)

類似検索エージェントツール(Similarity Agent Tool)は、ユーザーのリクエストに類似した商品を検索する役割を担います。

商品説明や用途、レビュー内容などをもとに、現在のクエリと高い一致度を持つアイテムを抽出します。
とくに、ユーザーの検索内容がシステムであらかじめ定義された視点にうまく当てはまらない場合に、効果を発揮します。

3.3. 商品詳細エージェントツール(Product Detail Agent Tool)

商品詳細エージェントツール(Product Detail Agent Tool)は、商品に関する深い知見を提供する「専門家」のような役割を果たします。

必要に応じて、商品の詳細情報やあらかじめ定められた評価基準にもとづくスコア、そして全体的な評価を簡潔にまとめて提示します。

4. イーコマース・アシスタントの特長(Key Differentiators)

専門性の高いエージェント設計(Specialized Expertise)

各エージェントは特定のタスクに専念しており、商品検索から最終的なおすすめまで、すべての処理を高い精度で実行します。

スムーズな連携(Seamless Collaboration)

複雑なリクエストは小さなタスクに分解され、あるエージェントは商品を探し、別のエージェントは特徴を比較し、さらに別のエージェントがメリットを説明します。こうして協力しながら、包括的な回答を提供します。

顧客視点の対話体験(Customer-Focused Interaction)

オーケストレーター・エージェント(Orchestrator Agent)がユーザーの意図をくみ取り、必要に応じて確認質問を挟みながら会話を導きます。これにより、ユーザーが本当に求めている情報に正確にたどり着けます。

柔軟で保守しやすい構造(Modular & Easy to Maintain)

システムは明確なモジュール構成になっており、たとえばセマンティック検索の改善など、一部の機能だけを入れ替え・拡張しても、他の部分に影響を与えることはありません。

 

ENGLISH VERSION

Shopping chatbots are becoming increasingly common on e-commerce platforms, but most still handle only simple tasks such as recommending products based on specific features. If users request more detailed information — such as authentic reviews and real user experiences — these chatbots often struggle to function due to limited data and their inability to handle multiple tasks simultaneously.

So, how can we transform these basic shopping chatbots into genuine shopping assistants? Let’s explore this further.

1. Google ADK's multi-agent mindset: putting the 'team of experts' to work

Google Agent Development Kit (ADK) has introduced multi-agent systems that break down tasks into smaller components, where each agent is responsible for only a few specific subtasks — but must perform them exceptionally well.

This approach offers several benefits, such as: preventing a single agent from shouldering heavy workloads, splitting prompts for better modularity, enabling easy customization and adjustment of system functionalities like plug-ins, and allowing tasks to be executed either in parallel or sequentially as needed.

2. Overview of the EC Chat Architecture

We built EC Chat based on this foundation. Our system consists of multiple layers of agents, with each layer responsible for distinct tasks:

  • Orchestrator Agent: an intermediary assistant that interacts with the user and coordinates a range of Tools and AgentTools to fulfill the request.

  • Synthesizer Agent: receives raw data and interprets it for the user.

  • Both of these agents are encapsulated within a Sequential Agent, a built-in agent library provided by Google ADK, which ensures that the internal agents execute in a sequential flow.

3. Tooling System of the Orchestrator Agent

The above system isn’t all the agents we have. Our Orchestrator Agent contains multiple agent tools inside. So, what exactly is an “agent tool,” and why do we use it?

Let’s consider a case we encountered:

In the past, we created sub-agents to handle individual tasks. However, when a task required coordination among multiple agents, we faced difficulties. Once the orchestrating agent delegated control to a sub-agent, it could no longer coordinate other agents simultaneously to combine their results.

To address this, we adopted Google ADK’s “Agent Tool” concept, encapsulating an agent as a tool that runs tasks and returns results, ensuring the orchestrator stays in control.

3.1. Viewpoint Analysis Agent Tool — a tool that evaluates products from a specific, predefined viewpoint.

For each product category, we’ve built an analysis and scoring system that classifies reviews according to the viewpoints customers care about most when making a purchase. Using this structured dataset, the agent recommends the top products that best align with the user’s selected viewpoint.

3.2.  Similarity Agent Tool  search for products with high similarity to the request

This agent tool is responsible for finding products whose descriptions, intended uses, or user reviews closely match the current query. It is particularly effective when the user’s search does not align with the system’s predefined viewpoints.

3.3. Product Detail Agent Tool — an expert in analyzing product insights

This agent tool acts as a product expert, providing deeper insights when needed. It is designed to retrieve detailed product information, fixed-criterion ratings, and a concise summary of the overall assessment

4. EC Chat: Key Differentiators

  • Specialized Expertise
    Each agent focuses on a single task—so every step, from product lookup to final recommendation, is handled with maximum accuracy.

  • Seamless Collaboration
    Complex requests get broken down: one agent finds products, another compares features, and another explains benefits—working together to deliver a complete answer.

  • Customer-Focused Interaction
    Our Orchestrator Agent listens, asks clarifying questions, and guides the conversation—making sure you get exactly the info you need.

  • Modular & Easy to Maintain
    The system’s clear-cut components let us upgrade or swap out one part (like improving semantic search) without disrupting the rest.