Skip to main content

Building a Data Science Agent with Google's ADK

Google for DevelopersApril 22, 202548 min40,551 views
45 connections·40 entities in this video→

Evolution of AI Agents

  • πŸ’‘ Early generative AI focused on LLMs and prompting, evolving to incorporate RAG pipelines for external knowledge.
  • πŸš€ The next step involved adding function calling and tools to LLMs, enabling them to perform actions.
  • 🧠 Current agents represent a sophisticated evolution, featuring LLM reasoning and planning, tool execution, session management, and orchestration.
  • 🀝 The trend is moving towards multi-agent systems, requiring orchestration and communication between multiple agents.

Agent Development Kit (ADK) Overview

  • πŸ› οΈ The ADK is a client-side framework and SDK for building sophisticated multi-agent solutions.
  • 🧩 It simplifies setting up agents, agent tools, and multi-agent systems, handling sessions and orchestration.
  • πŸ”— Out-of-the-box tools include function calls and retrieval tools (e.g., for files, AI search, RAG), with the ability to create custom tools.

Data Science Agent Architecture

  • 🎯 The Database Agent handles SQL execution against datasets, including SQL validation and fixing.
  • πŸ“Š The Data Science Agent performs NL2Py workloads, generates plots, and executes Python code using extensions like code interpreters.
  • πŸ€– The BQML Agent supports advanced data science tasks, including writing BQML SQL statements for model training and inference.
  • πŸ‘‘ The Root Agent acts as the orchestrator, communicating with the user and routing queries to the appropriate agents or tools.

Codebase and Workflow

  • πŸ“‚ The codebase follows a pattern with agent.py, instructions.py, and tools.py for each agent, facilitating iteration and customization.
  • πŸ“ Instructions.py centralizes prompts and instructions, allowing for easier prompt tuning and optimization.
  • βš™οΈ Tools.py defines the tools available to an agent, including agent tools and custom functions like load_artifacts.
  • 🧠 Callback contexts (before/after agent calls) allow for pre-computation, such as providing BigQuery schema details to the root agent for efficiency.
  • πŸ”— The Tool Context acts as a short-term memory for tool-related information, accessible by multiple tools within a session.

Demo and Key Features

  • πŸš€ The ADK includes a built-in developer front-end (invoked via ADK web) for interacting with multi-agent systems without custom UI code.
  • πŸ“ˆ The demo showcases invoking the Database Agent for data retrieval and the Data Science Agent for plot generation.
  • πŸ€– The BQML Agent is demonstrated for training forecasting models, highlighting its ability to refine plans and handle errors.
  • πŸ† The ADK and its agents can be used for advanced tasks like competing in Kaggle competitions, achieving top rankings with minimal prior experience.
Knowledge graph40 entities Β· 45 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
40 entities
Chapters18 moments

Key Moments

Transcript178 segments

Full Transcript

Topics15 themes

What’s Discussed

Agent Development Kit (ADK)AI AgentsMulti-agent SystemsData ScienceLarge Language Models (LLMs)RAG PipelinesFunction CallingTool UseOrchestrationBigQueryBQMLNL2PyPrompt EngineeringCode InterpreterSQL Generation
Smart Objects40 Β· 45 links
ProductsΒ· 12
ConceptsΒ· 21
MediasΒ· 2
PeopleΒ· 3
CompaniesΒ· 2