BOOTH
A lightweight checkpoint layer for AI.
Should my application trust this LLM output?
Tutorial · Use Cases · Changelog · Issues
Every app built on an LLM call has to answer that question eventually, usually the hard way, after a confidently wrong answer has already reached a user. BOOTH is the checkpoint that answers it first. It sits between your application and an LLM call, and hands you back a structured, defensible decision instead of just whatever fluent text the model gave you.
pip install boothpy
import booth
result = booth.check(call_llm, "What is the capital of France?")
if result.ok:
print(result.answer) # "Paris", confident and unambiguous
else:
print(f"BOOTH returned {result.status}") # AMBIGUOUS / UNCERTAIN, don't ship it blind
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, 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, more tools bolted around it. And 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 of this on Substack: "Knowing less, but knowing what matters".
A real example, not a hypothetical
Same model, same question, asked with and without BOOTH. This is an actual comparison run, not a constructed demo.
| Answer | |
|---|---|
| Without BOOTH | "90 days" (fabricated, no such number exists in the actual policy) |
With booth.check_with_evidence() |
"45 days" (matches the real policy document exactly) |
No amount of self-reported confidence catches that first answer. Only checking it against something real does.
result = booth.check_with_evidence(
answer=llm_answer,
evidence=retrieved_docs,
compare_fn=your_comparison_function,
)
if result.status == booth.BLOCKED:
print("The answer doesn't agree with what was actually retrieved.")
(The specific fabricated number will vary from run to run, that's just uncalibrated sampling. The pattern is the reliable part.)
Philosophy
- Keep the checkpoint small. A reusable decision layer, not another full LLM framework.
- Make uncertainty explicit. Return a structured status instead of silently passing an unacceptable output through.
- Treat ambiguity, validation, and confidence as separate, ordered checks. A confident, validator-passing answer can still be ambiguous.
- Reconsider instead of blindly resampling. The reason an attempt failed determines what the model is actually shown on retry.
- Expose, don't reinterpret.
result.parsedshows the model's raw response rather than deciding what it should mean. - Reject invalid data, don't silently coerce it. An out-of-range confidence or an unrecognized boolean-ish value is a reason to reject the attempt, never guess at.
- Keep evidence retrieval outside BOOTH. Applications own their own RAG, search, database, or tool infrastructure.
- Do not pretend agreement is truth. Agreement with a validator, confidence value, or retrieved evidence is not the same as proving a claim.
- Stay provider-agnostic. BOOTH works with any LLM provider because your application supplies the model-calling function.
What BOOTH provides today
v0.4.8, zero-dependency, provider-agnostic, works with any LLM client you already have:
- ambiguity detection, confidence checking with genuine reconsideration retries, and an optional caller-supplied
validator check_with_evidence()for grounding an answer against evidence your own RAG pipeline already retrieved- sync and async APIs (
check()/acheck()) with consistent callable-object support on both - structured results, including
result.method,result.parsed, andresult.to_dict(), instead of a raw string you have no reason to trust
Learn more
- TUTORIAL.md: every function, every field, how it all works
- USECASES.md: where BOOTH fits, and just as importantly, where it doesn't
- CHANGELOG.md: what changed in each release, and why
pip install boothpy
# or: pip install git+https://github.com/Vedantgitbot/booth.git
Contributing
BOOTH is small on purpose. That's a design constraint, not a lack of ambition. Bug reports and confirmed edge cases are the most valuable kind of contribution right now. Open an issue with a minimal reproduction, and it'll get a real look. Every fix so far has started from a reproduced failure, not a guess, and that bar stays the same for outside contributions too.
License
This is the official BOOTH repository, maintained by Vedant Brahmbhatt.
BOOTH is released under the MIT License. See LICENSE for the full text.
Release files for boothpy 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| boothpy-0.4.8.tar.gz | 35.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| boothpy-0.4.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.9 kB
Release files / boothpy-0.4.8.tar.gz
| Download URL | boothpy-0.4.8.tar.gz |
|---|---|
| Size | 35.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af332cabc347d59105e62e1d5ca57f70b855df4f81ec5943c3b03a71b695b543
|
|
BLAKE2b-256 checksum How to use checksums |
a56e951fb762a506244e6b1ed3cebe29570a64f0e563f44972ce644497adafab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / boothpy-0.4.8-py3-none-any.whl
| Download URL | boothpy-0.4.8-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
855dd2020dfa595165a277bc776e14294f6216da7461ce1a0f3f13ddcda775fe
|
|
BLAKE2b-256 checksum How to use checksums |
e80975670adb93ef776a7a5d4402a251aeef2124f632c8a6766acee2ad58dfa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|