Operator-ready prompt for reuse, tuning, and workspace runs.
This item is set up for developers who want to inspect the original language, fork it into Workspace, and adapt the evidence model without losing the source prompt structure.
Implementation handoffs, eval setup, and prompt tuning where you need the original structure intact.
Inspect first, copy once, then fork into Workspace when you want variants, notes, and model settings attached to the same run.
Swap domain facts, examples, and any hard-coded entities for your own context.
Tighten the evidence or verification requirement if this is headed toward production.
Decide which failure mode you want to evaluate first before you branch the prompt.
This prompt already carries implementation detail, tool context, and a final-output instruction. Keep that structure intact when you tune it, or your comparison runs get noisy fast.
Open this prompt inside Workspace when you want a live iteration loop.
Copy for quick reuse, or run it in Workspace to keep prompt variants, model settings, and prompt-history changes in one place.
Structured source with 13 active lines to adapt.
Already linked to a challenge workflow.
Sign in to keep private prompt variations.
Prompt content
Original prompt text with formatting preserved for inspection and clean copy.
Your first task is to set up a Google ADK agent that serves as the primary inference router. Define its initial capabilities and how it will accept incoming inference requests. Integrate a DeepSeek R1 client as a tool the agent can call, and define a simulated 'Trainium' tool for cost-effective inference. The agent should be able to decide which tool (model) to use. ```python
import google.generativeai as genai
from google.generativeai import GenerativeModel
from google.generativeai.types import ChatResponse
from typing import List, Dict, Union # Configure DeepSeek R1 client (placeholder - replace with actual API calls)
class DeepSeekR1Client: def infer(self, prompt: str) -> str: # Simulate DeepSeek R1 API call return f"DeepSeek R1 response for: {prompt}" # Simulated Trainium tool
@genai.tool
def simulated_trainium_infer(prompt: str) -> str: """Performs cost-effective, lower-latency inference for simple tasks.""" return f"Simulated Trainium response for: {prompt}" # Configure the Google ADK model (using a powerful LLM for routing decisions)
# genai.configure(api_key="YOUR_GEMINI_API_KEY")
# routing_model = GenerativeModel('gemini-3-flash') # Or other powerful model # Define the agent function
def inference_router_agent_fn(prompt: str) -> Union[str, genai.tool]: # Agent logic to decide between DeepSeek R1 or simulated_trainium_infer # This should return a tool call or a direct response. if len(prompt.split()) < 10 and "translate" in prompt.lower(): return simulated_trainium_infer.function(prompt) else: # Directly call DeepSeekR1Client or wrap it as a tool for ADK # For this prompt, assume it's integrated as a callable by the agent's logic return DeepSeekR1Client().infer(prompt) # This function would be part of the ADK orchestration
# response = routing_model.generate_content(inference_router_agent_fn("Your prompt"))
```Adaptation plan
Keep the source stable, then branch your edits in a predictable order so the next prompt run is easier to evaluate.
Hold the task contract and output shape stable so generated implementations remain comparable.
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.
Copy once for a pristine source snapshot, then move the prompt into Workspace when you want variants, run history, and side-by-side tuning without losing the original.
Prompt diagnostics
Quick signals for how structured this prompt already is and where adaptation work is likely to happen first.
This prompt already mixes executable detail with instructions, so the safest path is to tune examples and interfaces before you rewrite the overall scaffold.
Google ADK Multi-Model Inference Routing with DeepSeek R1 for Cerebras/Trainium Optimization
Inspired by AWS's strategy of deploying specialized AI chips like Cerebras' Wafer-Scale Engine alongside cost-effective Trainium processors, this challenge involves building an intelligent multi-agent system using Google ADK. The system will act as a dynamic inference router, intelligently dispatching requests to different AI models (e.g., DeepSeek R1) or simulated hardware endpoints based on real-time performance metrics, cost constraints, and security policies. Agents within the Google ADK framework will analyze incoming inference queries, assess their complexity, and determine the optimal model and hardware configuration for execution. Key aspects include integrating persistent memory management with Zep for agent state, enforcing security policies with Lakera to protect against malicious inputs, and leveraging Ray Tune for optimizing model routing decisions through experimentation. The goal is to maximize inference throughput and minimize cost while ensuring security and reliability for critical AI workloads.
Use the challenge page to recover the original task boundaries before you tune the prompt. That keeps your variants grounded in the same evaluation target instead of drifting into a different problem.