Google

Unlock Gemini’s reasoning: A step-by-step guide to logprobs on Vertex AI- Google Developers Blog

Jul 16, 2025Eric Dong
Unlock Gemini’s reasoning: A step-by-step guide to logprobs on Vertex AI- Google Developers Blog
SummaryAI, from the source post

Introduces the `logprobs` feature for the Gemini API on Vertex AI, enabling developers to access token probability scores and top alternative token probabilities. Provides code examples for enabling and processing logprobs, and demonstrates use cases in classification (ambiguity detection, confidence-based thresholding), dynamic autocomplete, and quantitative RAG evaluation. Explains the mathematical concept of log probabilities and their relation to model confidence.

More from the Predictive APIs and Machine Learning Integration trail