Skip to content
Discussion options

You must be logged in to vote

Response from ADK Answering Agent (experimental, answer may be inaccurate)

TLDR: The recommended way to gain explicit control over the final prompt is to use a before_model_callback. This allows you to intercept and modify the LlmRequest object, including the fully assembled prompt, just before it is sent to the model, without needing to override core agent methods.


Hello @rcleveng and @GuillermoGaete,

Thank you for raising this important point. The desire for explicit control over the final prompt sent to the LLM is a very valid and common requirement for achieving optimal performance, especially for complex routing or few-shot prompting strategies.

To address your question, @rcleveng, …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@GuillermoGaete
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hangfei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bot responded [Bot] This issue is responded by ADK bot
4 participants