Serving and scaling models1 / 5
You need to perform online inference with a model that generates text responses. The responses can be very long (up to 2000 tokens). You want to provide a better user experience by streaming the response tokens as they are generated. Which Vertex AI serving feature supports this?
CorrectIncorrect
Alex
Vertex AI provides streaming prediction via serverStreamingPredict and streamGenerateContent API endpoints for generative AI models producing long-form text. Streaming sends tokens incrementally as generated, reducing time-to-first-token (TTFT) — users see responses building in real-time. The endpoint returns a stream of StreamingPredictResponse instances via server-sent events (SSE). Standard prediction endpoints wait for the complete response before returning, causing unacceptable delays for 2000+ token outputs. Batch prediction processes offline workloads, not real-time interaction. Custom WebSocket containers add unnecessary complexity when native streaming is available. Exam tip: generative AI serving with long outputs → streaming prediction endpoints; tabular/classification → standard endpoints. Ref: docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/projects.locations.endpoints
Sourcecloud.google.com
Follow-up answers are available in the app. Create a free account — no credit card required.
Question 1 of 5
Create a free account