AI for Causal Inference

AI
LLMs
Causal Inference
Lecture Notes

This course treats AI as an assistant to the causal analyst. LLMs, RAG systems, agents, and automation can help with ideation, documentation, critique, code scaffolding, literature synthesis, diagnostics, and reporting. Identification judgment remains the analyst’s responsibility.

By the end, a reader should be able to run and compare local models, use structured outputs, build RAG support for assumptions, automate diagnostic work, design causal-analysis agents, and evaluate where AI outputs are brittle, incomplete, or misleading.

The live parts of the course are designed for a local GPU workstation rather than a hosted API. The notebooks use Hugging Face Transformers for direct model loading, with Qwen/Qwen2.5-0.5B-Instruct as a smoke test, Qwen/Qwen2.5-7B-Instruct as the working default, Qwen/Qwen2.5-14B-Instruct and Qwen/Qwen2.5-32B-Instruct for scale comparisons, and Phi, Mistral, Gemma, and Llama models as family comparisons. A high-memory GPU, roughly 48 GB to 96 GB of VRAM, makes the larger comparisons practical. Smaller machines can still run the smoke-test and 7B workflows, or use quantized models. The technical design separates causal prompts, structured-output parsing, retrieval indices, evaluation rubrics, and model execution, so the same exercises can run through direct Transformers loading or through a local serving layer such as Ollama, llama.cpp, or vLLM when a persistent model server is preferred.

Rubric heatmap evaluating good and bad AI-generated causal outputs

Figure: An evaluation rubric heatmap for AI-generated causal outputs, emphasizing auditability over novelty (adapted from Lecture 22: Evaluating AI Outputs in Causal Workflows).

Lecture Sequence

01. AI-Assisted Causal Workflow

This lecture develops AI-Assisted Causal Workflow with examples that make assumptions, diagnostics, and interpretation visible.

02. LLM Basics for Causal Analysts

This lecture uses LLM Basics for Causal Analysts to clarify the analyst’s question, evidence, assumptions, and decision implications.

09. Dataset Profiling with AI

This lecture develops Dataset Profiling with AI with examples that make assumptions, diagnostics, and interpretation visible.

16. AI for Sensitivity Analysis

This lecture connects AI for Sensitivity Analysis to structured prompting, evaluation, and clearer causal judgment under uncertainty.

18. AI for Quasi-Experiment Design

This lecture uses AI for Quasi-Experiment Design to clarify the analyst’s question, evidence, assumptions, and decision implications.

20. Causal Analysis Agent

This lecture frames Causal Analysis Agent as a decision problem and asks what evidence can be trusted, challenged, and communicated.