ScenicNL: Generating Probabilistic Scenario Programs from Natural Language
<|reference_start|>ScenicNL: Generating Probabilistic Scenario Programs from Natural Language: For cyber-physical systems (CPS), including robotics and autonomous vehicles, mass deployment has been hindered by fatal errors that occur when operating in rare events. To replicate rare events such as vehicle crashes, many companies have created logging systems and employed crash reconstruction experts to meticulously recreate these valuable events in simulation. However, in these methods, "what if" questions are not easily formulated and answered. We present ScenarioNL, an AI System for creating scenario programs from natural language. Specifically, we generate these programs from police crash reports. Reports normally contain uncertainty about the exact details of the incidents which we represent through a Probabilistic Programming Language (PPL), Scenic. By using Scenic, we can clearly and concisely represent uncertainty and variation over CPS behaviors, properties, and interactions. We demonstrate how commonplace prompting techniques with the best Large Language Models (LLM) are incapable of reasoning about probabilistic scenario programs and generating code for low-resource languages such as Scenic. Our system is comprised of several LLMs chained together with several kinds of prompting strategies, a compiler, and a simulator. We evaluate our system on publicly available autonomous vehicle crash reports in California from the last five years and share insights into how we generate code that is both semantically meaningful and syntactically correct.<|reference_end|>
@article{elmaaroufi2024scenicnl:,
    title={ScenicNL: Generating Probabilistic Scenario Programs from Natural
  Language},
    author={Karim Elmaaroufi, Devan Shanker, Ana Cismaru, Marcell
  Vazquez-Chanlatte, Alberto Sangiovanni-Vincentelli, Matei Zaharia, and Sanjit
  A. Seshia},
    journal={arXiv preprint arXiv:2405.03709},
    year={2024},
    archivePrefix={arXiv},
    eprint={2405.03709},
    primaryClass={cs.SE cs.AI cs.LG cs.PL}
}