The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests References Docs 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

A compiler for causal knowledge: CSQL converts unstructured documents into an SQL-queryable causal database, letting users run structured 'why' and intervention-style queries across thousands of papers; the authors demonstrate scale by ingesting 265,656 claimed effects from 45,319 economics papers.

CSQL: Mapping Documents into Causal Databases
Sridhar Mahadevan · January 13, 2026
arxiv descriptive low evidence 7/10 relevance Full text usable extracted full text Source PDF

Structured author observations

Linked only from stored provider relations; the raw author line above is never matched by name.

Arxiv

Latest observation:

  1. Sridhar Mahadevan unresolved corpus identity

Semantic Scholar

Latest observation:

  1. S. Mahadevan provider ID
CSQL is a system that compiles causal claims extracted from unstructured text into an SQL-queryable causal database, enabling corpus-level causal queries and longitudinal analyses and demonstrated by converting the TCC corpus into a 265k-claim CDB.

Citation observations

Cumulative provider counts captured on specific dates; providers are never combined.

We describe a novel system, CSQL, which automatically converts a collection of unstructured text documents into an SQL-queryable causal database (CDB). A CDB differs from a traditional DB: it is designed to answer "why'' questions via causal interventions and structured causal queries. CSQL builds on our earlier system, DEMOCRITUS, which converts documents into thousands of local causal models derived from causal discourse. Unlike RAG-based systems or knowledge-graph based approaches, CSQL supports causal analysis over document collections rather than purely associative retrieval. For example, given an article on the origins of human bipedal walking, CSQL enables queries such as: "What are the strongest causal influences on bipedalism?'' or "Which variables act as causal hubs with the largest downstream influence?'' Beyond single-document case studies, we show that CSQL can also ingest RAG/IE-compiled causal corpora at scale by compiling the Testing Causal Claims (TCC) dataset of economics papers into a causal database containing 265,656 claim instances spanning 45,319 papers, 44 years, and 1,575 reported method strings, thereby enabling corpus-level causal queries and longitudinal analyses in CSQL. Viewed abstractly, CSQL functions as a compiler from unstructured documents into a causal database equipped with a principled algebra of queries, and can be applied broadly across many domains ranging from business, humanities, and science.

Summary

Main Finding

Csql is a system that compiles unstructured text collections into an SQL-queryable causal database (CDB) that preserves provenance, uncertainty, and compositional causal structure. Built on an LLM-driven local-model generator (Democritus), Csql induces its relational schema from discourse, aggregates thousands of local causal models into weighted directed edges (with score_sum/score_mean/score_max and support counts), and enables deterministic causal queries, hub detection, SCC/cycle analysis, and simple counterfactual-style interventions via SQL over materialized tables (Parquet/DuckDB). The system is demonstrated at scale by compiling the Testing Causal Claims (TCC) economics corpus into a CDB with 265,656 claim instances across 45,319 papers (44 years, 1,575 reported methods).

Key Points

  • Purpose: Transform document corpora into a causally grounded relational database that answers “why” questions and supports structured causal exploration (not just associative retrieval).
  • Pipeline: Documents → Democritus (generates many local causal models, LCMs) → aggregation into atlas_nodes / atlas_edges / atlas_edge_support → materialized Parquet tables → SQL queries.
  • Core schema:
    • atlas_nodes: canonicalized concept representations with deg_in/deg_out.
    • atlas_edges: directed causal relations with rel_type, polarity, support_lcms, support_docs, score_sum/mean/max.
    • atlas_edge_support: edge provenance (doc_id, lcm_instance_id, score_raw, coupling).
    • derived: SCCs (causal modules), aggregated statistics, path/counterfactual views.
  • Queryability: Standard SQL expresses backbone extraction (top edges by score_sum), causal hubs (nodes with largest outgoing score mass), local mechanism exploration, provenance auditing, cycle detection, and intervention experiments (e.g., do-cut implemented by view that removes edges).
  • Uncertainty & disagreement: Supported explicitly via support counts and aggregated credibility metrics; score_max vs score_mean can flag fragile/contested claims.
  • Structural findings (empirical properties): heavy-tailed distribution of support/score mass, concentration of influence in a small set of hubs, mix of relation types (CAUSES/INFLUENCES/INCREASES/REDUCES), and presence of strongly connected components (feedback).
  • Scalability: Demonstrated by ingesting the TCC economics dataset (265,656 claim instances, 45,319 papers), enabling corpus-level and longitudinal SQL queries.
  • Differentiation: Unlike RAG or fixed-ontology IE pipelines, Csql induces schema from language, preserves provenance and score aggregation, and supports compositional causal queries deterministically (no prompt-time generation required).

Data & Methods

  • Source artifacts:
    • Primary LLM-driven component: Democritus (generates thousands of local causal DAG models per document, expands topics via LLM to a discourse manifold).
    • LLMs used include contemporary models (OpenAI, Anthropic, Mistral, etc.) as discourse compilers.
    • The TCC dataset (economics papers / claims) used for large-scale ingestion.
  • Aggregation & scoring:
    • Each discovered causal generator (edge) aggregates support across LCMs and documents into support_lcms and support_docs.
    • Credibility metrics: score_raw per LCM, coupling (model-specific), and aggregated score_sum, score_mean, score_max per edge.
  • Relational materialization:
    • Tables materialized to Parquet and queried via standard analytical engines (DuckDB demonstrated).
    • Derived tables include SCCs and other graph-derived summaries.
  • Query examples / operations:
    • Backbone extraction: ORDER BY e.score_sum DESC to surface highly supported relations.
    • Hub detection: GROUP BY src node and SUM(e.score_sum) to rank outgoing mass.
    • Provenance: SELECT from atlas_edge_support to list contributing documents and LCMs.
    • Counterfactual / intervention: SQL view rewriting (e.g., delete or mask outgoing edges from a node to simulate a hard intervention).
  • Theoretical underpinnings:
    • Uses ideas from categorical causality and geometric deep learning to structure and evaluate causal claims; Democritus provides plausibility scoring and ranking.
  • Implementation notes:
    • Schema induced from discourse (no hand-designed ontology required).
    • Deterministic SQL queries vs neural/inference-time generation; enables auditability and reproducibility.

Implications for AI Economics

  • Automated meta-analysis and literature mapping:
    • Rapidly build causal atlases of economic literatures (e.g., policy effects, mechanisms in macro/micro topics) to identify dominant causal claims, hubs (central mechanisms), and under-studied links.
    • Support large-scale, reproducible literature syntheses and longitudinal trend analysis (methods, claims, consensus shifts) using standard SQL.
  • Evidence aggregation and disagreement detection:
    • Quantify where economics literature converges or diverges on causal claims via support_lcms, score_sum, and score_mean vs score_max metrics—useful for assessing robustness and evidentiary gaps.
  • Methodology tracking and heterogeneity:
    • Track reported method strings (the TCC ingestion example shows 1,575 method strings) over time to study methodological evolution, replication patterns, and methodological heterogeneity across claimed causal findings.
  • Policy & decision support:
    • Build queryable corpora to retrieve not just associative statements but assembled causal pathways relevant to policy questions; provenance makes policy arguments auditable.
  • Research prioritization and discovery:
    • Identify high-impact causal hubs or weakly supported but potentially important causal links for targeted empirical testing, replication, or data collection efforts.
  • Training and evaluation resources for causal AI:
    • The CDB outputs (edges with provenance and scores) could seed datasets for training/evaluating causal relation extraction, causal reasoning models, or meta-analytic automation in economics.
  • Integration opportunities and limits:
    • Integration with empirical datasets: Csql is best for hypothesis discovery and corpus-level causal mapping; combining Csql-derived causal structure with numerical data and identification strategies (IVs, RD, experiments) is required to move from discourse claims to identified causal estimates.
    • Cautions: outputs depend on the quality of LLM-generated LCMs and source corpora—risks include hallucination, selection/corpus bias, semantic conflation of concepts, and induced-schema variability. Csql preserves provenance and scores to help audit these issues, but human validation and empirical testing remain necessary.
  • Practical suggestions for economists:
    • Use Csql to perform systematic causal scans of subfields (e.g., education returns, minimum wage effects), then prioritize edges for formal empirical identification.
    • Leverage provenance tables to build targeted replication packages, meta-regressions, or systematic reviews by filtering edges by support_docs, score thresholds, and method strings.
    • Combine Csql atlas outputs with citation and data repositories to construct richer causal-evidence networks that link claims → data → identification method → estimates.

Short takeaway: Csql offers a reproducible, SQL-native way to turn text corpora into causally structured, auditable databases—highly promising for large-scale evidence synthesis, meta-research, and hypothesis generation in economics, but best used as a complement to (not a substitute for) empirical identification and domain validation.

Assessment

Paper Typedescriptive Evidence Strengthlow — The system aggregates and structures claimed causal relationships from documents but does not itself establish causal identification or validate claims against external quasi-experimental variation; conclusions therefore reflect the quality and veracity of source claims rather than independently identified causal effects. Methods Rigormedium — The paper presents a novel, well-engineered pipeline (building on prior DEMOCRITUS work) and demonstrates scale by compiling the large TCC corpus with extensive metadata, but it appears to lack rigorous external validation of extraction accuracy, measurement error quantification, and systematic evaluation of how compiled claims map to true causal relationships. SampleSystem demonstrations on single-document case studies plus large-scale ingestion of the Testing Causal Claims (TCC) dataset: 265,656 claim instances from 45,319 papers spanning 44 years and 1,575 reported method strings; pipeline also supports ingesting RAG/IE-compiled causal corpora across domains. Themesinnovation adoption IdentificationNo new causal identification from exogenous variation; CSQL extracts authors' reported causal claims and local causal models from text (causal language, dependency relations, and method metadata) and compiles them into a queryable causal database, relying on the source documents' asserted identification and reported methods rather than applying independent econometric identification strategies. GeneralizabilityDepends on the quality and honesty of source documents (publication bias, selective reporting)., Extraction accuracy may vary by domain, language, and writing style (likely focused on English academic texts)., Compiles asserted causal claims rather than verified causal effects, so results may not generalize to true causal relationships., Method-string heterogeneity and inconsistent reporting standards across papers limits comparability., Performance on non-academic or noisy web text is uncertain.

Claims (8)

ClaimDirectionOutcomeConfidence & EvidenceDetails
CSQL automatically converts a collection of unstructured text documents into an SQL-queryable causal database (CDB). Other positive ability to convert unstructured text documents into an SQL-queryable causal database
Reading fidelity high
Study strength medium
not reported
0.18
A causal database (CDB) differs from a traditional database by being designed to answer 'why' questions via causal interventions and structured causal queries. Other positive capability to answer causal (why) questions via interventions and structured causal queries
Reading fidelity high
Study strength speculative
not reported
0.03
CSQL builds on the earlier system DEMOCRITUS, which converts documents into thousands of local causal models derived from causal discourse. Other positive conversion of documents into many local causal models
Reading fidelity high
Study strength medium
not reported
0.18
Unlike RAG-based systems or knowledge-graph based approaches, CSQL supports causal analysis over document collections rather than purely associative retrieval. Other positive support for causal analysis across document collections versus associative retrieval
Reading fidelity medium
Study strength medium
not reported
0.11
CSQL enables queries such as 'What are the strongest causal influences on bipedalism?' or 'Which variables act as causal hubs with the largest downstream influence?' on articles (single-document case studies). Other positive ability to answer domain-specific causal queries on single documents
Reading fidelity high
Study strength medium
not reported
0.18
CSQL can ingest RAG/IE-compiled causal corpora at scale by compiling the Testing Causal Claims (TCC) dataset of economics papers into a causal database containing 265,656 claim instances spanning 45,319 papers, 44 years, and 1,575 reported method strings. Research Productivity positive scale of ingestion (number of claim instances and coverage across papers/years/method strings)
Reading fidelity high
Study strength high
n=265656
265,656 claim instances spanning 45,319 papers, 44 years, and 1,575 reported method strings
0.3
CSQL enables corpus-level causal queries and longitudinal analyses when applied to large compiled causal corpora like TCC. Research Productivity positive ability to perform corpus-level causal queries and longitudinal analyses
Reading fidelity high
Study strength medium
not reported
0.18
Viewed abstractly, CSQL functions as a compiler from unstructured documents into a causal database equipped with a principled algebra of queries and can be applied broadly across many domains (business, humanities, science). Other positive generalizability and role as a compiler for causal queries across domains
Reading fidelity medium
Study strength speculative
not reported
0.02

Notes