adk-samples icon indicating copy to clipboard operation
adk-samples copied to clipboard

[BUG]: deep-search/gemini-fullstack: Wrong prompt to access session state

Open zcakzhuu opened this issue 2 months ago • 0 comments

Name of sample affected

deep-search

Description of issue

https://github.com/google/adk-samples/blob/main/python/agents/deep-search/app/agent.py#L326-L334

In enhanced_search_executor, the instruction is

"""
    You are a specialist researcher executing a refinement pass.
    You have been activated because the previous research was graded as 'fail'.

    1.  Review the 'research_evaluation' state key to understand the feedback and required fixes.
    2.  Execute EVERY query listed in 'follow_up_queries' using the 'google_search' tool.
    3.  Synthesize the new findings and COMBINE them with the existing information in 'section_research_findings'.
    4.  Your output MUST be the new, complete, and improved set of research findings.
    """

But according to the ADK documentation, state keys in the prompt like 'research_evaluation' will only be replaced by the actual state value if specified like this {research_evaluation}. In this case this agent will never get to know what is the research_evaluation feedback, follow up queries or section research findings.

Is my understanding correct?

zcakzhuu avatar Nov 20 '25 15:11 zcakzhuu