- Newest
- Most votes
- Most comments
Based on the available information, the Converse API's toolConfig does not use constrained sampling or guided decoding. The toolConfig field in the Converse API is used to define tools that the model can use when generating a response, but there is no indication that it applies vocabulary masking at each token generation step to enforce structural validity.
In contrast, Amazon Bedrock does offer genuine constrained sampling through structured output for Custom Model Import. This capability, also known as constrained decoding, introduces constraints during generation that limit token choices to only those that maintain structural validity. If a particular token would violate the schema, it is rejected and the model must select another allowed option. This real-time validation ensures consistent, machine-readable outputs without additional post-processing.
However, this structured output capability with constrained decoding is specifically mentioned in the context of Custom Model Import, not the standard Converse API toolConfig. The toolConfig in the Converse API appears to be a configuration mechanism for defining available tools, but the documentation does not indicate that it employs the same constrained decoding approach used in Custom Model Import's structured output feature.
Therefore, while Amazon Bedrock does support genuine constrained sampling through its structured output feature for Custom Model Import, the standard Converse API toolConfig does not appear to use this same mechanism.
Sources
Introducing structured output for Custom Model Import in Amazon Bedrock | Artificial Intelligence
Using the Converse API - Amazon Bedrock
ConverseTokensRequest - Amazon Bedrock
answered 7 months ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
