File size: 763 Bytes
5c0a4a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from solomon_mlx import Solomon

model = Solomon.load("models/quality")
questions = {
    "certified": {"type": "noul", "instructions": "Is Rookwood Ltd certified?"},
    "auditor": {
        "type": "choice",
        "instructions": "Who performs the audit?",
        "options": ["The Buyer", "The grower", "An independent auditor"],
    },
    "severity": {
        "type": "score",
        "instructions": "What is the breach severity?",
        "levels": ["none recorded", "minor", "material"],
    },
}
with model.prefill(
    "Rookwood Ltd is certified. An independent auditor performs the audit. One minor breach is recorded."
) as state:
    print(model.decide(state=state, questions=questions, evidence="support"))
    state.save("document-replay.json")