Urgent.News

What's breaking now, across thousands of outlets.

AI

Decisions API is in public beta

The Decisions API, available in public beta, analyzes text, images, or both and returns typed answers significantly faster than the Responses API. This tool can determine the probability of a condition being true, provide choices from a fixed set, or assign a score against a rubric. Applications can utilize these answers to classify content, route requests, and prioritize tasks.

A Playground is available for experimenting with questions and inputs before implementing them in code. Currently, the gpt-6-luna model is the only one compatible with the Decisions API.

Responses from the API are communicated through an array of answers, with each question assigned a unique name to identify its corresponding answer. For categories without a specific order, such as departments, use the 'choice' type. For ordered levels like severity, the 'score' type is employed, which calculates a probability-weighted average of numeric indices. Choice is recommended for categories without a defined order, while score is ideal for ordered levels like severity.

The API is designed to handle specific application needs, such as checking a product photo for visible damage or identifying product categories. Predicate questions can be used to assess product photos for issues like cracks, tears, or dents. The probability of the condition being true serves as an indicator to flag photos for review based on a chosen threshold. Images must be provided as inline base64 data URLs, and hosted HTTP or HTTPS image URLs are not supported.

When using the API, include a fallback option when categories don't cover every possible input. For score questions, define criteria for each level from lowest to highest, with indices starting at 0. The returned score is a probability-weighted average, allowing it to fall between levels. Independent questions should be included within the same questions array to evaluate shared input. For instance, a product photo evaluation could check for damage and classify the product category in one request.

To create effective decisions, write questions around observable criteria and separate distinct concerns into different questions. Provide distinct meanings for each choice, and define score levels with clear criteria for adjacent levels. For predicate questions, use labeled examples from your application to set thresholds for routing, filtering, or review.

Based on the cost of false positives and false negatives, choose appropriate thresholds. With gpt-6-luna, input costs $0.10 per 1 million tokens, with no additional charges for cache reads, writes, or outputs. Processing premiums and long-context input pricing multipliers apply to regional processing in the United States and Europe (EEA + Switzerland).

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at developers.openai.com →

More in AI

More from Tuesday 6 October →