| Title: | Declared Use of Artificial Intelligence in Research Publications and Policies |
|---|---|
| Description: | Studies how the use of artificial intelligence in research is declared and governed. Detects artificial intelligence use disclosure statements in article full texts, with the tools named, the purposes declared, declared non-use and statements of human oversight; codes journal and institutional artificial intelligence policies on a documented codebook (authorship, disclosure, permitted uses, images, peer review, responsibility); and summarises disclosure rates across a corpus with confidence intervals. Rules are explicit and versioned, and every result carries the sentence that supports it. Only declared use is measured: the package does not try to infer authorship by artificial intelligence from text, which automated detectors cannot establish. |
| Authors: | Pablo Sánchez-Núñez [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-7845-9506>) |
| Maintainer: | Pablo Sánchez-Núñez <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-11-24 02:40:42 UTC |
| Source: | https://github.com/cran/AIRes |
Reads the text of each policy and records, for every dimension of
air_policy_codebook(), whether the policy addresses it ("stated", with
the sentence as evidence) or not ("not_stated"). "not_stated" means the
text does not say it, not that the policy allows or forbids it. A missing
text gives "unverifiable".
air_code_policy(text, id = NULL, codebook = air_policy_codebook())air_code_policy(text, id = NULL, codebook = air_policy_codebook())
text |
A character vector of policy texts. |
id |
Identifiers, one per policy (for example journal or institution names). |
codebook |
The codebook; by default |
Automatic coding is a first pass: the rules recognise common wordings, and
a published analysis should have a person check the evidence of each
"stated" and a sample of "not_stated" (see the evidence columns).
A data frame in long format with one row per policy and dimension:
id, codebook_version, dimension, group, value, evidence.
coded <- air_code_policy(c( paste("AI tools cannot be listed as authors.", "Authors must disclose the use of AI in the methods section."), "Reviewers must not upload manuscripts to AI tools, as this may breach confidentiality." ), id = c("Journal A", "Journal B")) coded[coded$value == "stated", c("id", "dimension")]coded <- air_code_policy(c( paste("AI tools cannot be listed as authors.", "Authors must disclose the use of AI in the methods section."), "Reviewers must not upload manuscripts to AI tools, as this may breach confidentiality." ), id = c("Journal A", "Journal B")) coded[coded$value == "stated", c("id", "dimension")]
Turns the long output of air_code_policy() into a matrix with one row per
dimension and one column per policy, and adds how many policies address
each dimension. Policies that could not be read are left out of the count.
air_compare_policies(coded)air_compare_policies(coded)
coded |
A data frame from |
A data frame: dimension, group, one column per policy with its
value, and n_stated and n_readable.
coded <- air_code_policy(c( "AI tools cannot be listed as authors. Authors remain fully responsible for the content.", "Authors must disclose any use of generative AI. Authors are accountable for the work." ), id = c("A", "B")) air_compare_policies(coded)coded <- air_code_policy(c( "AI tools cannot be listed as authors. Authors remain fully responsible for the content.", "Authors must disclose any use of generative AI. Authors are accountable for the work." ), id = c("A", "B")) air_compare_policies(coded)
Applies explicit, versioned rules (version 1.0.0) to each text and reports:
air_detect_disclosure( text, id = NULL, tools = air_tools(), purposes = air_purposes() )air_detect_disclosure( text, id = NULL, tools = air_tools(), purposes = air_purposes() )
text |
A character vector of full texts; |
id |
Optional identifiers, one per text. |
tools, purposes
|
Dictionaries; by default |
ai_mentioned: the text mentions AI at all (in any sense, including AI
as a research topic);
disclosure_statement: there is a statement about AI use in preparing
the work: a heading such as "Declaration of generative AI...", a
declaration of use, or a declaration of non-use;
use_declared: the authors declare having used a generative AI tool,
naming it or its purpose;
non_use_declared: the authors declare that no AI was used;
oversight_stated: the authors state that they reviewed the output or
take responsibility for it;
tools, purposes: the tools named and purposes declared in the
statement (see air_tools() and air_purposes());
evidence: the sentences that support the result.
Values are "yes", "no" or "unverifiable" (no text). "no" means no
such statement was found in the text, not that AI was or was not used.
Every row has ai_use_basis = "declared". English and Spanish are
recognised.
Known limitation: articles whose subject is generative AI ("we used ChatGPT to generate the stimuli of the experiment") can be read as a declaration of use; check the evidence column in such corpora.
A data frame with one row per text.
air_detect_disclosure(c( paste("Declaration of generative AI in the writing process.", "During the preparation of this work the authors used ChatGPT to improve readability.", "After using this tool, the authors reviewed and edited the content", "and take full responsibility for the publication."), "No AI tools were used in the preparation of this manuscript.", "We measured soil nitrogen in 40 plots.", NA ), id = c("a", "b", "c", "d"))air_detect_disclosure(c( paste("Declaration of generative AI in the writing process.", "During the preparation of this work the authors used ChatGPT to improve readability.", "After using this tool, the authors reviewed and edited the content", "and take full responsibility for the publication."), "No AI tools were used in the preparation of this manuscript.", "We measured soil nitrogen in 40 plots.", NA ), id = c("a", "b", "c", "d"))
The ten dimensions on which air_code_policy() codes journal, publisher,
funder or institutional AI policies, grouped as authorship, disclosure,
permitted uses, peer review and responsibility. Each dimension has a
question and the regular expression that recognises it. The codebook is
versioned (1.0.0); a changed rule is a new version.
air_policy_codebook()air_policy_codebook()
A data frame with columns id, group, question and pattern.
air_policy_codebook()[, c("id", "group")]air_policy_codebook()[, c("id", "group")]
Computes, overall or by group (for example journal, field or year), the share of articles with each indicator among the articles whose text could be read, with Wilson confidence intervals, and the number of articles that could not be read. Unverifiable articles never enter the denominator.
air_summarise(detections, group = NULL, conf = 0.95)air_summarise(detections, group = NULL, conf = 0.95)
detections |
A data frame from |
group |
Optional vector, one value per row of |
conf |
Confidence level. |
A data frame with one row per group and indicator: group,
indicator, n_readable, n_unverifiable, n_yes, share, lower,
upper.
d <- air_detect_disclosure(c( "Declaration of AI use. We used ChatGPT to translate the abstract.", "No generative AI was used in this work.", "We sampled 12 rivers.", NA)) air_summarise(d) air_summarise(d, group = c("J1", "J1", "J2", "J2"))d <- air_detect_disclosure(c( "Declaration of AI use. We used ChatGPT to translate the abstract.", "No generative AI was used in this work.", "We sampled 12 rivers.", NA)) air_summarise(d) air_summarise(d, group = c("J1", "J1", "J2", "J2"))
The tools and purposes that air_detect_disclosure() recognises, each with
its regular expression (Perl syntax, case-insensitive). Pass an extended
copy to air_detect_disclosure() to recognise more.
air_tools() air_purposes()air_tools() air_purposes()
A data frame: tool, pattern, category for tools; id,
label, pattern for purposes.
air_tools()[, c("tool", "category")] air_purposes()[, c("id", "label")]air_tools()[, c("tool", "category")] air_purposes()[, c("id", "label")]