Skip to content

Example: Benchmark BOOTH's Latency and Accuracy Overhead (100 Questions) #32

Open

Description

@Vedantgitbot

Anyone adopting BOOTH wants to understand the trade-off between answer reliability and computational cost.

We currently have manually measured numbers (e.g., 3 samples resulting in approximately 3× the model calls in #29), but no controlled, reproducible comparison.

This issue aims to create a small benchmark that runs the same questions through a plain model call and BOOTH, comparing accuracy, latency, and model-call overhead.

What to build

Create a self-contained example:

examples/{github_username}_latency_accuracy/
├── run_example.py
├── RESULTS.md
└── .gitignore

1. Question dataset

Use 100 questions by default, with configurable sample sizes of 50, 100, or 200.

Suggested distribution:

Dataset Questions Purpose
TriviaQA 30 General knowledge
TruthfulQA 30 Misconceptions and misleading questions
GSM8K 40 Mathematical reasoning

Also include:

  • Per-repetition results.

  • Grading and normalization methodology.

  • Dataset IDs or a reference to the committed question manifest.

  • Brief observations, failures, and limitations.

Important: Commit actual benchmark output, not fabricated or illustrative measurements. Report negative or unexpected results honestly.

8. Implementation constraints

  • No changes to src/booth/.

  • No new BOOTH dependencies.

  • No committed API keys or secrets.

  • Keep the example self-contained and configurable.

  • Use .gitignore for temporary files and local configuration.

Acceptance criteria

  • Add the three requested files under examples/{github_username}_latency_accuracy/.

  • Support 50, 100, and 200 questions (100 by default).

  • Sample from all three suggested datasets using a fixed seed.

  • Preserve question IDs and reference answers.

  • Implement deterministic grading.

  • Implement all three execution arms.

  • Run at least 3 repetitions with randomized or alternating order.

  • Report accuracy, latency, runtime, model calls, and all outcome categories.

  • Include actual results and reproducibility details in RESULTS.md.

  • Verify the example works with a local model without an API key.

  • Do not modify BOOTH source code or add dependencies.

Out of scope

Contribution claim

To claim this issue, comment with:

  1. Proposed provider.

  2. Model and version.

  3. Local or hosted execution (local preferred).

Claim window: 7 days.

The goal is an honest, reproducible demonstration of BOOTH's accuracy, latency, and model-call trade-offs.

Results from 100 questions are illustrative and should not be treated as general performance claims.

# Example: Benchmark BOOTH's Latency and Accuracy Overhead (100 Questions)

Background

Anyone adopting BOOTH wants to understand the trade-off between answer reliability and computational cost.

We currently have manually measured numbers (e.g., 3 samples resulting in approximately 3× the model calls in #29), but no controlled, reproducible comparison.

This issue aims to create a small benchmark that runs the same questions through a plain model call and BOOTH, comparing accuracy, latency, and model-call overhead.

What to build

Create a self-contained example:

examples/{github_username}_latency_accuracy/
├── run_example.py
├── RESULTS.md
└── .gitignore

1. Question dataset

Use 100 questions by default, with configurable sample sizes of 50, 100, or 200.

Suggested distribution:

Dataset Questions Purpose
[TriviaQA](https://huggingface.co/datasets/mandarjoshi/trivia_qa) 30 General knowledge
[TruthfulQA](https://huggingface.co/datasets/EleutherAI/truthful_qa_mc) 30 Misconceptions and misleading questions
[GSM8K](https://huggingface.co/datasets/openai/gsm8k) 40 Mathematical reasoning

Requirements:

  • Use a fixed sampling seed.
  • Preserve dataset IDs and reference answers.
  • Check dataset licences and attribution requirements.
  • Use deterministic grading; no LLM judge.
  • Document answer normalization and numerical comparison rules.

2. Compare three execution arms

Run the same questions using the same model:

Arm Configuration
A Plain model call without BOOTH
B booth.check() with max_retries=0
C booth.check() with default retries

Optionally include a fourth arm using check_with_evidence() where suitable evidence is available.

3. Metrics

Report the following for every arm:

Metric Description
Accuracy Correct answers (%)
Mean / median latency Seconds per question
Total runtime Total wall-clock time
Model calls Total calls made
Rejected Number of rejected answers
AMBIGUOUS Number of ambiguous results
UNCERTAIN Number of uncertain results
Failures Number of failed calls

Clearly explain the accuracy denominator. Count unsuccessful responses separately and do not silently exclude them from grading.

4. Fair comparison

  • Run at least 3 repetitions by default, configurable by the user.
  • Randomize or alternate execution order.
  • Use identical model and generation settings across all arms.
  • Apply consistent timeout and error-handling policies.
  • Report individual repetitions and aggregated results.
  • Distinguish setup/warm-up time from benchmark execution time.

5. Model and provider

Support at least one local model so the benchmark can run without an API key.

Suggested configuration:

  • Provider: Ollama
  • Model: qwen2.5:7b-instruct or another suitable local model.
  • Temperature: 0.
  • Fixed seed where supported.

Keep provider integration simple: isolate model invocation in one function so contributors can switch providers easily.

Hosted providers are welcome, but API keys must come from environment variables.

Use Python's standard library for HTTP requests where possible.

6. Reproducibility

Document and pin the following:

  • Latest published boothpy version at implementation time (record the exact installed version).
  • Model tag and digest/revision.
  • Provider and generation settings.
  • Python version and operating system.
  • Hardware (CPU, GPU, and RAM).
  • Dataset versions and question-sampling seed.
  • Number of questions and repetitions.

7. RESULTS.md — Expected format

Use a consistent reporting format:

Experiment configuration

Configuration Value
BOOTH version
Python / OS
Provider / Model
Model digest
Temperature / Seed
Dataset versions
Questions / Repetitions
Hardware

Benchmark comparison

Metric Plain model BOOTH (no retries) BOOTH (default retries)
Accuracy (%)
Mean latency (s)
Median latency (s)
Total runtime (s)
Model calls
Rejected
AMBIGUOUS
UNCERTAIN
Call failures

Also include:

  • Per-repetition results.
  • Grading and normalization methodology.
  • Dataset IDs or a reference to the committed question manifest.
  • Brief observations, failures, and limitations.

Important: Commit actual benchmark output, not fabricated or illustrative measurements. Report negative or unexpected results honestly.

8. Implementation constraints

  • No changes to src/booth/.
  • No new BOOTH dependencies.
  • No committed API keys or secrets.
  • Keep the example self-contained and configurable.
  • Use .gitignore for temporary files and local configuration.

Acceptance criteria

  • Add the three requested files under examples/{github_username}_latency_accuracy/.
  • Support 50, 100, and 200 questions (100 by default).
  • Sample from all three suggested datasets using a fixed seed.
  • Preserve question IDs and reference answers.
  • Implement deterministic grading.
  • Implement all three execution arms.
  • Run at least 3 repetitions with randomized or alternating order.
  • Report accuracy, latency, runtime, model calls, and all outcome categories.
  • Include actual results and reproducibility details in RESULTS.md.
  • Verify the example works with a local model without an API key.
  • Do not modify BOOTH source code or add dependencies.

Out of scope

Contribution claim

To claim this issue, comment with:

  1. Proposed provider.
  2. Model and version.
  3. Local or hosted execution (local preferred).

Claim window: 7 days.

The goal is an honest, reproducible demonstration of BOOTH's accuracy, latency, and model-call trade-offs.

Results from 100 questions are illustrative and should not be treated as general performance claims.

Activity

  1. Vedantgitbot commented on Nov 3, 2026

    @Vedantgitbot
    OwnerAuthor

    I'll take the lead on the first implementation of this benchmark.

    Planned setup:

    • Provider: Ollama
    • Model: Qwen2.5 7B Instruct (qwen2.5:7b-instruct)
    • Execution: Local model, no API key required.
    • Example directory: examples/Vedantgitbot_latency_accuracy/
    • BOOTH functions: check() with max_retries=0 and default retries, compared against a plain model call without BOOTH.

    I'll use 100 questions by default, run 3 repetitions, and measure accuracy, latency, and model-call overhead across all three approaches.

    I'll include the runnable script, .gitignore, and actual benchmark results with the environment and model details in RESULTS.md.

    I'm starting with this implementation, but the issue will remain open for others who want to contribute alternative models, approaches, or benchmark results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions