A benchmark to evaluate implicit reasoning in LLMs using guess-the-rule games
Project description
GuessTheRuleBench - GTRBench
Welcome to GuessTheRuleBench (pypi library name gtrbench), a dynamic benchmark designed to evaluate implicit rule deduction capabilities of Large Language Models (LLMs) through "guess-the-rule" games. This repository contains:
- The code for running the benchmark via a Python library.
- A web application demo where human user can play the games or watch LLM agents interact with the system in real-time.
- Experiment results and a research paper detailing the methodology and findings.
High-Level System Design Diagram
Below is a high-level system design diagram that illustrates the various components, their interactions, and the overall workflow of GuessTheRuleBench:
Research Paper and Demo Presentation
For a complete understanding of the methodology, experiments, and analysis, please refer below
System Requirements
Python 3.9 or below is required to run the Python library and backend services. Use a conda environment to avoid installing libraries globally:
conda create -n guess_the_rule_env python=3.9
conda activate guess_the_rule_env
For Agentic Use: Running the Benchmark Python Library
The Python library provides four game classes:
StaticGoingOnAPicnic()for the Static Picnic gameDynamicGoingOnAPicnic()for the Dynamic Picnic gameCodeFunctionsPicnic()for the Code Functions Picnic gameMathGuessTheRuleGame()for the Math game
Each class exposes the following methods:
create_game_instance()to request a new instance of the game.get_more_examples(N)to request N more examples.validate_guess(guess)to present the user's guess for validation.get_game_summary()to retrieve the performance summary of the current game.load_game(uuid)to load a previously generated game instance.
Test Code for Static Picnic Game:
from lib.domain.picnic.static_picnic.base import StaticGoingOnAPicnic
# Get a new object for the static picnic game
static_picnic_obj = StaticGoingOnAPicnic(
difficulty='L1',
num_init_examples=2
)
# Create a new game instance
static_picnic_obj.create_game_instance()
# Request more examples
static_picnic_obj.get_more_examples(n=1)
static_picnic_obj.get_more_examples(n=2)
static_picnic_obj.get_more_examples(n=3)
# Validate guess
static_picnic_obj.validate_guess(guess='Items from the category kitchen appliances')
# Get game summary
static_picnic_obj.get_game_summary()
# Load an existing game and check its summary
loaded_game = StaticGoingOnAPicnic.load_game('650499e9-a5da-4129-b426-8d6517bf65e6')
loaded_game.get_game_summary(include_rule=True)
Web Application UI
Below are some screenshots showcasing the web application that we created to demo our benchmark:
-
Landing Page
-
Docs Page
-
Game Play
Either start a new game or load existing game using an already generated game UUID.
Select the game configurations to start a new game.
Game play UI.
Benchmark Experiments High-Level Results
Below is a summary of the average win rate of different models across all games and difficulty levels. Bold values highlight the best performances
in their respective columns.
Feedback and Contribution
If you have any suggestions, issues, or contributions, please feel free to open an issue or submit a pull request. We appreciate your interest and support in improving GuessTheRuleBench.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gtrbench-0.0.1.tar.gz.
File metadata
- Download URL: gtrbench-0.0.1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a15dfb4cc0de43f42a7254d820c3bbe48cc40a71ab0d3a5ebb8271320e42fa
|
|
| MD5 |
389ef45a127baa9fb1aae7bb97db0f8d
|
|
| BLAKE2b-256 |
be677c0be3d13ed77508da667e8308dc8ac055c67f93ec2cfa35391efbe3a7bf
|
File details
Details for the file gtrbench-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gtrbench-0.0.1-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37bfb764d307f015625d7b95a9364dbe26efaaca850b92c94a9a3ca7b2d7be21
|
|
| MD5 |
e9fcbe5fc08216b17d4dc944402bbb35
|
|
| BLAKE2b-256 |
60160f6cb4eb1976b0899f3cac6019a6b1adf6ba5131d6b0e2bee4538d555afd
|