Optimize Google GenAI
LLM Providers
Use Future AGI's agent-opt SDK to rewrite your Google GenAI prompts with measurable improvement on the metrics that matter to you.
Recipes for Google GenAI
Prerequisites
Before you start
- · A working Google GenAI app — local or already in production.
- · A free Future AGI account with
FI_API_KEYandFI_SECRET_KEY. - · Python 3.9+ / Node 18+ / Java 17+ depending on which SDK you're installing.
- · A dataset of ≥50 examples — Future AGI auto-builds these from your trace history.
Install
pip install traceAI-google-genaiOptimize recipe
from agent_opt import GEPAOptimizer
from fi.evals.templates import Groundedness, PromptAdherence
optimizer = GEPAOptimizer(
seed_prompt="<your current Google GenAI system prompt>",
objectives=[Groundedness(), PromptAdherence()],
rounds=8,
)
best_prompt, score = optimizer.run(dataset_id="google-genai_eval_set_v1")
print(f"+{score.delta}% on grounded answers")What Future AGI captures
Optimize fields you'll see in the dashboard
-
Use a Future AGI dataset of failed Google GenAI traces as the optimisation target
-
GEPA, ProTeGi, PromptWizard, MetaPrompt, Bayesian, and Random optimisers — same interface
-
Each optimiser run produces a new prompt version with a measured score delta
-
Push the best prompt back to your prompt registry and replay through the same eval suite
Common gotchas
Read these before you ship
- 01
Seed prompt must include the placeholder format your dataset uses (`{{question}}`, `{input}`, etc.).
- 02
GEPA needs ≥50 examples to converge; for smaller sets prefer ProTeGi or PromptWizard.
- 03
Set a hard `rounds` cap — optimisers will keep improving past your budget if you let them.
Next: chain it with the other recipes
Optimize is the first step. Most teams add an evaluator the same week, and start optimising or simulating once they have a baseline. Each recipe takes minutes to wire up.
Adjacent integrations
More integrations like Google GenAI
OpenAI
GPT-4o, GPT-5, o-series, and the OpenAI Responses API.
Anthropic
Claude Opus, Sonnet, and Haiku via the Anthropic Messages API.
Cohere
Command, Embed, and Rerank via the Cohere API.
Mistral
Mistral Large, Codestral, and open-weight Mistral / Mixtral.