#1 by JoachimGassen
Hi all: We, Victor Maas from the University of Amsterdam, and Fikir Edossa as well as Joachim Gassen from Humboldt-Universität zu Berlin and the Open Science Data Center of TRR 266 Accounting for Transparency are releasing ‘botex’, a Python package that should make it (relatively) straight-forward to use Chat GPT and even local LLM models as participants in #oTree experiments. With this in-development package, you can use any experiment that (solely) builds on oTree’s standard features and run a session with any mix of human and AI participants. The AI participants will scrape their assigned participant pages, infer the experimental tasks from the webpage content and provide responses just like human participants that will be stored by oTree. In addition, the LLMs will provide rationales for every answer. These data, along with the full prompting history, allow you to assess the ‘thought process’ that underlies the LLM responses and, besides being informative about LLM ‘behavior‘ can hopefully helpful to test and develop your experimental designs. Curious? Then we have a few links for you: - If you want to try how it ‘feels’ to participate in an experiment along with an LLM, you can participate here (https://exp.trr266.de/test/mftrust/) in a live experiment. You will be paired with an LLM. And you can even win a prize! The points that you earn during the experiment will determine your chances to (anonymously) win a 100 € Amazon Voucher. - If you want to understand how the sausage is being made, check out this GitHub Repo (https://github.com/trr266/botex_examples). It takes you behind the scenes of the above experiment to explain step-by-step how to use botex for your own oTree experiments. - The repo for the botex package itself is https://github.com/joachim-gassen/botex. Needless to say, we are very curious to hear what you say. So, please feel free to reach out and share your views. Thank you to the whole oTree community for making oTree such a wonderful piece of software, Joachim (and Fikir and Victor)
#2
by
Chris_oTree
Nice!
#3
by
Chris_oTree
I just took a look at the code... very good to see that you implemented it using oTree's official public APIs. Definitely makes it look stable and professionally developed.
#4 by JoachimGassen
Thanks! The API is super helpful. BTW: If you plan to extend it we would have a thing to add to the wishlist: It would be nice if one could trigger a data export (like by the web frontend) by a call. I see that in many setups people could simply query the database directly but this is yet another configuration that people need to set up.
#5
by
Victor
Hi Joachim, it works great. I was a bit clunky dealing with the virtual environment variables and running the Python scripts, but I had no real issues.
#6 by JoachimGassen
Hi all, We’re excited to announce a new version of the botex Python package! 🎉 Like before botex allows you to use LLMs as bots in oTree experiments. This release comes with several significant enhancements and new features: 1. Enhanced Compatibility botex now offers robust handling of various LLMs for different oTree setups. We've extended support to include open-source models through llama.cpp, ensuring more flexibility for your experimental designs. 2. New CLI Tool We’ve added a command-line interface (CLI) tool that makes it simple to start LLM bots in oTree experiments directly from the terminal. A few keystrokes, and you’re good to go! 3. Streamlined Workflow You can now manage the entire process—from starting oTree, initializing a session, launching bots, to exporting oTree and botex data—using either Python code or the CLI. This should make automation and integration into your experimental workflows much smoother. 4. Proper Documentation and Tutorials We’ve significantly improved the documentation (https://botex.trr266.de), including a Getting Started Guide and two tutorials. One of them benchmarks how different LLMs perform in the Guess Two Thirds Game, which comes standard with oTree installations. Explore these examples to see what’s possible. We hope these features make it even easier and more enjoyable to use botex for your oTree experiments. As always, we welcome your feedback and ideas. Thanks again to the amazing oTree community for making such great software to build upon! Cheers, Joachim, Fikir, and Victor