Package: Gtheory4LLM 0.5.0

Gtheory4LLM: Generalizability Theory for LLM Subjective Tasks

Studies the reliability and generalizability of subjective judgments produced by large language models (LLMs), including annotation, rating, and structured LLM-as-a-judge tasks. Specifies evaluator, prompt, generation, and repeated-run facets through crossed or explicitly nested random sources with configurable item interactions. Fits univariate models, joint Gaussian models, and joint discrete models for binary, ordinal, and unordered categorical outcomes, with source-specific covariance. Gaussian models use exact balanced likelihood; discrete models use a dense first-order Laplace approximation with Gaussian latent random effects. Supported balanced decision studies compare evaluator, prompt, and replication allocations using observed Gaussian or explicitly requested latent binary and ordinal reliability, with random or fixed facets after Brennan (2001). Gaussian fits report asymptotic Wald standard errors for their variance components and delta-method intervals for the coefficients; discrete fits report point estimates only. Provides fixed-layout Gaussian batch projections, bounded cost-aware allocation comparisons, and Gaussian simulation-based pilot precision planning. Scalar nominal reliability and joint Gaussian-discrete fitting are not implemented. Includes three publicly archived LLM annotation datasets covering hate-speech, mental-health, and drug-review tasks. Discrete fitting is limited to small models; the preflight report describes supported designs and computational limits. Generalizability coefficients follow the variance-decomposition framework of Brennan (2001) <doi:10.1007/978-1-4757-3456-0>.

Authors:Jin Liu [aut, cre, cph]

Gtheory4LLM_0.5.0.tar.gz
Gtheory4LLM_0.5.0.zip(r-4.7-any)Gtheory4LLM_0.5.0.zip(r-4.6-any)Gtheory4LLM_0.5.0.zip(r-4.5-any)
Gtheory4LLM_0.5.0.tgz(r-4.6-any)Gtheory4LLM_0.5.0.tgz(r-4.5-any)
Gtheory4LLM_0.5.0.tar.gz(r-4.7-any)Gtheory4LLM_0.5.0.tar.gz(r-4.6-any)
Gtheory4LLM_0.5.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
Gtheory4LLM/json (API)

# Install 'Gtheory4LLM' in R:
install.packages('Gtheory4LLM', repos = c('https://veronica0206.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/veronica0206/gtheory4llm/issues

On CRAN:

Conda:

4.70 score 141 downloads 21 exports 15 dependencies

Last updated from:e45cfa40da. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK237
source / vignettesOK241
linux-releaseOK302
macos-releaseOK299
macos-oldrelOK240
windows-develOK325
windows-releaseOK217
windows-oldrelOK333
wasm-releaseOK112

Exports:gt_batchgt_batch_dstudygt_batch_reliabilitygt_component_vcovgt_componentsgt_controlgt_designgt_diagnosticsgt_dstudygt_dstudy_targetgt_examplegt_export_reportgt_familygt_fitgt_pilot_plangt_plangt_preflightgt_reliabilitygt_reportgt_scoregt_simulate

Dependencies:BHclidigestlatticelifecycleMASSMatrixmvtnormOpenMxRcppRcppEigenRcppParallelrlangrpfStanHeaders

Plan annotation effort, costs, and pilot precision
Fit a small Gaussian pilot | Compare costs within a declared allocation grid | Make the batch target explicit | Examine pilot precision for one final protocol

Last update: 2026-10-09
Started: 2026-10-09

How many evaluators, prompts, and runs?
1. Define the quantity and the sampling design | 2. Inspect feasibility before fitting | 3. Fit and inspect acceptance | 4. Compute relative and absolute reliability | 5. Compare measurement budgets | 6. Save a portable analysis report | 7. Fixed facets | 8. Match other outcomes to their observation model | Where to read next

Last update: 2026-10-04
Started: 2026-09-13

Readme and manuals

Help Manual

Help pageTopics
Generalizability Theory for LLM Subjective TasksGtheory4LLM-package Gtheory4LLM
Declare That Items Were Annotated Several to a Callgt_batch
Compare Supplied Allocations for a Fixed Gaussian Batch Layoutas.data.frame.gt_batch_dstudy gt_batch_dstudy print.gt_batch_dstudy
Project Gaussian Score Error Conditional on a Fixed Batch Layoutas.data.frame.gt_batch_reliability gt_batch_reliability print.gt_batch_reliability
Extract Source Covariances or Correlationsgt_components
Configure Gaussian and Discrete Fitting and Acceptance Checksgt_control
Declare a Generalizability-Theory Random-Source Designgt_design
Inspect Numerical Acceptance and Backend Diagnosticsgt_diagnostics print.gt_diagnostics print.gt_diagnostic_stage print.gt_diagnostic_stages
Evaluate Balanced Measurement Allocationsas.data.frame.gt_dstudy gt_dstudy gt_dstudy_target plot.gt_dstudy print.gt_dstudy
Load Modeling Tables from Three LLM-Annotated Datasetsgt_example
Specify a Gaussian, Binary, Ordinal, or Unordered Categorical Outcomegt_family
Fit Univariate or Joint Multivariate Generalizability Modelsgt_fit print.gt_fit summary.gt_fit
Standard Extractors for Fitted Generalizability Modelscoef.gt_fit gt_component_vcov gt_fit_methods logLik.gt_fit nobs.gt_fit vcov.gt_fit
Evaluate Pilot Precision under a Gaussian Parameter Scenariogt_pilot_plan
Rank a Bounded Set of D-Study Allocations by User-Supplied Costas.data.frame.gt_plan gt_plan print.gt_plan
Inspect Data, Source Dimensions, and Backend Limits Before Fittinggt_preflight plot.gt_preflight print.gt_preflight
Compute Balanced G and Phi Coefficientsas.data.frame.gt_reliability gt_reliability print.gt_reliability
Create and Export a Portable Aggregate Analysis Reportgt_export_report gt_report print.gt_report
Declare Composite-Score Weightsgt_score
Simulate a New Balanced Gaussian Annotation Panelgt_simulate
Three LLM Annotation Datasets: Design, Coding, and SourcesGtheory4LLM-datasets gtheory_datasets
LLM Drug-Review Sentiment and Four Aspect Annotationsdrug_review drug_review_4aspect gtheory_drug_review
LLM Hate-Speech Annotations of HateXplain Textsgtheory_hate_speech hate_speech
LLM Mental-Health Text Annotations in Five Outcome Setsgtheory_mental_health mental_health_3group mental_health_3L mental_health_6flag mental_health_7L mental_health_nominal
Plot Reliability Coefficients and Available Intervalsplot.gt_reliability
Print a Concise Generalizability Model Summaryprint.summary.gt_fit