Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Generative AI Leader practice bank has 2,191 more like it. Try 10 free: instant score, no account.
An enterprise development team is deploying a real-time chatbot using a generative AI model on Google Cloud. During performance testing, developers notice that unconstrained, verbose responses increase generation latency, raise API token costs, and occasionally cause downstream serverless integration functions to exceed resource and timeout limits.
Which configuration parameter should the team adjust to enforce a strict upper limit on the number of generated tokens, optimize compute resource consumption, and reduce response latency?
Safety filter threshold settings are guardrails configured to block or flag model inputs and outputs that violate policy categories such as hate speech, harassment, sexually explicit content, or dangerous content.
The maximum output tokens (maxOutputTokens) parameter is a foundational model generation setting that places a hard cap on the maximum number of tokens a generative AI model can produce in a single completion response.
Setting maxOutputTokens is the most direct and deterministic method for controlling the size of model outputs. Unlike sampling parameters that only influence word selection probabilities, output token caps strictly enforce response bounds, making it the ideal solution for meeting latency budgets and resource management goals.
Temperature is a hyperparameter used during sampling to regulate the degree of randomness and creativity in a model's token selection process.
Top-P (nucleus sampling) is an alternative sampling parameter that dynamically restricts token selection to the smallest pool of candidate tokens whose cumulative probability exceeds the threshold value $P$.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated