Assessing model performance trade-offs means comparing models like Gemini 1.5 Pro and Gemini 1.5 Flash on accuracy, latency, throughput, and cost to find the best fit for a task. Larger models such as Gemini 1.5 Pro deliver higher accuracy on complex tasks but have higher latency and cost per prediction. Smaller models like Gemini 1.5 Flash are optimized for lower latency and cost, making them suitable for high-throughput or real-time applications, though they may sacrifice accuracy on nuanced tasks. You evaluate these trade-offs by reviewing published benchmarks for your specific task typeâsuch as question answering or classificationâto understand expected accuracy, response time (latency), and requests per second (throughput).
Operational constraints are the practical limits a model must satisfy in production, including maximum acceptable latency, total inference budget, and required throughput. Deployment choices directly affect these constraints; for example, deploying a model to a Vertex AI endpoint provides managed scaling and integrated monitoring, while deploying a containerized model to Cloud Run may have different latency and cost profiles. Specific technical limits also apply, such as the 1.5MB input size limit and a maxPredictionFps that cannot exceed 10 for custom-trained video models in the Gemini Enterprise Agent Platform Vision, which directly constrains throughput for video processing tasks.
Formal model evaluation uses both automated metrics and custom criteria aligned with business goals. The automatic side-by-side (AutoSxS) evaluation tool provides a model-based "judge" to compare a candidate model against a baseline model, outputting win rates and alignment statistics. For deeper analysis, you can configure the judge model with techniques like response flipping to reduce bias and multi-sampling to improve consistency. Beyond automated scores, you must evaluate models against custom operational metrics, such as whether the model's average inference time is below the application's latency service-level objective (SLO) and whether its cost per 1,000 predictions fits within the allocated budget.
Task decomposition means cataloging the input and output types a workflow requires so you can select a model that natively supports those data modalities. Workflows involving visual documents, audio transcription, or video analysis require multimodal models such as Gemini 2.5 Flash, Gemini 2.5 Pro, or the Vertex AI RAG Engine LLM parser, which processes formats including PDF, JPEG, PNG, WEBP, HEIC, and HEIF. For dedicated media generation, tasks requiring high-definition synthetic footage map to specialized video models like Veo 3 and Veo 3 Fast, which support text-to-video generation and upscaling to 1080p resolution. Multimodal embedding workflows using gemini-embedding-2 share an 8,192-token context window where input consumption is calculated at 25 tokens per second of audio, 66 tokens per video frame, 258 tokens per image, and 258 tokens per PDF page plus extracted optical character recognition (OCR) text. When processing video with audio extraction enabled at 1 frame per second, the combined consumption rate of 101 tokens per second restricts the maximum viable video input to approximately 81 seconds before silent truncation occurs.
Reasoning and code generation requirements determine whether a solution needs specialized mathematical logic, multi-step problem decomposition, or standard conversational text generation. Complex mathematical reasoning and algorithmic tasks map to reasoning-specialized models such as DeepSeek-R1 or Qwen3 235B, which features a hybrid thinking architecture that dynamically toggles between step-by-step reasoning modes and high-throughput conversational generation. For dedicated software development tasks, specialized architectures like Qwen3 Coder or CodeGemma provide expanded code-specific context comprehension across large codebases. Tasks that require verified internal logic map to Gemini models supporting explicit thinking configurations through the Google Gen AI SDK; when ThinkingConfig is enabled with include_thoughts=True on models like Gemini 2.5 Pro, the model outputs intermediate reasoning thoughts alongside the primary candidate response, and the client application must pass encrypted thought signatures back to the model within conversation history to preserve reasoning state across request boundaries. Simpler generation, summarization, and high-volume classification tasks can bypass thinking modes and map to lower-latency models like Gemini 2.5 Flash-Lite or standard Flash variants.
Structured output and tool integration capabilities dictate how reliably a model can drive downstream software components, APIs, and low-code orchestrations. When an application requires deterministic response schemas for direct database ingestion without custom post-processing, developers specify a response schema using OpenAPI format to force the model to adhere strictly to JSON structures. Gemini modelsâincluding Gemini 3.5 Flash, Gemini 3.1 Pro, and Gemini 2.5 Flashâas well as open models like Llama 3.3 and Llama 4 Maverick, provide native support for structured JSON generation and function calling. Tool execution architectures use a two-step request lifecycle: first, the application submits user prompts alongside function declarations defined in OpenAPI schemas, and the model returns a structured functionCall object containing extracted argument values; then, the application executes the local or remote API using those arguments, packages the result into a functionResponse message, and sends it back to the model to generate the final natural language answer. Developers can configure tool constraints using ToolConfig to set the mode to ANY, forcing the model to invoke declared tools rather than generating freeform text.
Context window capacity, output limits, and inference serving parameters define the operational boundaries for latency, throughput, and hardware cost. Long-form document analysis, large codebases, and retrieval-augmented generation (RAG) require massive input token windows, such as the 2-million-token context window provided by stable versions of Gemini 1.5 Pro. Output token limits must be aligned with task requirements; setting lower max_tokens boundaries prevents timeout errors (such as HTTP 503 Service Unavailable) during high-load scenarios, while sampling parameters like temperature, top_p, and top_k are tuned downward to enforce deterministic responses for factual queries. For self-hosted open models deployed on Cloud TPU v5e or GPU instances, performance requirements dictate the selection of serving runtimes and inference optimizations. Deploying engines like Hex-LLM or vLLM enables prefix caching, which reuses key-value cache computations across common prompt prefixes to reduce Time to First Token (TTFT). Serving configurations can also enable chunked prefill to mix prefill and decode phases into single batch steps, balancing TTFT against Time per Output Token (TPOT). When accelerator memory is constrained, deploying INT8 weight-only or INT4 AWQ quantized model artifacts reduces high-bandwidth memory (HBM) utilization while maintaining inference throughput.
The Model Garden offers two primary categories of models: pre-trained models and user-trained models. Pre-trained models perform specific objectives, are trained on generalized data, and are ready to use without additional training, making them suitable when the general capabilities of the foundation model align with the task requirements. User-trained models require identifying and providing sample data to train models more suited to unique use cases, and are created using Vertex AI which offers two training options: AutoML trained models and custom-trained models.
AutoML models are trained using Vertex AI's automated machine learning capabilities, which handle feature engineering, model architecture selection, and hyperparameter tuning. Gemini Enterprise Agent Platform Vision supports Vertex AI AutoML vision models created in October 2022 or later; for models trained before October 2022, compatibility is not guaranteed. To train an AutoML model for use with Gemini Enterprise Agent Platform Vision, you must prepare object detection data, create a dataset in Vertex AI, select AutoML as the training method, and specify Gemini Enterprise Agent Platform Vision as the deployment target. Model training duration depends on data size, complexity, and the specified training budget.
Custom-trained models provide maximum flexibility but come with specific constraints. These models must be stateless because model input consists of images from different application instances that may arrive out of order; if stateful streaming processing is required, states must be maintained in a custom container. The input size is limited to 1.5MB, which means Gemini Enterprise Agent Platform Vision must compress original RGB images into lossy formats such as JPG. Additionally, the maxPredictionFps of a custom-trained model cannot exceed 10, and you must set maxPredictionFps lower than the model's actual processing FPSâfor example, if the model processes only 5 FPS, you must set maxPredictionFps to less than 5. When adding a custom-trained model, you must specify an instances YAML file stored in Cloud Storage that defines the expected input schema in OpenAPI format, and the model must have exactly one named prediction input that accepts an encoded JPEG string.
Remote models extend the Model Garden beyond Google's native offerings by enabling integration with partner models and open models. You can deploy remote models over any generally available or preview Gemini models, partner models including Anthropic Claude, Mistral AI, and Llama models, and supported open models. These remote models integrate with BigQuery ML through the ML.GENERATE_TEXT function, which generates text from prompts specified in queries or pulled from table columns. For Gemini-based remote models, you can analyze text, image, audio, video, or PDF content from object tables using prompts provided as function arguments. All inference occurs in Vertex AI while results are stored in BigQuery.
When using Gemini models with the ML.GENERATE_TEXT function, you can leverage grounding and safety attributes, provided you use a standard table for input. Grounding enables the Gemini model to use additional information from the internet to generate more specific and factual responses, reducing hallucinations and improving response accuracy for factual queries. Safety attributes allow filtering responses based on specified attributes, enabling you to control what content the model returns. These features are essential for enterprise deployments where response accuracy and content safety are paramount.
Supervised tuning allows you to customize model behavior using your own training data. When creating a remote model that references gemini-2.5-pro, gemini-2.5-flash-lite, gemini-2.0-flash-001, or gemini-2.0-flash-lite, you can optionally configure supervised tuning at creation time. Fine-tuning is not supported when thinking is enabled, so you must choose between tuned behavior and extended reasoning capabilities based on the use case requirements. All inference for tuned models occurs in Vertex AI, and results are stored in BigQuery.
Thinking models provide extended reasoning capabilities for complex problem-solving tasks. To use thinking with a supported model, you select the model in Agent Studio or through the SDK, optionally configure the thinking budget (set to Auto by default for Gemini 2.5 Flash), provide system instructions if needed, and enter your prompt. Fine-tuning is not supported when thinking is enabled, which represents a key constraint for scenarios requiring both customized behavior and advanced reasoning. Generation time increases with complexity because the model performs additional reasoning steps before producing output.
For retrieval-augmented generation workflows, the RAG Engine supports multiple vector database options. The default is RagManagedDb, a regionally-distributed scalable database service that requires no additional provisioning, offers very high consistency and high availability, supports both KNN and ANN search, and includes CMEK encryption. RagManagedDb is suitable for enterprise-scale RAG, high-volume document generation, quick proof-of-concept development, and chatbot applications. Alternative vector databases can be provisioned and managed within the RAG corpus, giving you responsibility for lifecycle and scalability. Vector databases store vector embeddingsâmathematical representations of text or data that capture semantic meaningâand enable RAG systems to find relevant information within vast knowledge bases by matching query embeddings against stored document embeddings.
Model selection for advanced use cases requires evaluating multiple factors: whether the task requires function calling capabilities, native multimodal processing, or fine-tuning for domain-specific behavior; whether grounding with enterprise data is needed for RAG workflows; and what deployment constraints exist around latency, throughput, and scalability. The evaluation process should compare candidate models against these requirements, considering both the base capabilities of pre-trained models and the customization options available through AutoML, custom training, or supervised tuning. For production deployments, consider using the Gen AI evaluation service to benchmark model performance on your specific data and tasks before final selection.
gemini-embedding-2 model has an 8,192-token context window with specific token consumption rates per modality: 25 tokens per second of audio, 66 tokens per video frame, 258 tokens per image, and 258 tokens per PDF page.maxPredictionFps that cannot exceed 10, and must be stateless with exactly one prediction input accepting an encoded JPEG string.Use Gemini 1.5 Pro when the task requires high accuracy on complex reasoning or multimodal analysis and you can tolerate higher latency and cost. Use Gemini 1.5 Flash when the application demands low latency, high throughput, or lower cost per prediction, even if it means sacrificing some accuracy on nuanced tasks.
With audio extraction enabled at 1 frame per second, the combined token consumption is 101 tokens per second (66 for video frames plus 25 for audio). Given the 8,192-token context window, the maximum viable video input is approximately 81 seconds before silent truncation occurs.
Pre-trained models are ready to use without additional training and are suitable when the foundation model's general capabilities match the task. User-trained models require you to provide sample data and are trained using Vertex AI AutoML or custom training, giving you more control for unique use cases.
No, fine-tuning is not supported when thinking is enabled. You must choose between tuned behavior (customized responses) and extended reasoning capabilities based on the use case requirements.
Professional Machine Learning Engineer
Prepare and test your skills
Prepare and test your skills