-
-
Dr. Bean helps researchers understand what their data support and what to measure next.
-
The architecture. Gemini reads sources, Deep Agents coordinates approved checks, and Counterdex produces replayable scientific evidence.
-
From a research question to checked evidence and a plan for the next measurement.
-
Start with your files and a question, paste a table, or explore a sample.
-
Review five real concentration readings, their allowances, and the claimed elimination-rate range.
-
Review the model, inputs, and calculation before approving exactly what will run.
-
Counterdex found a rate outside the claimed range that still fits all five real readings within their allowances.
-
At 8 hours, the two candidates predict 3.27 and 3.93 mg/L. A reading with a ±0.20 mg/L allowance could distinguish them.
-
Compare isotropic and bi-Maxwellian models against real electron currents using numerical fits.
-
At 20 µA noise, every listed measurement setting leaves overlapping prediction bands. The models remain hard to distinguish.
-
Scheduled Grok Bot QA recorded four passes, caught a stale screen-reader label, saved evidence, and paused itself.
Two different explanations can fit the same measurements. An AI assistant can describe either one convincingly. For a researcher, the questions remain: what do the data actually establish, and what should we measure next?
We built Dr. Bean around those questions. It helps researchers read papers and data, review scientific claims, test supported models, and compare possible next measurements. Each checked result stays connected to its assumptions and computational evidence.
Inspiration
Our starting point was Lean, the proof assistant used to check formal mathematical arguments. We liked the idea that a claim could come with something a computer could check, with its assumptions made explicit.
We wanted to bring that approach into scientific research. Experimental work adds another layer: measurements have uncertainty, instruments have detection limits, and several models can explain the same observations. A useful scientific checker needs to carry those details into its conclusions.
AI makes this problem especially relevant. It can help researchers read papers, write analysis code, propose models, and explain results much faster. It can also turn an uncertain finding into a confident statement. A curve that fits the data can become a claim that the model is correct. A search that finds no counterexample can become a claim that none exists. Those changes in wording can quietly change the scientific meaning.
That gap motivated us. We wanted an AI research assistant whose conclusions could be traced back to the source material and, where supported, checked through an explicit mathematical calculation.
Conversations with researchers helped us decide what to build around that principle. Preparing specimens, collecting measurements, and analyzing data can take substantial effort. Their feedback pushed us toward a practical question: could the next measurement actually distinguish the explanations we are considering, given the noise we expect?
What Dr. Bean does
A study starts with files and a question. Researchers can upload papers or data and ask what they want to investigate. Gemini helps interpret the material and returns a structured reading with quotations and source references. The researcher can inspect those passages, review extracted values, and prepare a supported scientific check.
The interface follows four steps:
- Data: bring files, enter measurements, or explore a sample.
- Approval: review the inputs, assumptions, and operation being proposed.
- Answer: inspect the finding, its explanation, and the supporting evidence.
- Next step: compare possible follow-up measurements or continue the investigation.
For the concentration workflow, Counterdex checks candidate parameter assignments against a reviewed two-rate model:
$$ C(t)=A\left(e^{-k_e t}-e^{-k_a t}\right). $$
Each included reading has a value \(y_i\), a time \(t_i\), and a reviewed hard allowance \(\varepsilon_i\). A compatible candidate must satisfy
$$ \left|C(t_i)-y_i\right|\leq\varepsilon_i $$
for every included reading.
Our real example contains five concentration readings and a claim that the elimination rate lies between 0.10 and 0.17 per hour. Counterdex finds a compatible assignment with
$$ k_e=\frac{101}{1016}\approx 0.0994\ \mathrm{h}^{-1}. $$
That value falls outside the claimed interval while satisfying all five readings within their reviewed allowances. It gives the researcher a concrete counterexample: under those assumptions, the measurements also admit a value outside the proposed range.
The interface presents the result through curves, observation tables, and an explanation. Researchers can download the exact scientific evidence and replay it with the matching checker.
Choosing the next measurement
The next-measurement workflow turns that finding into a practical decision. For a selected pair of candidates, the researcher supplies feasible measurement times and a future measurement allowance. Dr. Bean compares their predictions and checks whether the proposed precision can distinguish the pair.
In our concentration example, the two retained candidates predict approximately 3.27 and 3.93 mg/L at eight hours. With a future hard allowance of ±0.20 mg/L, their allowed measurement bands are separated by approximately
$$ 3.93-3.27-2(0.20)=0.26\ \mathrm{mg/L}. $$
A measurement meeting that allowance could not agree with both candidates. The researcher can see why that time is useful and which precision assumption makes it useful.
We also built a separate numerical workflow for idealized electron-current models. It compares isotropic and bi-Maxwellian distributions using real collector-current data and examines how their distinguishability changes with noise.
At a sufficiently high noise level, none of the listed measurement settings separates the prediction bands. That is a useful planning result: the researcher can consider better precision or different settings before spending time collecting another ambiguous observation.
The two libraries we developed and published
The scientific software is available in two Python libraries we developed and published separately on PyPI: Counterdex and counterdex-models. Both can be used independently of the Dr. Bean website.
Counterdex provides the exact checking workflow. It searches for competing parameter assignments in its supported model, checks their compatibility with reviewed measurements, compares follow-up measurements for a selected pair, and rechecks candidates when a new observation is added. Its evidence can be exported and replayed outside the application.
Counterdex builds on our earlier mathematical-checking work. In Dr. Bean, we connected that foundation to reviewed research inputs, scientific operations, and an interface that explains the result.
counterdex-models provides a broader numerical workflow for registered models. It supports bounded fitting, parameter sensitivity, changes in noise and detection assumptions, seeded Monte Carlo simulations, and ranking a supplied set of possible measurement times.
Its model registry gives developers a way to add domain-specific models while keeping the surrounding comparison workflow reusable. Numerical results retain their inputs, method, and computational budget so that another researcher can inspect how they were obtained.
Both libraries have no runtime dependencies and make no model-provider calls. A researcher can use them in a Python script, notebook, or another application without adopting our web interface or paying for an AI service.
Publishing the libraries makes the project useful at two levels. Dr. Bean provides an accessible research workflow. The packages provide reusable scientific computation that other tools can build on.
How we built it
Gemini and LangChain Deep Agents connect the research question to the scientific tools. Gemini handles research-file interpretation. Our Deep Agents coordinator works through a plan and scoped tools for proposals, clarification, approved computation, evidence inspection, and reporting. LangGraph supplies the interrupt and checkpoint mechanisms around those operations.
We tested a separate live Gemini-driven coordinator against the actual scientific backend. One recorded run completed with four Gemini requests. It prepared a plan, paused for approval, invoked Counterdex, and completed a report with validated commentary. The scientific result remained tied to the reviewed inputs and the evidence produced by the checker.
The primary study interface uses controlled coordination with the same scientific tools. This gave us a repeatable way to test the researcher-facing workflow alongside the separate live coordinator.
A Python and FastAPI backend manages workspaces, approvals, jobs, and retained records. SQLite stores application state and checkpoints. The study interface uses JavaScript, HTML, and CSS, with KaTeX for mathematical notation. Vercel serves the public landing page and routes the study interface through our domain, while Cloudflare connects it to the running research application.
Codex and Claude Code supported implementation and independent evaluation across separate assignments. GitHub pull requests helped us review the interfaces between components, while GitHub Actions provided repeatable checks on the assembled application.
Challenges we worked through
The hardest engineering problem was preserving scientific meaning across every handoff.
A number copied from a paper needs its units and context. A standard deviation and a hard measurement allowance have different meanings. An approved calculation must use exactly the inputs the researcher reviewed. A report must describe the result the scientific tool actually returned.
These details matter when AI writes the explanation. A fluent summary can overstate a valid calculation by changing a few words. We built structured result contracts, checks on generated commentary, and evidence records that remain available even if the explanatory model fails.
We also kept numerical comparisons and exact mathematical checks distinct. Each result carries the interpretation appropriate to the method that produced it. Finding no counterexample remains an inconclusive search result; a successful numerical fit remains evidence about the stated models and assumptions.
Testing covered the engine, API, browser workflows, and process behavior on macOS and Linux. We examined interrupted jobs, changed inputs, replay, and whether evidence survived failures elsewhere in the application.
Grok Bot contributed a useful browser-testing result. We created a scheduled QA routine for the public website. It checked study entry, sample loading, and reset behavior, then saved a report and screenshots. It identified an accessibility issue where the visible form had cleared but its screen-reader label still described the previous sample. A visual inspection alone could miss that failure.
Why this matters
An overclaim can affect more than the wording of a paper. It can influence which experiment someone runs next, which model they build on, and how much confidence they place in an uncertain result.
Our aim is to make those decisions easier to examine. A researcher should be able to follow a conclusion back to its measurements, assumptions, and calculation. When the data leave room for competing explanations, the software should help identify a useful next measurement.
For a laboratory, this could help avoid collecting observations that would leave the same ambiguity unresolved. For a student, it makes the distinction between fitting a curve and supporting a claim visible. For developers building AI research tools, our published libraries provide scientific operations whose inputs and outputs can be inspected independently of the language model.
Dr. Bean brings those capabilities into one workflow. The libraries let the same work travel beyond the application.
What we are proud of
We connected an ordinary research question to a reviewed computation and an inspectable result. The concentration example makes the value easy to see: two parameter assignments agree with the existing observations, and a follow-up measurement can be chosen by examining where their predictions separate.
We are also proud that the scientific components are available as independently usable packages. Someone can build a different interface, add registered numerical models, or replay compatible evidence without running Dr. Bean.
The completed live Gemini and Deep Agents test gave us a concrete example of AI coordinating a plan, an approval pause, scientific execution, and a report. The public interface makes the corresponding scientific steps understandable through reviewed inputs, competing curves, and readable results.
What we learned
Our original interest in proof checking grew into an interest in experimental decisions. Once a counterexample exists, the next useful question is often what observation could rule it out.
We learned that uncertainty belongs in the workflow from the beginning. Changing an allowance, noise assumption, or detection threshold can change what a result supports and which measurement is worth taking.
We also learned how much the presentation of an answer matters. A researcher needs to understand what was assumed, what was checked, and what action is available next. Those questions shaped both the backend and the interface.
What comes next
We want to add more supported scientific models, expand the numerical model registry, and bring live coordination directly into the primary study workflow.
The next research step is to evaluate the measurement recommendations with researchers using authorized experimental data. We want to learn whether the proposed observations are feasible, whether the assumed precision is realistic, and whether the results help with an actual research decision.
The idea that drew us to Lean still guides the project: make the reasoning inspectable and the claims checkable. Dr. Bean applies that ambition to the measurements researchers already have and the ones they are deciding to collect next.
We thank Dr. Xiao for explaining the practical demands of preparing ultrafast optical measurements and for offering to review our demo. His feedback reinforced the importance of considering experimental preparation when recommending what to measure next.
Rishika Porandla ’28 provided feedback in response to our questions about distinguishing models and choosing useful measurements.
Built With
- claudecode
- cloudflare
- codex
- counterdex
- css
- deepagents
- fastapi
- gemini
- github
- githubactions
- grokbot
- html
- javascript
- katex
- langchain
- langgraph
- node.js
- playwright
- pydantic
- pytest
- python
- sqlite
- vercel
