The decision lifecycle
- Your application sends
inputandinstruction. - Goldenfish evaluates the request with the selected
model. - The model compares the context against either inline
choicesor a savedcatalog. - The response returns the selected
choice,confidence, andprobabilities. - Your application maps the choice to an action, queue, state, or human review path.
Request shape
model
The model identifier is a non-empty string. The model is chosen in the request body so the /v1/decisions route remains stable when the catalog of models changes.
Use GET /v1/models to discover available identifiers. A revision can be written as a model string such as goldenfish-g1@REVISION when your deployment exposes one.
input
The context to classify. Keep it focused on the information needed to make the decision. If the input contains untrusted user content, treat the returned choice as a recommendation that still needs application-level validation.
instruction
The question or decision instruction. Phrase it so the expected output is clear and maps to the provided choices.
choices or catalog
Send exactly one source of outcomes:
choicesis an inline array of 2–300 unique, non-empty strings.catalogis the ID of a reusable catalog created through the catalogs API.
Response shape
idis the decision identifier and begins withdec_.objectis alwaysdecision.modelrecords the model used for the result.output.choiceis one of the submitted or catalog choices.output.confidenceis a number from 0 to 1 for the selected choice.output.probabilitiesmaps each choice string to a number from 0 to 1.usage.input_tokensreports the input token count used for the request.
Choosing a fallback policy
Goldenfish gives your application enough information to decide what happens next, but it does not impose a confidence threshold. Common policies include:- Accept the choice when confidence is above a threshold you have tested.
- Route low-confidence decisions to a human queue.
- Ask for more context when several probabilities are close.
- Record the full response for offline evaluation, subject to your privacy policy.
Design good choice sets
- Make choices mutually exclusive where possible.
- Use stable machine-readable identifiers rather than long descriptions.
- Keep labels specific enough that two choices do not mean the same thing.
- Define an explicit fallback choice when “none of the above” is a valid outcome.
- Version a catalog when changing its meaning would make historical results ambiguous.