Python infrastructure that builds knowledge graphs and context graphs from enterprise data, with reasoning, ontology governance, and W3C PROV-O provenance for auditable AI decisions.
stalkermustang/llm-bulls-and-cows-benchmark
A Python benchmark that measures how well LLMs solve the Bulls and Cows number-guessing game, using LiteLLM to reach many model providers.
- Stars
- 235
- Forks
- 2
- Open issues
- 0
- Last commit
- 2 years ago
What is it?
LLM Bulls and Cows Benchmark is a small framework for testing how well language models play Bulls and Cows, a code-breaking game where a guesser must identify a secret number from bull and cow feedback on each guess. It is designed to exercise both multi-step reasoning and the ability to learn from earlier answers in the same conversation.
The framework connects to providers through LiteLLM, so OpenAI, Anthropic, OpenRouter and other endpoints can be compared with the same prompts. Games can be configured for 3 or 4 digits, with or without repeated digits, and several games can run concurrently with live progress bars. Results include success rate with Wilson confidence intervals, format failure rate, and average turns to win, along with full conversation logs and HTML/Markdown visualizations.
Prompts and templates are kept in a single file, and structured-output modes are deliberately not used so that the test measures plain text responses. Game logic and answer parsing are covered by pytest tests.
Key features
- 01Supports many LLM providers via LiteLLM
- 02Configurable 3- or 4-digit games, with or without repeated digits
- 03Runs concurrent games with live progress display
- 04Reports success rate, format failures and average turns with confidence intervals
- 05Saves full game histories and generates HTML and Markdown result reports
Use cases
- Comparing reasoning performance across LLMs on a simple, reproducible puzzle
- Testing whether a model follows strict output formatting instructions
- Studying in-context learning from feedback over multiple turns
Topics
FAQ
- What is llm-bulls-and-cows-benchmark?
- A Python benchmark that measures how well LLMs solve the Bulls and Cows number-guessing game, using LiteLLM to reach many model providers. LLM Bulls and Cows Benchmark is a small framework for testing how well language models play Bulls and Cows, a code-breaking game where a guesser must identify a secret number from bull and cow feedback on each guess. It is designed to exercise both multi-step reasoning and the ability to learn from earlier answers in the same conversation.
- Is llm-bulls-and-cows-benchmark free to use? What license does it have?
- llm-bulls-and-cows-benchmark is open source under the MIT license. Check the license terms before using it in commercial products.
- Is llm-bulls-and-cows-benchmark still maintained?
- No commits for 6+ months. The last commit to llm-bulls-and-cows-benchmark was on Jan 31, 2025.
- What can I use llm-bulls-and-cows-benchmark for?
- Comparing reasoning performance across LLMs on a simple, reproducible puzzle Testing whether a model follows strict output formatting instructions Studying in-context learning from feedback over multiple turns
- Where can I get llm-bulls-and-cows-benchmark?
- The source code and installation instructions are on GitHub: https://github.com/stalkermustang/llm-bulls-and-cows-benchmark
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source tool that turns a topic or keyword into a finished short video, handling script, voiceover, stock footage, subtitles and background music automatically.
Turns your exported chat history into a fine-tuned LLM that mimics your writing style, then deploys it as a chatbot on messaging platforms.
Incremental data pipeline framework in Python with a Rust core that keeps vector indexes and knowledge graphs for AI agents continuously in sync with changing sources.
A self-hosted personal AI assistant that runs on your own devices and answers you through chat apps like WhatsApp, Telegram, Slack, and Discord.
A software development methodology and composable skills library that guides coding agents through brainstorming, planning, TDD, and subagent-driven implementation.