Decision Spec
An immutable, ordered set of questions to put to a model in one decision. Question names are unique within a spec and name the answers in a response.
Declare the questions inline with builder, or pass questions made with Questions.named(...) to of. Both forms validate the same way and give equal specs for equal questions.
var triage = DecisionSpec.builder()
.proposition("is_urgent", question -> question
.asking("Does this convey urgency?"))
.choice("department", question -> question
.asking("Which team should handle this?")
.option("billing", "Payments, invoicing, refunds")
.option("technical", "Bugs, outages, integrations"))
.build();Content copied to clipboard
Two specs are equal when they hold equal questions in the same order, whatever their class. A ClassificationSpec is the one subclass: a spec with a single choice question.
Inheritors
Types
Link copied to clipboard
Collects the questions of a decision spec in declared order. Get one from DecisionSpec.builder.