Interface Question

All Known Implementing Classes:
Question.Choice, Question.Noul, Question.Score

public sealed interface Question permits Question.Noul, Question.Choice, Question.Score
A question put to the evaluator about a state. The three permitted shapes mirror the evaluator's own question types, so that a caller names a shape rather than describing one.

Every question carries a name. The name is the caller's key: it becomes the key of the question in the request's questions map, comes back as the key of the answer, and is how a fan-out of questions in one request is unpicked into typed answers. The evaluator does not read it during inference, so it carries no meaning to the model.

instructions and every criterion are typed Object because the API accepts a string, an object or an array in each of those places, and splitting a long question into a structured object is the documented way to point it at reference data. The records check the shape at construction and hold a deep, unmodifiable copy (see Names.requireDescription(java.lang.Object, java.lang.String)). A map passed in becomes a JSON object, a list a JSON array.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Pick one of a fixed set of options.
    static final record 
    Is this true.
    static final record 
    Rate the state against an ordered rubric.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
  • Method Details