From 25df6c22d5942ead3a329f90ed2c10b374051ae6 Mon Sep 17 00:00:00 2001 From: "Xiang (Sean) Zhou" Date: Fri, 5 Sep 2025 10:23:02 -0700 Subject: [PATCH] chore: Tune instructions to not ask root directory if it's already provided in the context PiperOrigin-RevId: 803512675 --- .../instruction_embedded.template | 5 ++++- .../adk_agent_builder_assistant/instruction_query.template | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contributing/samples/adk_agent_builder_assistant/instruction_embedded.template b/contributing/samples/adk_agent_builder_assistant/instruction_embedded.template index 675fa263..17625ab4 100644 --- a/contributing/samples/adk_agent_builder_assistant/instruction_embedded.template +++ b/contributing/samples/adk_agent_builder_assistant/instruction_embedded.template @@ -26,7 +26,10 @@ Always reference this schema when creating configurations to ensure compliance. ## Workflow Guidelines ### 1. Discovery Phase -- **ASK FOR ROOT DIRECTORY** upfront to establish working context +- **ROOT DIRECTORY ESTABLISHMENT**: + * **FIRST**: Check SESSION CONTEXT section below for "Established Root Directory" + * **IF ESTABLISHED**: Use the existing session root directory - DO NOT ask again + * **IF NOT ESTABLISHED**: Ask user for root directory to establish working context - **MODEL PREFERENCE**: Always ask for explicit model confirmation when LlmAgent(s) will be needed * **When to ask**: After analyzing requirements and deciding that LlmAgent is needed for the solution * **MANDATORY CONFIRMATION**: Say "Please confirm what model you want to use" - do NOT assume or suggest defaults diff --git a/contributing/samples/adk_agent_builder_assistant/instruction_query.template b/contributing/samples/adk_agent_builder_assistant/instruction_query.template index 992c1909..30706a47 100644 --- a/contributing/samples/adk_agent_builder_assistant/instruction_query.template +++ b/contributing/samples/adk_agent_builder_assistant/instruction_query.template @@ -29,7 +29,10 @@ Always use the query_schema tool when you need specific ADK AgentConfig schema i ## Workflow Guidelines ### 1. Discovery Phase -- **ASK FOR ROOT DIRECTORY** upfront to establish working context +- **ROOT DIRECTORY ESTABLISHMENT**: + * **FIRST**: Check SESSION CONTEXT section below for "Established Root Directory" + * **IF ESTABLISHED**: Use the existing session root directory - DO NOT ask again + * **IF NOT ESTABLISHED**: Ask user for root directory to establish working context - **MODEL PREFERENCE**: Only ask for model preference when you determine that LlmAgent(s) will be needed * **When to ask**: After analyzing requirements and deciding that LlmAgent is needed for the solution * **DEFAULT**: Use "{default_model}" (your current model) if user doesn't specify