Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

boothpy

Latest version: v0.6.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: Vedantgitbot
31 Stars
13 Forks
6 Versions
511 Downloads
Python Repo language

Scan summary

boothpy was last scanned on 23 Nov 2026 at version 0.6.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest was published on 23 Nov 2026.
  • Findings: No rules fired in version 0.6.0.
  • Downloads: 511 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.0 LATEST 23 Nov 2026 No rules fired
0.5.9 14 Nov 2026 No rules fired
0.5.8 2 Nov 2026 No rules fired
0.5.7 29 Oct 2026 Not shown
0.5.6 21 Oct 2026 Not shown

No rules fired in 0.6.0

Findings

Findings for v0.6.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.


⚡ Quickstart

Every application built on an LLM has to answer one question:

Should my application trust this LLM output?

BOOTH adds a checkpoint between an LLM response and your application's next action. It returns a structured BoothResult so your application can decide whether to proceed, reject, or handle uncertainty.

Install BOOTH from PyPI:

pip install boothpy
Basic checkpoint

Pass your existing model-calling function to booth.check():

import booth

# call_llm is your existing model-calling function. It takes a prompt
# string and returns the model's response as a string.
result = booth.check(call_llm, "What is the capital of France?")

if result.ok:
    print(result.answer)
else:
    print(f"BOOTH returned {result.status}")

An accepted result means the configured checks passed. It does not prove that the answer is factually correct.

Reasoning-heavy tasks

By default BOOTH asks for a JSON-only reply, which keeps output short and easy to parse. For maths and multi-step questions, give the model room to think first (v0.6.0+):

result = booth.check(call_llm, "A train leaves at 3:15 ...", suffix=booth.REASONING_SUFFIX)

suffix= replaces the whole output instruction, so you can also supply your own. See Troubleshooting entry 10 and the latency and accuracy benchmark.

Provider-native response formats

By default BOOTH extracts a JSON object from the model's text. If your provider returns a different string format, pass a synchronous parse_fn that turns that string into a dictionary containing answer and confidence:

def parse_provider_response(raw: str):
    decoded = provider_decode(raw)
    return {"answer": decoded.answer, "confidence": decoded.confidence}

result = booth.check(
    call_llm,
    "What is the capital of France?",
    parse_fn=parse_provider_response,
)

A few things to know:

  • call_fn must still return a str. A non-str return is a call failure and never reaches parse_fn.
  • parse_fn changes how the response is parsed, not what the model is asked. Pair it with suffix= to change the instructions BOOTH appends. With the default suffix, a failed parse gets the standard JSON-style retry prompt; with a custom suffix, the retry repeats your suffix. To handle retries yourself, use max_retries=0.
  • A parser exception or a None result is a parse failure, not a call failure.

See Tutorial §3.7.


📈 What the benchmarks show

Every example in the repo records a real run. The headline results so far:

What was tested Result Details
Evidence check on a refund policy Blocked a fabricated "90 days" against a 45-day policy and accepted "45 days". Examples
Numeric validation (arithmetic answers) Caught a wrong currency amount (2.225 USD) that the model stated at confidence 1.0 and that plain check() accepted. Numeric comparison
Comparator choice An NLI comparator matched the authored expectations in 9/10 cases, a keyword matcher in 4/10. Comparator comparison
Room to reason (Qwen 7B, GSM8K) 97.5% plain, 35.0% under the JSON-only prompt, 92.5% with room to reason. suffix=REASONING_SUFFIX gives that room in one argument. Latency and accuracy
BOOTH's own test suite 527 tests. In a qikly mutation run on v0.5.9, 23 of 25 sampled planted faults were caught. Tests

These are small, documented runs, not accuracy guarantees. Each example's RESULTS.md has the setup and the full numbers.


🎯 Grounding Answers with Evidence

A model can sound confident while giving an answer that contradicts your documents. Self-reported confidence alone cannot establish whether an answer agrees with a policy, retrieved passage, or other source.

booth.check_with_evidence() checks a supplied answer against evidence using a comparison function you provide.

Example: refund-policy answers

In a documented comparison run, the model produced a fabricated "90 days" answer without grounding. The policy stated "45 days".

Answer being evaluated Relationship to the policy Intended checkpoint decision
"90 days" Contradicts the policy's 45-day period BLOCKED if the comparator detects the disagreement
"45 days" Matches the policy's stated period ACCEPTED if the comparator confirms agreement

The checkpoint does not turn "90 days" into "45 days". It evaluates the answer your application supplies.

import booth

result = booth.check_with_evidence(
    answer=llm_answer,
    evidence=retrieved_docs,
    compare_fn=your_comparison_function,
)

if result.ok:
    print(f"Grounded answer: {result.answer}")
else:
    print(f"Evidence check returned {result.status}: {result.detail}")

The specific fabricated number can vary between model runs. The important distinction is whether the answer agrees with the supplied evidence.

The comparator matters

check_with_evidence() runs the compare_fn you provide. A weak comparator gives a weak check.

The examples include a keyword matcher and an NLI model evaluated on the same inputs, along with failure cases and limitations. NLI, or natural language inference, is used here to assess whether evidence supports or contradicts an answer.

See Provider Integrations and Examples for the documented runs.


Why BOOTH Exists?

A few months ago, a person working an airport gate helped me find mine after I'd gotten lost. Boarding pass in hand, signs everywhere, I was still at the wrong gate.

She didn't know where I'd flown in from, how the aircraft was built, or anything about my itinerary beyond that one boarding pass. She didn't need to. She knew the airport, and she knew what to check.

That's the idea BOOTH is built around.

The industry's default answer to "the model got it wrong" has mostly been to make the model know more: more context, more compute, bigger models, and more tools bolted around it.

But the problem still happens, because it isn't always a knowledge problem. Sometimes what's missing isn't more information going in. It's something whose only job is checking whether what came out actually meets the bar.

BOOTH doesn't try to know more than your model does. It just knows what to check.

I wrote the longer version on Substack: "Knowing less, but knowing what matters".


🌟 Featured


🛠️ Checkpoint Modes

BOOTH provides three primary APIs:

Function Execution Purpose
booth.check() Synchronous Evaluates model responses for parsing, ambiguity, confidence, and an optional custom validator. Accepts an optional parse_fn for provider-native response formats and an optional suffix= to change the output instructions. Retries with reconsideration when appropriate.
booth.check_with_evidence() Synchronous Evaluates a supplied answer against application-provided evidence using your comparator. Does not call an LLM itself.
booth.acheck() Asynchronous Async equivalent of check(), supporting async model callables and async execution loops.

Your application owns model access, evidence retrieval, and downstream handling. BOOTH provides the checkpoint decision.


🚦 Status Codes and Result Inspection

Checkpoint results are returned as structured BoothResult objects.

Status codes
Status Outcome Meaning
ACCEPTED Success The applicable checks passed. For check(), this includes ambiguity, confidence, and any supplied validator.
REPAIRED Success An earlier attempt failed, but a retry passed.
AMBIGUOUS Rejected The model reported multiple reasonable readings of the question. Returned immediately without retrying.
UNCERTAIN Rejected No acceptable result was obtained. Possible causes include low confidence, parsing failure, validator failure, or a failed model call.
BLOCKED Rejected The evidence comparator rejected the answer against the supplied evidence.

The default confidence threshold for check() is 0.7.

There is no separate status for an unparseable response. A parsing failure is reported as UNCERTAIN with result.method == "parse_failure".

For an UNCERTAIN result, inspect result.method and result.call_failed to distinguish the cause.

Check the result
result = booth.check(call_llm, "Categorize ticket: Server unreachable")

if result.ok:
    print("Answer:", result.answer)
else:
    print("Status:", result.status)
Unwrap an accepted answer

unwrap() returns the answer when the result is successful and raises BoothRejected otherwise.

try:
    answer = result.unwrap()
except booth.BoothRejected as exc:
    print(
        f"Rejected with status={exc.result.status}, "
        f"method={exc.result.method}"
    )
Inspect diagnostics
print(result.status)       # For example: ACCEPTED, UNCERTAIN, or AMBIGUOUS
print(result.confidence)   # Confidence score
print(result.method)       # Check or failure category
print(result.call_failed)  # Whether the model-calling function failed
print(result.attempts)     # Attempt objects describing the initial call and retries

Failure categories include ambiguity, confidence, validation, and parse_failure.

result.call_failed helps distinguish an unsuccessful model call, such as a network or API error, from a model response that failed the checkpoint.


🔌 Provider Integrations and Examples

BOOTH has zero dependencies and is provider-agnostic. Your application supplies the model-calling function, so BOOTH does not require a particular LLM client or provider.

Browse the runnable integration examples →

Each example folder includes runnable code, recorded console output, and findings from an actual run.

Provider examples
Provider or runtime Model(s) API(s) demonstrated
Groq llama-3.3-70b-versatile check_with_evidence()
Google Gemini gemini-3.5-flash-lite check(), check_with_evidence()
Anthropic claude-3-5-haiku-20241022 check_with_evidence()
Ollama / local models qwen2.5-coder:7b, qwen2.5-coder:3b, llama3.2:latest check(), acheck(), check_with_evidence()

These examples cover:

  • Groq: evidence-grounded refund-policy QA and hallucination blocking.
  • Google Gemini: ambiguity detection, evidence grounding, and an integration issue where failed API calls initially looked like an unsure model. These can now be distinguished with result.call_failed.
  • Anthropic: evidence-grounded refund-policy QA against Claude.
  • Ollama: local-model checks, async execution, evidence checks, how self-reported confidence behaves on small models, and a default-format versus JSON-schema comparison on a 3B model, where schema-constrained output parsed every time. One wrong answer still passed the confidence gate, which is the case evidence checks are for.
RAG and comparator studies

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases boothpy

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229