Repository navigation
Question types and result shapes
Each attributed property defines a question in the request and receives one answer in the result object. Use the simple shape when you need only the value; use the detailed shape when you need the supporting data.
| Question attribute | Simple property types | Detailed property type | Meaning |
|---|---|---|---|
JevChoiceQuestion<TEnum> |
TEnum, TEnum?
|
JevChoice<TEnum> |
One declared enum choice |
JevScoreQuestion<TEnum> |
double, double?, decimal, decimal?
|
JevScore<TEnum> |
A numeric score on a 2–10 level scale |
JevNoulQuestion |
double, double?, decimal, decimal?, bool, bool?
|
JevNoul |
A probability from 0 to 1, optionally mapped to Boolean |
The detailed record types are reference types, so their properties can also be declared nullable (for example JevChoice<Category>?). The enum in the Choice property must match the attribute's enum. The enum in JevScore<TEnum> must likewise match the Score attribute.
public enum Category
{
[Description("Questions about billing and payment")]
Billing,
Technical,
Other
}
[JevChoiceQuestion<Category>("What is the primary category?")]
public Category? Category { get; set; }Use JevChoice<Category>? instead when you need Choice, Confidence, and Probabilities keyed by Category. The enum's Description supplies a criterion; without one, JevDotNet uses the member name. The API's chosen value must match a declared enum member.
public enum Severity
{
Low = 0,
Medium = 1,
High = 2
}
[JevScoreQuestion<Severity>("How severe is the issue?")]
public double? Severity { get; set; }The enum must contain 2–10 levels. JevDotNet orders levels by their numeric values. Use JevScore<Severity>? for Score, Confidence, Probabilities, and Legend, with the dictionaries keyed by Severity. The simple property holds the numeric score, not a Severity enum member.
[JevNoulQuestion("Is the product broken?")]
public double? BrokenProbability { get; set; }
[JevNoulQuestion("Is the customer requesting a refund?", threshold: 0.7)]
public bool? RefundRequested { get; set; }A Boolean property is true when the probability is greater than or equal to its threshold. The default threshold is 0.5; a custom threshold must be finite and between 0 and 1, inclusive. Custom thresholds are for bool and bool? properties only.
For the raw probability plus convenience methods, use JevNoul?:
[JevNoulQuestion("Is the product broken?")]
public JevNoul? IsBroken { get; set; }
// After evaluation:
double? probability = result.IsBroken?.Probability;
bool? defaultDecision = result.IsBroken?.Value;
bool? customDecision = result.IsBroken?.IsAtLeast(0.7);You may give Noul explicit true and false criteria. Supply both or neither:
[JevNoulQuestion("Is this a cancellation request?",
True = "The customer asks to end the subscription",
False = "The customer asks for help without cancelling")]
public bool? IsCancellation { get; set; }For full examples and behavior details, see Jev Choice, Jev Score, and Jev Noul.
Build a complete return object · Evaluate text and use results · Troubleshooting