Nested Human-in-the-Loop AI: A Chain of Code Prompting Framework for Research Tool Development with GenAI
Open accessPreprint — 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.
Integrity signals
Registry
Cites
Statistics
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.
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?
The cited source says what the claim attributes to it.
In the citing paper
“Atkinson extended this approach through chain-of-code prompting, which integrates human validation at key points in multi-step reasoning processes [33].”
From Human-in-the-Loop Artificial Intelligence: A Systematic Review of Concepts, Methods, and Applications (2026) · cites this paper as [33]
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
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805 · Cited by 73,173
A logical calculus of the ideas immanent in nervous activity
McCulloch, W. S., & Pitts, W. (1943) · The Bulletin of Mathematical Biophysics · doi:10.1007/bf02478259 · Cited by 18,566
The perceptron: A probabilistic model for information storage and organization in the brain.
Rosenblatt, F. (1958) · Psychological Review · doi:10.1037/h0042519 · Cited by 12,280
Gray literature: An important resource in systematic reviews
Paez, A. (2017) · Journal of Evidence-Based Medicine · doi:10.1111/jebm.12266 · Cited by 1,459
A Brief Overview of ChatGPT: The History, Status Quo and Potential Future Development
Wu, T., He, S., Liu, J., Sun, S., Liu, K., Han, Q.-L., & Tang, Y. (2023) · IEEE/CAA Journal of Automatica Sinica · doi:10.1109/jas.2023.123618 · Cited by 1,452
Large Language Models for Software Engineering: A Systematic Literature Review
Hou, X., Zhao, Y., Liu, Y., Yang, Z., Wang, K., Li, L., Luo, X., Lo, D., Grundy, J., & Wang, H. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3695988 · Cited by 1,029
Godin, K., Stapleton, J., Kirkpatrick, S. I., Hanning, R. M., & Leatherdale, S. T. (2015) · Systematic Reviews · doi:10.1186/s13643-015-0125-0 · Cited by 959
The logic theory machine-A complex information processing system
Newell, A., & Simon, H. (1956) · IEEE Transactions on Information Theory · doi:10.1109/tit.1956.1056797 · Cited by 846
A survey of human-in-the-loop for machine learning
Wu, X., Xiao, L., Sun, Y., Zhang, J., Ma, T., & He, L. (2022) · Future Generation Computer Systems · doi:10.1016/j.future.2022.05.014 · Cited by 800
Prompt Engineering with ChatGPT: A Guide for Academic Writers
Giray, L. (2023) · Annals of Biomedical Engineering · doi:10.1007/s10439-023-03272-4 · Cited by 776
Research works printed but not linked: 3
- Vaswani A. Attention is all you need. 31st Conference on Neural Information Processing Systems; United States of America, California2017. p. 11.
- 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.
- 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
Lazaros, K., Vrahatis, A. G., & Kotsiantis, S. (2026) · Entropy · doi:10.3390/e28040377 · Cited by 50
A Comprehensive Survey of Prompt Engineering Techniques in Large Language ModelsPreprint
Debnath, T., Siddiky, M. N. A., Rahman, M. E., Das, P., Guha, A. K., Rahman, M., & Kabir, H. M. D. (2025) · doi:10.36227/techrxiv.174140719.96375390/v2 · Cited by 23
Application of Deep Learning in Virtual Power Plants—A Review
Zhu, H., Zhang, Z., Gao, Y., Xiao, H., Cai, Y., Wang, Y., Wang, Q., & Ai, Q. (2026) · Energy internet. · doi:10.1049/ein2.70027 · Cited by 1
Toward a Unified Framework for AI Creation Systems Integrating Agency and Governance
Firmansyah, I. (2026) · Advances in computational intelligence and robotics book series · doi:10.4018/979-8-2600-0368-8.ch005
A Feature Model-Based Configurable Framework for Reproducible Intervention Evaluation
Murillo-Barrera, C., Vera, M., Márquez, N., & Vidal-Silva, C. (2026) · International Journal of Advanced Computer Science and Applications · doi:10.14569/ijacsa.2026.0170867
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
- gold
- doi.org
- 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.


