Skip to Content
GenAI on Google Cloud
book

GenAI on Google Cloud

by Ayo Adedeji, Lavi Nigam, Sarita Joshi, Stephanie Gervasi
January 2026
Intermediate to advanced
320 pages
9h 58m
English
O'Reilly Media, Inc.
Content preview from GenAI on Google Cloud

Chapter 5. Evaluation and Optimization Strategies

We’ve now constructed our multimodal question-answering agent, a system capable of ingesting diverse data types and providing relevant answers. It works; it fulfills its designed function. In the world of LLMs and agents, however, “functional” is just the starting line. The real challenge—and where true value is unlocked—lies in the journey from functional to optimal.

How quickly does it respond? How consistently accurate is it across a vast range of unseen queries, especially ambiguous ones? If it uses tools, how reliably and efficiently does it invoke them? Are its responses not just correct, but also concise, helpful, and perfectly aligned with the user’s nuanced intent? And, critically, as your systems evolve and interact with more complex data and tasks, how do you ensure they maintain performance, learn from experience, and continuously improve?

This chapter explores practical approaches for evaluation and optimization—two sides of the same coin in the journey to production excellence. You can’t meaningfully improve what you can’t measure, and you can’t know if your optimizations are effective without robust evaluation methods. We’ve structured this chapter to reflect this natural cycle: first establishing frameworks for systematically measuring performance across multiple dimensions, then applying targeted optimization techniques based on those insights.

In the evaluation section, we’ll explore both human-centered assessment ...

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

Generative AI on Google Cloud with LangChain

Generative AI on Google Cloud with LangChain

Leonid Kuligin, Jorge Zaldívar, Maximilian Tschochohei
Generative AI on AWS

Generative AI on AWS

Chris Fregly, Antje Barth, Shelbee Eigenbrode
Visualizing Google Cloud

Visualizing Google Cloud

Priyanka Vergadia

Publisher Resources

ISBN: 9798341623842Errata Page