diff --git a/NEWS.md b/NEWS.md index 3b4df89e..83f80d37 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,7 +8,7 @@ Bug fixes New features -* `report_ai()`: add support for `glm`, `merMod` (lme4), and `glmmTMB` model classes. +* `report_ai()`: add support for `glm`, `merMod` (`lme4`), and `glmmTMB` model classes. * `report_ai()`: `## Model` section now includes a CI / degrees-of-freedom estimation line (e.g., `Inference: 95% CI [Satterthwaite df]`) when the information is available from `parameters::model_parameters()`. diff --git a/README.Rmd b/README.Rmd index 66712a92..9b487e15 100644 --- a/README.Rmd +++ b/README.Rmd @@ -29,7 +29,7 @@ library(report) [![r-universe](https://easystats.r-universe.dev/badges/report)](https://easystats.r-universe.dev/report) [![downloads](http://cranlogs.r-pkg.org/badges/report)](https://cran.r-project.org/package=report) [![total](https://cranlogs.r-pkg.org/badges/grand-total/report)](https://cranlogs.r-pkg.org/) -[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report/stargazers) +[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report) ***"From R to your manuscript"*** diff --git a/README.md b/README.md index 873205a4..71e5497c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![r-universe](https://easystats.r-universe.dev/badges/report)](https://easystats.r-universe.dev/report) [![downloads](http://cranlogs.r-pkg.org/badges/report)](https://cran.r-project.org/package=report) [![total](https://cranlogs.r-pkg.org/badges/grand-total/report)](https://cranlogs.r-pkg.org/) -[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report/stargazers) +[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report) ***“From R to your manuscript”*** diff --git a/inst/WORDLIST b/inst/WORDLIST index f0121b7d..55618a08 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -9,6 +9,8 @@ ENP Gabry Hotfix IC +LLM +LLMs Magnusson Mattan Newcombe @@ -32,9 +34,11 @@ glmmTMB htest ivreg participants’ +pre rstanarm sIgnificance setosa +suboptimal tidyverse unarchive versicolor diff --git a/man/report.Rd b/man/report.Rd index 181175af..f95cc5b6 100644 --- a/man/report.Rd +++ b/man/report.Rd @@ -13,10 +13,15 @@ objects above).} \item{...}{Arguments passed to or from other methods.} \item{audience}{The intended audience for the report. \code{"humans"} (default) -produces the standard formatted text report. \code{"ai"} produces a compact, -structured output optimised for consumption by a Large Language Model (LLM) -or AI agent via \code{\link[=report_ai]{report_ai()}}. The default can be changed globally with -\code{options(report_audience = "ai")}.} +produces the standard narrative text report. \code{"ai"} produces a compact, +structured Markdown output designed for consumption by a Large Language +Model (LLM) or AI agent. It strikes a careful balance between +comprehensiveness, specificity, and compactness, giving the model the +clearest and most relevant analytical information at the lowest possible +token cost. The output is a single character vector of class \code{report_ai} +that can be pasted directly into a chat window or fed to an LLM API. +The default can be changed globally with \code{options(report_audience = "ai")}. +See \code{vignette("report_ai", package = "report")} for details and examples.} } \value{ A list-object of class \code{report}, which contains further diff --git a/tests/testthat/test-report_intercept.R b/tests/testthat/test-report_intercept.R index aefee02b..55f646ed 100644 --- a/tests/testthat/test-report_intercept.R +++ b/tests/testthat/test-report_intercept.R @@ -52,7 +52,7 @@ test_that("reflevel", { # Logical predictor on.exit(data("mtcars"), add = TRUE) - + mtcars$more_than_4_cyl <- as.logical(mtcars$cyl > 4) m4 <- lm(mpg ~ more_than_4_cyl, data = mtcars) expect_identical( diff --git a/vignettes/report_ai.Rmd b/vignettes/report_ai.Rmd index 7d0bc108..8f1f4206 100644 --- a/vignettes/report_ai.Rmd +++ b/vignettes/report_ai.Rmd @@ -33,7 +33,7 @@ The **report** package was originally designed in a pre-AI era with one overarch However, the analytical landscape has fundamentally changed. Today, researchers increasingly rely on AI agents and Large Language Models (LLMs) to help interpret results, summarize findings, and draft manuscripts, often by simply **pasting raw outputs directly into a chat window**. This shift prompted us to ask: should the scope of the *report* package be expanded to **support** this new workflow, rather than pretending it doesn't exist? And it wasn't even a matter of staying relevant, it was a matter of empowering our users to get the best possible results from their new AI assistants. -While our standard narrative outputs are excellent for humans, they are remarkably suboptimal for AI: verbose prose forces an LLM to waste valuable context tokens re-parsing implicit structures, wasting tokens and context memory. The answer to this challenge is `report_ai()`, a function that can be triggered via an argument from the main `report()` function. By stripping away the narrative bloat in favour of highly structured, token-efficient formats, `report_ai()` bridges the gap between R and the context window, giving your AI assistant exactly the information it needs in the most effective way possible. +While our standard narrative outputs are excellent for humans, they are remarkably suboptimal for AI: verbose prose forces an LLM to waste valuable context tokens re-parsing implicit structures, wasting tokens and context memory. The answer to this challenge is `report_ai()`, a function that can be triggered via an argument from the main `report()` function. By stripping away the narrative bloat in favor of highly structured, token-efficient formats, `report_ai()` bridges the gap between R and the context window, giving your AI assistant exactly the information it needs in the most effective way possible. ## Basic Usage