Computational · Paper · 2026

Template Madlib: Deterministic Token Injection for Conditional IMRAD Manuscripts

Daniel Ari Friedman

Zenodo

Download PDF Publication source Paper folder on GitHub Read extracted text

Overview

This exemplar asks whether a reviewable pipeline can hydrate a complete IMRAD manuscript from configuration-owned lexical data while preserving an audit trail that remains readable before and after rendering. The project deliberately keeps playful Mad Lib mechanics inside a serious reproducibility contract: the manuscript shell names large placeholders, the config declares allowable language, and the source code decides what text is emitted.

The committed seed is 431 and the current schema expands 22 slot rule(s) into 40 token choice(s) across 10 lexicon categories. The configured narrative moves are state the manuscript-generation problem, name the deterministic intervention, and summarize the audit surface. The central hypothesis is: Deterministic lexical injection can generate a complete conditional IMRAD manuscript while preserving token provenance, section intent, and audit-ready method evidence.

The result is not a claim that lexical substitution creates scholarship. It is a worked template for conditional manuscript assembly: section enablement, token provenance, figure registration, and unresolved-placeholder checks all become inspectable artifacts before the shared renderer produces PDF, HTML, and slides.

---
Associated artifacts
GitHub release: v0.1.1 (https://github.com/docxology/template_madlib/releases/tag/v0.1.1)
DOI: https://doi.org/10.5281/zenodo.20786638
Zenodo: https://zenodo.org/records/20786638
PDF SHA-256: d9248f4f372fc3baf21cbf5cc5cdb7daffe0e22e62ac6fa2e3a697a26f3308b6

madlib generationtoken injectionconditional manuscriptsreproducible researchIMRAD

Overview source: Curated paper metadata.

Methods and contributions

Read the source for the full argument, qualifications, and evidence.

Findings and contributions

  • With seed 431, the schema expands 22 slot rules into 40 token choices across 10 lexicon categories.
  • The generated plan enabled all 11 manuscript sections and filled 40 token choices, each traced to its variable, category, section and config pointer.
  • Re-running generation with seed 431 and the same lexicon produces the same token plan.
  • The author frames the main result as traceability surviving a complete render path, not any particular word choice.
  • The paper explicitly does not claim lexical replacement creates scholarship; it shows a conditional text generator can be made accountable to config, tests and validation.

Methods

  • Seeded SHA-256 digest selection of lexicon tokens per slot — Each slot hashes the seed, slot name, category, ordinal and full category list; the digest indexes the configured lexicon category.
  • YAML config-owned lexicon, slots, and section conditions — Lexicon categories, slots, section switches, method rows and claims are declared in YAML; source code turns them into manuscript bodies.
  • Staged pipeline from config validation to hydrated Markdown — Validates the madlib block, builds a TokenPlan and section bodies, writes artifact JSON and a figure registry, then hydrates Markdown.
  • Explicit vs. loader-default config field-origin inventory — Classifies configuration paths as explicitly set in YAML or inherited from loader defaults and reports them as method evidence.
  • Project tests and shared output validator — Tests check determinism, seed and category sensitivity, malformed configs, section disablement and unresolved tokens; a validator checks rendered outputs.

Summary sources: Paper metadata and evidence · Extracted source text.

Document downloads

PDFs are hosted here; supporting sources may use pinned archives.

These files may be different versions or companion documents. The archive does not identify a latest edition.

Citation

Citation metadata follows the unified bibliography.

Friedman, Daniel Ari. 2026. Template Madlib: Deterministic Token Injection for Conditional IMRAD Manuscripts. Zenodo. DOI: 10.5281/zenodo.20786638. URL: https://doi.org/10.5281/zenodo.20786638.
Download bibliography Add to reading list Explore connections

Catalog details and resources

Catalog row172
Citation keyFriedman2026TemplateMadlibDeterministicToken172
Platform availability

Related works

Ranked by recorded methods, topics, contributors and associated software, with contributor roles and domain-only matches labelled. Metadata overlap is not a citation or a scientific equivalence.

View all Computational works, software & media →