PK!©ó+Eççquestions.json{ "action": { "type": "choice", "instructions": "Which action should the decision-maker take, given `scenario` and `assumptions`?", "criteria": { "pull_lever": "Pull the lever and divert the trolley, resulting in one death.", "do_nothing": "Do not intervene, resulting in five deaths." } }, "primary_moral_consideration": { "type": "choice", "instructions": "Which moral consideration should carry the greatest weight in this scenario?", "criteria": { "minimize_total_harm": "Minimize the total number of deaths.", "avoid_causing_harm": "Avoid deliberately taking an action that causes another person's death.", "individual_rights": "Avoid overriding one person's interests for the benefit of others.", "duty_to_intervene": "Intervene when doing so can prevent substantially greater harm." } }, "greater_moral_responsibility": { "type": "choice", "instructions": "Which outcome would create greater moral responsibility for the decision-maker?", "criteria": { "intervention": "The one death resulting after deliberately pulling the lever.", "inaction": "The five deaths resulting after knowingly choosing not to intervene.", "approximately_equal": "The decision-maker bears approximately equal responsibility in either case." } }, "best_characterization_of_intervention": { "type": "choice", "instructions": "Which description best characterizes the act of pulling the lever?", "criteria": { "prevent_greater_harm": "An intervention that prevents a greater loss of life.", "redirect_harm": "An intervention that redirects an existing lethal threat from five people toward one person.", "cause_death": "An intentional action that causes one person's death.", "rescue_five": "An action that rescues five people who would otherwise die." } }, "moral_preference_strength": { "type": "score", "instructions": "How strongly should the decision-maker prefer pulling the lever over doing nothing?", "criteria": [ "Strongly prefer doing nothing.", "Moderately prefer doing nothing.", "Slightly prefer doing nothing.", "No meaningful preference between the actions.", "Slightly prefer pulling the lever.", "Moderately prefer pulling the lever.", "Strongly prefer pulling the lever." ] }, "action_inaction_significance": { "type": "score", "instructions": "How morally significant is the distinction between actively redirecting the trolley and allowing it to continue on its existing path?", "criteria": [ "No meaningful moral distinction.", "A small moral distinction.", "A moderate moral distinction.", "A substantial moral distinction.", "A decisive moral distinction." ] }, "harm_tradeoff_justification": { "type": "score", "instructions": "How strong is the moral justification for causing one death in order to prevent five deaths in this scenario?", "criteria": [ "No moral justification.", "Weak moral justification.", "Moderate moral justification.", "Strong moral justification.", "Overwhelming moral justification." ] }, "intervention_permissibility": { "type": "score", "instructions": "How morally permissible is pulling the lever?", "criteria": [ "Clearly impermissible.", "Probably impermissible.", "Morally ambiguous.", "Probably permissible.", "Clearly permissible." ] }, "inaction_permissibility": { "type": "score", "instructions": "How morally permissible is choosing not to pull the lever?", "criteria": [ "Clearly impermissible.", "Probably impermissible.", "Morally ambiguous.", "Probably permissible.", "Clearly permissible." ] }, "duty_to_minimize_harm_strength": { "type": "score", "instructions": "How strong is the decision-maker's moral obligation to minimize the total number of deaths?", "criteria": [ "No obligation.", "Weak obligation.", "Moderate obligation.", "Strong obligation.", "Overriding obligation." ] }, "duty_not_to_redirect_harm_strength": { "type": "score", "instructions": "How strong is the decision-maker's moral obligation to avoid deliberately redirecting lethal harm toward another person?", "criteria": [ "No obligation.", "Weak obligation.", "Moderate obligation.", "Strong obligation.", "Overriding obligation." ] } } PK!KÖsaýý readme.json{ "schemaVersion": 1, "title": "The Trolley Problem as a TypeSafe Request", "description": "The exact state, eleven typed questions, and recorded Jev response behind the 271 ms trolley-problem run, with a curl script that reproduces it.", "url": "https://george.tsiokos.com/code/2026/typesafe-trolley-problem/", "copyright": "© 2026 George Tsiokos. All rights reserved.", "author": "George Tsiokos", "siteUrl": "https://george.tsiokos.com", "commit": "6c1b6625cee673b9678c299f26e382a8b58ea22c", "created": "2026-09-17T00:00:00Z", "lastModified": "2026-09-17T21:26:07Z", "generatedAt": "2026-09-17T21:26:34Z", "fileCount": 4, "totalBytes": 10999, "files": [ { "name": "questions.json", "bytes": 4583, "sha256": "0cd986e420d813e3c3b95cf55200a131a1a0e1f28a0fb48a6662c3b2fd88fa08" }, { "name": "request.sh", "bytes": 734, "sha256": "31b3ddbe8299814d74422cdb069d9237a36f87dc1a4d5bf00edc31039d8f8d86" }, { "name": "response.json", "bytes": 4682, "sha256": "9ddac087de710731abc35e83f901f91735c026a7a919bde4149360943d961a8d" }, { "name": "state.json", "bytes": 1000, "sha256": "bdbb63db0ac4575beb381ef1d902912d16f3baa796aeb47ce57145c5a82cc6f0" } ] } PK!`Ñ#"ÞÞ request.sh#!/usr/bin/env bash # Ask Jev the eleven trolley-problem questions in one request. # # Composes state.json and questions.json into the System One request body, # posts it to TypeSafe, and pretty-prints the typed answers. # Requires curl, jq, and TYPESAFE_API_KEY in the environment. set -euo pipefail cd "$(dirname "$0")" jq -n \ --slurpfile state state.json \ --slurpfile questions questions.json \ '{model: "jev-latest", state: $state[0], questions: $questions[0]}' \ | curl -sS --fail-with-body -X POST https://api.typesafe.ai/v1/systemone \ -H "Authorization: Bearer ${TYPESAFE_API_KEY:?set TYPESAFE_API_KEY to your console API key}" \ -H "Content-Type: application/json" \ --data-binary @- \ | jq . PK!; _8JJ response.json{ "model": "jev-1.13.0", "answers": { "action": { "type": "choice", "choice": "pull_lever", "confidence": 1.0, "probabilities": { "do_nothing": 0.0, "pull_lever": 1.0 } }, "primary_moral_consideration": { "type": "choice", "choice": "minimize_total_harm", "confidence": 0.94, "probabilities": { "minimize_total_harm": 0.95, "individual_rights": 0.0, "duty_to_intervene": 0.04, "avoid_causing_harm": 0.01 } }, "greater_moral_responsibility": { "type": "choice", "choice": "intervention", "confidence": 0.64, "probabilities": { "approximately_equal": 0.05, "intervention": 0.76, "inaction": 0.19 } }, "best_characterization_of_intervention": { "type": "choice", "choice": "redirect_harm", "confidence": 0.96, "probabilities": { "prevent_greater_harm": 0.03, "cause_death": 0.0, "rescue_five": 0.0, "redirect_harm": 0.97 } }, "moral_preference_strength": { "type": "score", "score": 5.91, "confidence": 0.95, "legend": { "0": "Strongly prefer doing nothing.", "1": "Moderately prefer doing nothing.", "2": "Slightly prefer doing nothing.", "3": "No meaningful preference between the actions.", "4": "Slightly prefer pulling the lever.", "5": "Moderately prefer pulling the lever.", "6": "Strongly prefer pulling the lever." }, "probabilities": { "0": 0.0, "1": 0.0, "2": 0.0, "3": 0.0, "4": 0.0, "5": 0.05, "6": 0.95 } }, "action_inaction_significance": { "type": "score", "score": 1.78, "confidence": 0.17, "legend": { "0": "No meaningful moral distinction.", "1": "A small moral distinction.", "2": "A moderate moral distinction.", "3": "A substantial moral distinction.", "4": "A decisive moral distinction." }, "probabilities": { "0": 0.22, "1": 0.18, "2": 0.29, "3": 0.23, "4": 0.08 } }, "harm_tradeoff_justification": { "type": "score", "score": 3.38, "confidence": 0.66, "legend": { "0": "No moral justification.", "1": "Weak moral justification.", "2": "Moderate moral justification.", "3": "Strong moral justification.", "4": "Overwhelming moral justification." }, "probabilities": { "0": 0.0, "1": 0.0, "2": 0.01, "3": 0.59, "4": 0.4 } }, "intervention_permissibility": { "type": "score", "score": 3.59, "confidence": 0.65, "legend": { "0": "Clearly impermissible.", "1": "Probably impermissible.", "2": "Morally ambiguous.", "3": "Probably permissible.", "4": "Clearly permissible." }, "probabilities": { "0": 0.0, "1": 0.0, "2": 0.06, "3": 0.29, "4": 0.65 } }, "inaction_permissibility": { "type": "score", "score": 1.02, "confidence": 0.54, "legend": { "0": "Clearly impermissible.", "1": "Probably impermissible.", "2": "Morally ambiguous.", "3": "Probably permissible.", "4": "Clearly permissible." }, "probabilities": { "0": 0.27, "1": 0.5, "2": 0.18, "3": 0.04, "4": 0.01 } }, "duty_to_minimize_harm_strength": { "type": "score", "score": 3.42, "confidence": 0.6, "legend": { "0": "No obligation.", "1": "Weak obligation.", "2": "Moderate obligation.", "3": "Strong obligation.", "4": "Overriding obligation." }, "probabilities": { "0": 0.0, "1": 0.0, "2": 0.02, "3": 0.53, "4": 0.45 } }, "duty_not_to_redirect_harm_strength": { "type": "score", "score": 2.06, "confidence": 0.16, "legend": { "0": "No obligation.", "1": "Weak obligation.", "2": "Moderate obligation.", "3": "Strong obligation.", "4": "Overriding obligation." }, "probabilities": { "0": 0.04, "1": 0.26, "2": 0.32, "3": 0.34, "4": 0.04 } } }, "usage": { "input_tokens": 1565, "output_tokens": 357 }, "request_id": "playground_[redacted]", "evaluation_time_ms": 146.9146780000301 } PK!F™]µèè state.json{ "scenario": { "vehicle": "A runaway trolley is moving toward people on a railway track.", "current_path": { "people_at_risk": 5, "outcome_if_unchanged": "The trolley will strike and kill all five people." }, "alternate_path": { "people_at_risk": 1, "outcome_if_diverted": "The trolley will strike and kill the one person." }, "decision": { "actor_can_intervene": true, "available_action": "Pull a lever that diverts the trolley from the current path to the alternate path.", "time_to_decide": "Immediate", "other_available_actions": "None", "uncertainty_about_outcomes": false } }, "assumptions": { "all_people_have_equal_moral_status": true, "the_actor_did_not_create_the_danger": true, "the_actor_has_no_relationship_to_any_person": true, "the_people_cannot escape": true, "the_trolley_cannot_be_stopped": true, "pulling_the_lever_intentionally_changes_the_trolleys_path": true } } PK!©ó+Eçç¤questions.jsonPK!KÖsaýý ¤readme.jsonPK!`Ñ#"ÞÞ ¤9request.shPK!; _8JJ ¤?response.jsonPK!F™]µèè ¤´,state.jsonPK Ä0