House rules
The questions page writes what the classifier is asked. A rule names one of those questions and says what the answer may do.
A constraint is a lock. A preference is a strong opinion about who is pleasant to work with. The lock wins the argument, including the ones the opinion feels emotional about.
[[rules]]
id = "pii-lock"
type = "constraint"
allow = ["local-fast", "local-strong", "jev-vpc"]
[[rules.when]]
criterion = "pii"
yesAtLeast = 0.4
[[rules]]
id = "light-code"
type = "preference"
prefer = ["public-fast"]
[[rules.when]]
criterion = "task"
choice = ["coding-light"]
minConfidence = 0.5
[[rules.when]]
criterion = "weight"
atMost = "light"
minConfidence = 0.5
A lock clears the room down to the people on its list. Two locks leave the people who appear on both. A preference then sorts whoever is still standing there, clipboard order and all. "Light coding likes the fast public model" is a lovely thought. A sensitive note stays with the models the lock named.
A choice or a score under minConfidence (the default is 0.5) is a shrug. A
lock hears a shrug and stays shut. A preference hears a shrug and keeps quiet.
Yes or no is the probability itself: yesAtLeast = 0.4 means "maybe" still
clicks the lock. Pick the number for the caution you actually want, then live
with it.
An unread note shuts every lock and silences every preference. The classifier was down, so the monitor does not guess that the note was harmless. A model that is down, full, or past its stop line is skipped only inside whoever is still in the room. Down means the last check failed. The model stays on the board, and a later check puts it back.
Send the model name hall-monitor when you want the monitor to choose. Send a
real name from the board when you want that model tried first. You get them
when the locks still have them in the room. If that model cannot take the
call, another model still in the room may answer. The response says who did.
Hall.chosen(
ModelKind.Conversational,
Map(
noul("pii", 0.1),
choice("task", "coding-light", 0.9),
score("weight", 1.0, 0.9),
),
)Right(public-fast)Hall.chosen(
ModelKind.Conversational,
Map(
noul("pii", 0.95),
choice("task", "coding-heavy", 0.9),
score("weight", 3.0, 0.9),
),
)Right(local-fast)Hall.chosen(ModelKind.Conversational, Map(noul("pii", 0.95)), Some("public-heavy"))Left(ModelNotAllowed(public-heavy,List(local-fast, local-strong)))Hall.chosen(ModelKind.Decision, Map(noul("pii", 0.95)))Right(jev-vpc){
val shrug = Map[CriterionId, Answer[?]](choice("task", "coding-light", 0.2))
val locked = Hall.policy.copy(
rules = List(
Rule.Constraint(
RuleId("maybe"),
List(Predicate.ChoiceIs(CriterionId("task"), Set("coding-light"), Confidence.unsafely(0.5))),
Set(BackendId("local-strong")),
)
)
)
Hall.chosen(ModelKind.Conversational, shrug, rules = locked)
}Right(local-strong)