5.6 Read the decisions
docker exec shopfront-postgres psql -U postgres -d shopfront -c "
select metadata_id as run, question_key, answer->>'probability' as yes,
routes->0->>'track' as track,
shadows->0->'answer'->>'probability' as shadow_yes,
shadows->0->>'agrees' as agrees
from trax.decision order by id" run | question_key | yes | track | shadow_yes | agrees
-----+-----------------+-----+-------+------------+--------
1 | LooksFraudulent | 0 | No | 1 | false
2 | LooksFraudulent | 1 | Yes | 1 | true
(2 rows)Your run ids are higher, after the runs of the earlier chapters. Each row is one question one run
asked. answer is what the live rule said and routes the track the gate took on it. shadows
holds what the stricter rule said and whether it agreed: on grace's order it would have held
74.00, and the live rule took it. That disagreement is the evidence for or against the stricter
rule, gathered without stopping a single customer. When the candidate has agreed often enough on
the orders that matter, it becomes the live IDecider and the Shadow line comes off the gate.
SDK Reference
Gate | Decide | AddDecisionRecording | Write a decider | Try a decider in shadow | Test a train's decisions
Next: 5.7 Test it