BODHI: Epistemic virtues (curiosity and humility) for LLM responses
Project description
BODHI (Bridging, Open, Discerning, Humble, Inquiring) is a lightweight Python library that wraps any LLM to produce responses that are genuinely curious, appropriately humble, and clinically specific.
pip install bodhi-llm
The Problem
LLMs tend to be overconfident, give vague advice, and assume rather than ask.
The Solution
BODHI uses a two-pass prompting strategy that teaches LLMs to:
| Baseline LLM | With BODHI | |
|---|---|---|
| Confidence | Overconfident | Appropriately humble |
| Missing info | Makes assumptions | Asks clarifying questions |
| Advice | Vague ("see a doctor") | Specific (dosages, timeframes) |
| Safety | May miss red flags | Explicitly identifies red flags |
Quick Start
from bodhi import BODHI
from openai import OpenAI
client = OpenAI()
bodhi = BODHI.from_openai(client, model="gpt-4o-mini")
response = bodhi.complete("I have chest pain")
print(response.content)
Output characteristics:
- Asks: "Are you experiencing shortness of breath right now?"
- Specific: "Take aspirin 325mg if not allergic"
- Clear: "Call 911 immediately if pain spreads to arm or jaw"
Installation
# Basic
pip install bodhi-llm
# With OpenAI
pip install bodhi-llm[openai]
# All providers
pip install bodhi-llm[all]
How It Works
%%{init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#4A90A4',
'primaryTextColor': '#ffffff',
'primaryBorderColor': '#2D5A6B',
'lineColor': '#666666',
'secondaryColor': '#7B68EE',
'tertiaryColor': '#20B2AA'
}
}}%%
flowchart TD
A[User Prompt<br/>'I have chest pain'] --> B[Pass 1: Analysis]
B --> B1[Task Type]
B --> B2[Audience Detection]
B --> B3[Uncertainties & Red Flags]
B1 --> C[Pass 2: Response]
B2 --> C
B3 --> C
C --> C1[BE SPECIFIC<br/>dosages, timeframes]
C --> C2[ACTIVELY ASK<br/>direct questions]
C --> C3[INCLUDE ALTERNATIVES<br/>multiple options]
classDef input fill:#5D6D7E,stroke:#2C3E50,color:#fff,stroke-width:2px
classDef analysis fill:#4A90A4,stroke:#2D5A6B,color:#fff,stroke-width:2px
classDef detail fill:#7B68EE,stroke:#5B4ACE,color:#fff,stroke-width:2px
classDef response fill:#20B2AA,stroke:#178B82,color:#fff,stroke-width:2px
classDef output fill:#3CB371,stroke:#2E8B57,color:#fff,stroke-width:2px
class A input
class B analysis
class B1,B2,B3 detail
class C response
class C1,C2,C3 output
Task Routing
| Task Type | Behavior |
|---|---|
CONVERSATION |
Warm, helpful with clarifying questions |
TECHNICAL |
Strict format (SOAP notes, ICD codes) |
HYBRID |
Technical format + clinical reasoning |
EMERGENCY |
Clear, step-by-step guidance |
Usage
With Any LLM
from bodhi import BODHI
def my_llm(messages):
# Your LLM call here
return "response"
bodhi = BODHI(my_llm)
response = bodhi.complete("I have a headache")
Configuration
from bodhi import BODHI, BODHIConfig
config = BODHIConfig(
domain="medical", # or "general"
)
bodhi = BODHI(chat, config=config)
Analysis Only
# Inspect the reasoning without generating response
analysis = bodhi.analyze("I have chest pain")
print(analysis)
API
BODHI
BODHI(chat_function, config=None)
BODHI.from_openai(client, model="gpt-4o-mini")
Methods:
complete(prompt)→BODHIResponseanalyze(prompt)→str
BODHIResponse
response.content # Final response text
response.analysis # Pass 1 reasoning
response.metadata # Timing, domain info
Citation
@article{cajas2026beyond,
title={Beyond overconfidence: Embedding curiosity and humility for ethical medical AI},
author={Cajas Ordóñez, Sebastián Andrés and Ocampo Osorio, Felipe and Lange, Maximin and Celi, Leo Anthony and others},
journal={PLOS Digital Health},
year={2026},
doi={10.1371/journal.pdig.0001013}
}
Additional citations
@article{ordonez2025humility,
title={Humility and curiosity in human--AI systems for health care},
author={Ordoñez, Sebastián Andrés Cajas and Lange, Maximin and Lunde, Torleif Markussen and Meni, Mackenzie J and Premo, Anna E},
journal={The Lancet},
volume={406},
number={10505},
year={2025}
}
Contributing
BODHI is built by an interdisciplinary team of philosophers, clinicians, engineers, and scientists spanning generations and continents. We welcome contributions from anyone passionate about making AI more humble and curious.
Future Directions
- Anti-sycophancy — Resist agreeing just to please
- Critical thinking — Challenge assumptions constructively
- Cultural sensitivity — Adapt to cultural contexts
- Epistemic justice — Recognize diverse ways of knowing
Interested? Reach out: sebasmos@mit.edu
Links
PyPI · PLOS Digital Health · The Lancet · HumbleAILLMs
CC BY-NC-SA 4.0 · Made with curiosity and humility
Project details
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 bodhi_llm-0.1.4.tar.gz.
File metadata
- Download URL: bodhi_llm-0.1.4.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
597af1707cb5d4abc184f73fcf2ddc8c50b31b08febd233bf634f3ed01eea88e
|
|
| MD5 |
d3d8e31a5f7213255f6cb1313313c0cc
|
|
| BLAKE2b-256 |
b745c8f743216e0f72da8aaf0356443f344a42b3b7e7ab2012ae8e5ffedce4e8
|
Provenance
The following attestation bundles were made for bodhi_llm-0.1.4.tar.gz:
Publisher:
publish.yml on sebasmos/bodhi-llms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bodhi_llm-0.1.4.tar.gz -
Subject digest:
597af1707cb5d4abc184f73fcf2ddc8c50b31b08febd233bf634f3ed01eea88e - Sigstore transparency entry: 834865441
- Sigstore integration time:
-
Permalink:
sebasmos/bodhi-llms@e47a74f70face460345f21b304905a762cc3ba14 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sebasmos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e47a74f70face460345f21b304905a762cc3ba14 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bodhi_llm-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bodhi_llm-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e36b41127e983727f6a9885aa6a32b0239bc21bcd8fa63510a3f4fa7202303c
|
|
| MD5 |
dce3a87c0422f4fe88e922ce42835d96
|
|
| BLAKE2b-256 |
01266d265d280eda91e785c79938f7da853d28cd1243bd61c0ad974fb3af612b
|
Provenance
The following attestation bundles were made for bodhi_llm-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on sebasmos/bodhi-llms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bodhi_llm-0.1.4-py3-none-any.whl -
Subject digest:
0e36b41127e983727f6a9885aa6a32b0239bc21bcd8fa63510a3f4fa7202303c - Sigstore transparency entry: 834865442
- Sigstore integration time:
-
Permalink:
sebasmos/bodhi-llms@e47a74f70face460345f21b304905a762cc3ba14 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sebasmos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e47a74f70face460345f21b304905a762cc3ba14 -
Trigger Event:
release
-
Statement type: