CoChat

Nested Human-in-the-Loop AI: A Chain of Code Prompting Framework for Research Tool Development with GenAI

Open access
Atkinson, Cameron Frederick · 2025 · Discover Artificial Intelligence

Preprint — published as 10.1007/s44163-025-00704-z

The DOI matches its Crossref record; 74 of the 74 references it cites were found in a registry or an index.

Abstract

This article presents a novel, nested approach to Human-in-the-Loop (HITL) Artificial Intelligence (AI), utilising Chain of Code (CoC) prompting to iteratively develop AI-assisted research tools. Focusing on Generative AI (GenAI) systems such as ChatGPT-4o, this article explores how nested HITL structures—where expert feedback is integrated at each developmental layer—can drive AI outputs to meet domain-specific needs. Through a case study involving a grey literature retrieval tool, this article illustrates how this approach enables researchers to progressively refine AI-generated code with modular CoC prompts. Each prompt chain is nested, meaning that outputs from one level serve as inputs to the next, with structured expert feedback guiding refinements at each stage. This tool leverages ChatGPT-4o to generate modular Python scripts for retrieving, filtering, and organising grey literature from targeted Australian government domains. The nested HITL structure allows GenAI to be continuously aligned with expert-driven goals, resulting in a highly adaptable, transparent, and deterministic research tool. Findings underscore the broader applicability of nested HITL frameworks for complex AI-assisted coding tasks, showing how each iterative layer builds upon previous cycles to ensure increasingly precise alignment with researcher requirements. This approach suggests a practical model for AI-human collaboration in research, establishing HITL not only as a method for oversight but as a transformative architecture for guiding GenAI outputs through nested, expert-informed feedback loops.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.21203/rs.3.rs-5702366/v1

Cites

74 of 74 references verified0 citation errors · 0 not checkable

Statistics

Figures

Image 1
CC-BY · From the PDF
Image 2
CC-BY · From the PDF
Image 3
CC-BY · From the PDF

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 74 references

Research works printed but not linked: 3

  1. Vaswani A. Attention is all you need. 31st Conference on Neural Information Processing Systems; United States of America, California2017. p. 11.
  2. Yetiştiren B, Özsoy I, Ayerdem M, Tüzün E. Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT. (2023). arXiv preprint arXiv:230410778. http://doi.org10.48550/arXiv.2304.10778.
  3. Banks M. Blog posts and tweets: the next frontier for grey literature. (2012). The Grey Journal, 8(1). 54 – 9. Available from: http://eprints.rclis.org/15411/9/5%2014%20Banks.pdf.

Cited by

See all 5

Metadata

Authors
Atkinson, C. F.
Affiliations
University of Tasmania (AU)
Corresponding author
Atkinson, Cameron Frederick
Venue
Discover Artificial Intelligence
Published
2025-08-27
Volume
6
Issue
1
ISSN
2731-0809 (ISSN-L)
OpenAlex
W7117162056
Cited by
3
References
71
Citations by year
2026: 3
FWCI
1.21
Type
journal article
Language
en
Open access
Locations
  • Discover Artificial Intelligence (publishedVersion, cc-by)
  • Research Square (acceptedVersion, cc-by)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
Funders
University of Tasmania
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Artificial Intelligence Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Ethics and Social Impacts of AI
  • Social Sciences › General Social Sciences › Computational and Text Analysis Methods
Keywords
human-in-the-loop AI, generative AI, GPT-4o, expert feedback, human-AI collaboration, government documents

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Nested Human-in-the-Loop AI: A Chain of Code Prompting Framework for Research Tool Development with GenAI. https://app.cochat.ai/papers/10.21203/rs.3.rs-5702366/v1
The paper
Atkinson, C. F. (2025). Nested Human-in-the-Loop AI: A Chain of Code Prompting Framework for Research Tool Development with GenAI. Discover Artificial Intelligence. https://doi.org/10.21203/rs.3.rs-5702366/v1

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.