Academic literature review is, at its core, a knowledge management problem. You read dozens — sometimes hundreds — of papers, extract fragments of insight, and then face the real challenge: turning those fragments into a coherent theoretical argument. Most researchers manage this with a combination of Zotero, Word documents, and hope. BEBA is my attempt to do it properly.
BEBA stands for Bayesian Evidence-Based Analysis. It is a Python-based research operating system that I have been developing alongside my actual research. The name captures the core design decision: not just extracting information from literature, but continuously assessing how much evidential support each theoretical claim actually has — using a Bayesian model, updated incrementally as new sources are processed.
The Problem It Solves
When you work with a large body of literature, three things become genuinely difficult:
- Provenance — which paper said what, and in what context?
- Coverage — do you have enough evidence for this claim, or is one paper doing all the work?
- Consistency — does the evidence in paper A actually contradict what paper B says about the same construct?
Standard reference managers handle citations. They do not handle these three problems. BEBA does.
Architecture: A Seven-Step Pipeline
At the core of BEBA is a literature workflow that processes a single source document — a synthesized literature review in Markdown format — through seven sequential steps:
1 Synthesis → structured synthesis of the source2 Evidence + Src → individual evidence items (EVID-XXXXXX) and source stubs (SRC-XXXXXX)3 Claims → theoretical claims derived from the evidence4 Theory → integration into the theory-building narrative5 Ontology → concept candidates for the domain ontology6 Review object → REVIEW-XXXXXX manifest linking all objects together7 Finalise → updated INDEX.yaml, master.bib, and manifest
Every object — evidence item, source, claim — lives as a YAML-fronted Markdown file in a structured directory tree inside the monography. Nothing is stored in a database; everything is text, versioned in git, readable by any tool.
The pipeline dispatches to LLMs for each step, with a configurable provider fallback chain (Anthropic → OpenAI → Gemini by default). Costs and token usage are logged per-call to JSONL telemetry files and surfaced in a dashboard.
The Bayesian Heart
The most distinctive part of BEBA is its Bayesian Beta-Binomial evidence model. Each theoretical claim has an associated confidence level — essentially a prior. When evidence items are linked to that claim via shared concept slugs, BEBA updates a Beta distribution using each piece of evidence, weighted by three factors:
- Strength of the evidence item (how directly it supports the claim)
- Extraction confidence (how certain the LLM was when extracting it)
- Source quality (journal tier, peer review status, etc.)
The result is a posterior probability for each claim, graded A–F, with automatic flags for: no evidence at all, thin support (one or two sources doing all the work), internal conflict between evidence items, and low overall confidence.
This makes visible something that is normally invisible: the epistemic structure of your theoretical argument.
A Web Interface, Not Just a CLI
The pipeline is operated from the command line (beba literature <file.md>), but browsing 93 reviews and 300+ knowledge objects requires a proper interface. BEBA includes a FastAPI/HTMX web UI with a dark theme that runs locally at beba web.
Key screens:
- Dashboard — telemetry stats, recent reviews, provider cost breakdown
- Literature Run — trigger a pipeline run from the browser, with live log streaming via HTMX polling
- Reviews — all processed reviews, filterable by status; inline Accept/Reject decisions per evidence/claim/source object
- Knowledge Browser — tabbed view of all Evidence, Claims, and Sources; evidence items show their concept chips linking directly to the Bayesian evidence check; claims show their β-link to the posterior distribution
- Sources — source management including export of unresolved stubs as a 53-column canonical CSV manifest, reimport via DOI/ISBN → Crossref enrichment, or LLM-automated bibliographic matching
- Evidence Check — per-concept Bayesian assessment with posterior grades and conflict detection
- Claim Check — closed-loop LLM verification
Closed-Loop Claim Verification
The most recent feature deserves particular mention. After the theory-building phase — when claims have been extracted and the evidence structure assembled — BEBA can run a cross-check: for each claim, it constructs a prompt containing the full claim body, all linked evidence items, and all associated sources, and dispatches it to an LLM with the instruction to assess whether the claim is actually supported by the provided material.
The deliberate design choice here is to use a different model for verification than for extraction. Extraction runs Anthropic-first; verification runs Gemini-first. The goal is to avoid the case where the same model that generated a claim also validates it — a form of epistemic self-confirmation that would undermine the cross-check entirely.
Each claim gets a verdict: supported, partial, unsupported, or unverifiable, with a 0–100 confidence score and a plain-language explanation of any problems found. Flagged claims (unsupported, unverifiable, or low confidence) are highlighted for manual review.
Ad Fontes
One feature that emerged from practical use: ad-fontes back-references. Every source stub knows which review files it came from (via a reviews: [...] list in its frontmatter). The web interface surfaces this as a „Quelltext“ column — each source shows the literature stems it originated from as clickable chips, so you can navigate directly back to the synthesized review where the source was first encountered. This turns what would otherwise be a dead reference into a navigable provenance chain.
The Research Context: Brand Equity and Nonprofit Donations
BEBA was built in the context of my own doctoral research on brand equity and donation behavior in the nonprofit sector — a domain where the literature is genuinely fragmented across marketing, behavioral economics, psychology, and nonprofit management.
The central questions I am investigating concern how nonprofit organizations build and leverage brand equity, and how that brand equity translates into donor behavior: acquisition, retention, and donation amounts. Constructs like warm glow giving, donor identity, organizational trust, and perceived impact each appear in separate literatures with partially overlapping empirical findings and no unified theoretical framework.
This is precisely the use case BEBA was designed for. When a concept like „warm glow giving“ appears across thirty papers spanning thirty years, you need infrastructure that can track every evidence item citing that concept, assess the cumulative evidential weight, flag where findings conflict, and surface which claims are well-grounded versus which rest on a single influential study. Without systematic tooling, that kind of meta-evidential awareness is practically impossible to maintain at scale.
What It Is and What It Is Not
BEBA is not a general-purpose research tool. It is opinionated, deeply tied to my own research workflow, and makes specific assumptions about how theory-building should proceed — systematically, from evidence, with explicit uncertainty tracking. It would need significant adaptation to work for someone with a fundamentally different methodology.
It is also not finished. The ontology integration, concept management, and integration workflow are less mature than the extraction and review pipeline. The bibliographic matching is a recent addition and the quality of LLM-based enrichment varies.
But as a piece of infrastructure for a multi-year research project, it does what it was built to do: turn a large body of literature into a structured, evidence-graded, cross-verified theoretical knowledge base — and make that knowledge base navigable from a browser at localhost.
The code is on GitHub: github.com/GeraldCzech/BEBA-Tools.
