Unlock model insights with log probability support for Amazon Bedrock Custom Model Import
AWS•Blog post••by Manoj Selvakumar, Lokeshwaran Ravi, Revendra Kumar and Yanyan Zhang•AWS Artificial Intelligence Blog
In this post, we explore how log probabilities work with imported models in Amazon Bedrock. You will learn what log probabilities are, how to enable them in your API calls, and how to interpret the returned data. We also highlight practical applications—from detecting potential hallucinations to optimizing RAG systems and evaluating fine-tuned models—that demonstrate how these insights can improve your AI applications, helping you build more trustworthy solutions with your custom models.
Bedrock Custom Model Import now returns token-level log probabilities when return_logprobs is set to true in the InvokeModel request, giving confidence data for prompt and generated tokens.
Who it is for
Teams serving fine-tuned Llama, Mistral or Qwen models on Bedrock that need confidence signals for hallucination checks, RAG filtering or evaluation.
Key points
Enabled with "return_logprobs": true; works with InvokeModel and InvokeModelWithResponseStream.
Applies only to models imported after July 31, 2025, per the post.
Post shows decoding with the model's tokenizer and converting log probabilities to probabilities.
AI:AWS walks through how Natera built SWARM, an agentic system on Bedrock AgentCore that turns lab-engineering knowledge into automated diagnostic reports for Jira tickets.
AI:Indegene's Data Quality Agent on AWS generates data quality rules, validates them and produces SQL and Python, with a human approval step before rules are stored.
AI:A CDK application deploys an agent that routes questions across two Managed Bedrock Knowledge Bases via AgentCore Gateway, with seven telemetry layers and on-demand and continuous evaluation.