0 cumulative citations
View corpus contextA 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.
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
Claims (8)
| Claim | Direction | Outcome | Confidence & Evidence | Details |
|---|---|---|---|---|
| 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
|
| 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
|
| 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
|
| 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
|
| 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
|
| 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
|
| 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
|
| 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
|