report was made in a time where AI didn't exist, and it was useful to translate software output into Human text that can be reported. And this goal is still valid today for reproducible documents, deterministic output etc.;
But arguably a lot of the interpretation/explanation part of models will be offloaded to LLMs: user copy pasta code and output and LLM generates explanation and interpretation.
So this morning I had a shower thought: what if we supported that process? By widening report's aim as reporting for Humans, but also to LLMs?
It could be relatively straightforward, we could implement a report_llm() method that would aim at producing the most efficient and compact context to be pasted to an LLMs so that it has all the information.
E.g.,:
m <- lm(mpg ~ wt, data = mtcars)
report_llm(m)
# Model
# --------
- Function call: lm()
- Formula: mpg ~ wt
- Family: Linear
- Outcomes
- "mpg" (N=32; Mean = 0.13; SD = 45)
- Predictors
- "wt" (N=32; Mean = 5; SD = 2)
# Parameters
# -------------
- Intercept (B = X; ...)
- wt (B = X; ...)
# Performance
# --------------
- R2 = X; R2 adj. = X
- AIC = X; BIC = X
# Additional information
# -------------------------
# - CIs are computed as HDIs
# Highlights
# ------------
- Significant effects: wt, xyz
Sure, an LLM can work most of that stuff from the function call and the raw output. We could argue that there are some edge cases where it's useful, for instance if the user sets a sampler for brms as a global option, it won't show in the function call, so the LLM might miss that.
- Main use case: Generate machine-readable stats reports for an LLM. A Quarto document that contains all the stats with these LLMs report. Knit it or reprex it, attach it to Gemini and go "Write me the results section" yolo
And yes I can imagine that for many supporting this AI transition is controversial, but to be fair report was always controversial from the beginning (easystats' enfant terrible): "How DARE you have a function that deterministically parses a t-tests into sentences 😠"
Easystats in the age of AI let's goooooo 🚀
report was made in a time where AI didn't exist, and it was useful to translate software output into Human text that can be reported. And this goal is still valid today for reproducible documents, deterministic output etc.;
But arguably a lot of the interpretation/explanation part of models will be offloaded to LLMs: user copy pasta code and output and LLM generates explanation and interpretation.
So this morning I had a shower thought: what if we supported that process? By widening
report's aim as reporting for Humans, but also to LLMs?It could be relatively straightforward, we could implement a
report_llm()method that would aim at producing the most efficient and compact context to be pasted to an LLMs so that it has all the information.E.g.,:
Sure, an LLM can work most of that stuff from the function call and the raw output. We could argue that there are some edge cases where it's useful, for instance if the user sets a sampler for brms as a global option, it won't show in the function call, so the LLM might miss that.
And yes I can imagine that for many supporting this AI transition is controversial, but to be fair
reportwas always controversial from the beginning (easystats' enfant terrible): "How DARE you have a function that deterministically parses a t-tests into sentences 😠"Easystats in the age of AI let's goooooo 🚀