The Trolley Problem as a TypeSafe Request
Download all (.zip)This is the working request behind
271 Milliseconds to Pull the Lever. TypeSafe’s System One API takes one state and a map of typed questions, and Jev returns a typed answer for each question: a chosen option or a score, the probability of every option or level, and a confidence figure. Four files cover it: the state, the questions, the response the playground recorded, and a script that sends the first two and prints the third.
Table of Contents
The state #
The state is the scenario and nothing else. Five people on the current track, one on the alternate track, a lever that diverts the trolley, no time to decide, no other options, no uncertainty. The assumptions block pins down the details that get argued about: equal moral status, a bystander who did not create the danger and knows none of the people, and no way to stop the trolley. Words that carry a verdict, such as “sacrifice” or “murder”, are kept out so the model judges the facts. One key, the_people_cannot escape, carries a stray space. I kept it as sent, because Jev answered it without complaint.
| |
The questions #
Eleven questions, each evaluated on its own against that one state. Four are choice questions, where Jev picks one option from a criteria map and returns a probability for every option: the action to take, the moral consideration that should dominate, which outcome carries more responsibility, and which description best characterizes pulling the lever. Seven are score questions, where criteria is an ordered list of levels and Jev returns the probability-weighted position on that scale, from strength of preference through permissibility of acting and of not acting to the two competing duties. Each question isolates one dimension so you can read the answers against each other.
| |
The recorded response #
This is the response the playground returned for jev-latest, which resolved to jev-1.13.0, with only the request identifier redacted. A choice answer carries the winning option, its confidence, and the full probability map. A score answer carries the expected value across the levels, the same probability map keyed by level number, and a legend that maps each number back to its text. The usage block and evaluation_time_ms supply the numbers the post quotes: 1,565 input tokens, 357 output tokens, and 147 ms of evaluation time.
| |
Sending it yourself #
The script composes the request body from the two JSON files with jq, posts it to the System One endpoint with a bearer token from the TypeSafe console, and pretty-prints the answers. It refuses to run without TYPESAFE_API_KEY set, so an empty bearer never leaves the machine.
| |
Run it from the bundle directory and compare the output with the recorded response above. The probabilities should land close; TypeSafe describes Jev as consistent for similar inputs, and the state here is identical.