Skip to Content
Google CloudではじめるAI/ML入門 ―ハンズオンで学ぶデータ基盤、分析、エージェント開発
book

Google CloudではじめるAI/ML入門 ―ハンズオンで学ぶデータ基盤、分析、エージェント開発

by 藤森 立, 岡安 優, 原 和希, 徳山 健斗
August 2026
Intermediate to advanced
552 pages
8h 9m
Japanese
O'Reilly Japan, Inc.
Content preview from Google CloudではじめるAI/ML入門 ―ハンズオンで学ぶデータ基盤、分析、エージェント開発

14章BigQueryで呼び出したGeminiによる会話情報のカテゴライズ

寄稿:堂原 竜希

14.1 はじめに

本章の内容を学習することで、データウェアハウスに蓄積されたテキストデータに対する生成AIを用いた自然言語処理を、アプリケーションサーバーや複雑なデータパイプラインを別途構築することなくSQLのみで完結させる手法を習得できます。これにより、大量のテキストデータ(会話履歴など)を生成AIを用いて効率的に分析、分類する自動化基盤を構築可能になります。

この章の内容
  • Agent Studio(旧称:Vertex AI Studio)を用いた検証用データの作成
  • BigQueryのAI.GENERATE関数を用いた、SQLによるカテゴライズ処理の実装
  • スケジュールされたクエリを活用した日次バッチ処理の自動化

生成AIのよくある使い方の1つに対話型チャットボットがあります。Geminiウェブアプリに代表されるように、ユーザーのさまざまなメッセージに対して、適切な返答を生成AIが作成し返信します。このようなチャットボットを組織で運用するケースもあり、その場合は会話履歴をBigQueryに代表されるようなデータウェアハウスへ記録できます。

本章の目的は、チャットボットの会話履歴を生成AIを用いて自動的にカテゴライズするデータ処理基盤を構築することです。そのために、まずはAgent Studioを用いて検証用のサンプルデータを作成し、BigQueryへアップロードする手順から進めます。次に、BigQueryからGeminiを呼び出すための接続設定やIAMポリシーの設定を行い、実際にAI.GENERATE関数を活用したカテゴライズ処理のクエリを実行します。最後に、日次でデータを効率的に増分更新するためのスケジュール実行の設定方法について解説します。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

クラウドデータレイク ―無限の可能性があるデータを無駄なく活かすアーキテクチャ設計ガイド

クラウドデータレイク ―無限の可能性があるデータを無駄なく活かすアーキテクチャ設計ガイド

Rukmani Gopalan, 丸本 健二郎, 長尾 高弘
生成AI時代の価値のつくりかた ―実践者のマインド、スキル、データ、ユースケース

生成AI時代の価値のつくりかた ―実践者のマインド、スキル、データ、ユースケース

Rob Thomas, Paul Zikopoulos, Kate Soule, 本多 真二郎, オライリー・ジャパン編集部

Publisher Resources

ISBN: 9784814401741Publisher Website