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
Machine Learning and Artificial Intelligence: Definitions, Applications, and Future Directions
Helm, J. M., Swiergosz, A. M., Haeberle, H. S., Karnuta, J. M., Schaffer, J. L., Krebs, V. E., Spitzer, A. I., & Ramkumar, P. N. (2020) · Current Reviews in Musculoskeletal Medicine · doi:10.1007/s12178-020-09600-8 · Cited by 710
Open Science now: A systematic literature review for an integrated definition
Vicente-Saez, R., & Martinez-Fuentes, C. (2018) · Journal of Business Research · doi:10.1016/j.jbusres.2017.12.043 · Cited by 707
Harnessing the power of llms in practice: a survey on chatGPT and beyond
Yang, J., Jin, H., Tang, R., Han, X., Feng, Q., Jiang, H., Zhong, S., Yin, B., & Hu, X. (2024) · ACM Transactions on Knowledge Discovery from Data · doi:10.1145/3649506 · Cited by 644
Neurosymbolic AI: the 3rd wave
Garcez, A. D., & Lamb, L. C. (2023) · Artificial Intelligence Review · doi:10.1007/s10462-023-10448-w · Cited by 503
Adams, J., Hillier-Brown, F. C., Moore, H. J., Lake, A. A., Araujo-Soares, V., White, M., & Summerbell, C. (2016) · Systematic Reviews · doi:10.1186/s13643-016-0337-y · Cited by 486
Wu, T., Terry, M., & Cai, C. J. (2022) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3491102.3517582 · Cited by 483
Regulating ChatGPT and other Large Generative AI Models
Hacker, P., Engel, A., & Mauer, M. (2023) · 2023 ACM Conference on Fairness Accountability and Transparency · doi:10.1145/3593013.3594067 · Cited by 466
Viewpoint: Human-in-the-loop Artificial Intelligence
Zanzotto, F. M. (2019) · Journal of Artificial Intelligence Research · doi:10.1613/jair.1.11345 · Cited by 380
Excavating AI: the politics of images in machine learning training sets
Crawford, K., & Paglen, T. (2021) · AI & SOCIETY · doi:10.1007/s00146-021-01162-8 · Cited by 278
Leonelli, S. (2023) · Cambridge University Press eBooks · doi:10.1017/9781009416368 · Cited by 268
Scarcity or Abundance? Preserving the Past in a Digital Era
Rosenzweig, R. (2003) · The American Historical Review · doi:10.1086/529596 · Cited by 267
Eight problems with literature reviews and how to fix them
Haddaway, N. R., Bethel, A., Dicks, L. V., Koricheva, J., Macura, B., Petrokofsky, G., Pullin, A. S., Savilaakso, S., & Stewart, G. B. (2020) · Nature Ecology & Evolution · doi:10.1038/s41559-020-01295-x · Cited by 256
Open science, reproducibility, and transparency in ecology
Powers, S. M., & Hampton, S. E. (2019) · Ecological Applications · doi:10.1002/eap.1822 · Cited by 224
A survey on neural-symbolic learning systems
Yu, D., Yang, B. X., Liu, D., Wang, H., & Pan, S. (2023) · Neural Networks · doi:10.1016/j.neunet.2023.06.028 · Cited by 217
Piccinini, G. (2004) · Synthese · doi:10.1023/b:synt.0000043018.52445.3e · Cited by 215
EvalLM: Interactive Evaluation of Large Language Model Prompts on User-Defined Criteria
Kim, T. S., Lee, Y., Shin, J., Kim, Y., & Kim, J. (2024) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3613904.3642216 · Cited by 208
Neuro-symbolic approaches in artificial intelligence
Hitzler, P., Eberhart, A., Ebrahimi, M., Sarker, M. K., & Zhou, L. (2022) · National Science Review · doi:10.1093/nsr/nwac035 · Cited by 165
Zafar, A. (2024) · Discover Artificial Intelligence · doi:10.1007/s44163-024-00121-8 · Cited by 147
Scallop: A Language for Neurosymbolic Programming
Li, Z., Huang, J., & Naik, M. (2023) · Proceedings of the ACM on Programming Languages · doi:10.1145/3591280 · Cited by 143
Omar, C., Yoon, Y., LaToza, T. D., & Myers, B. A. (2012) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2012.6227133 · Cited by 140
Surveying neuro-symbolic approaches for reliable artificial intelligence of things
Lu, Z., Afridi, I. U., Kang, H. J., Ruchkin, I., & Zheng, X. (2024) · Journal of Reliable Intelligent Environments · doi:10.1007/s40860-024-00231-1 · Cited by 132
The threat, hype, and promise of artificial intelligence in education
Humble, N., & Mozelius, P. (2022) · Discover Artificial Intelligence · doi:10.1007/s44163-022-00039-z · Cited by 125
Bahi, A., Gharib, J., & Gahi, Y. (2024) · International Journal of Advanced Computer Science and Applications · doi:10.14569/ijacsa.2024.0150306 · Cited by 121
Review of Generative AI methods in cybersecurity
Yigit, Y., Buchanan, W. J., Tehrani, M., & Maglaras, L. A. (2025) · Internet of Things and Cyber-Physical Systems · doi:10.1016/j.iotcps.2026.04.001 · Cited by 119
A Survey of Neural Code Intelligence: Paradigms, Advances and BeyondPreprint
Sun, Q., Chen, Z., Xu, F., Cheng, K., Ma, C., Yin, Z., Wang, J., Han, C., Zhu, R., Yuan, S., et al. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2403.14734 · Cited by 106
How ChatGPT works: a mini review
Briganti, G. (2023) · European Archives of Oto-Rhino-Laryngology · doi:10.1007/s00405-023-08337-7 · Cited by 101
Is neuro-symbolic AI meeting its promises in natural language processing? A structured review
Hamilton, K., Nayak, A., Božić, B., & Longo, L. (2024) · Semantic Web · doi:10.3233/sw-223228 · Cited by 88
Symbols versus connections: 50 years of artificial intelligence
Mira, J. (2007) · Neurocomputing · doi:10.1016/j.neucom.2007.06.009 · Cited by 82
AutoDS: Towards Human-Centered Automation of Data Science
Wang, D., Andres, J., Weisz, J. D., Oduor, E., & Dugan, C. (2021) · Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems · doi:10.1145/3411764.3445526 · Cited by 75
Neurosymbolic AI: The 3rd WavePreprint
Garcez, A. D., & Lamb, L. C. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2012.05876 · Cited by 72
Chain of History: Learning and Forecasting with LLMs for Temporal Knowledge Graph CompletionPreprint
Luo, R., Gu, T., Li, H., Li, J., Lin, Z., Li, J., & Yang, Y. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2401.06072 · Cited by 71
A Survey on Human–AI Collaboration with Large Foundation Models
Vats, V., Nizam, M. B., Liu, M., Wang, Z., Ho, R. C., Prasad, M. S., Titterton, V., Malreddy, S. V., Aggarwal, R., Xu, Y., et al. (2026) · ACM Transactions on Intelligent Systems and Technology · doi:10.1145/3841472 · Cited by 71
Beyond Chain-of-Thought: A Survey of Chain-of-X Paradigms for LLMsPreprint
Xia, Y., Wang, R., Liu, X., Li, M., Yu, T., Chen, X., McAuley, J., & Li, S. C. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2404.15676 · Cited by 64
AUGMENTED INTELLIGENCE: HUMAN-AI COLLABORATION IN THE ERA OF DIGITAL TRANSFORMATION
LTIMIndtree, Dave, D. M., Mandvikar, S., & Ally (2023) · International Journal of Engineering Applied Sciences and Technology · doi:10.33564/ijeast.2023.v08i06.003 · Cited by 63
Mishra, A., Soni, U., Arunkumar, A., Huang, J., Kwon, B. C., & Bryan, C. (2023) · arXiv.org · doi:10.48550/arxiv.2304.01964 · Cited by 50
Xiong, H., Wang, Z., Li, X., Bian, J., Xie, Z., Mumtaz, S., Al-Dulaimi, A., & Barnes, L. E. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2407.08516 · Cited by 46
The Fault in our Stars: Quality Assessment of Code Generation Benchmarks
Siddiq, M. L., Dristi, S., Saha, J., & Santos, J. C. S. (2024) · IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam63643.2024.00028 · Cited by 44
Grey matters; on the importance of publication bias in systematic reviews
Winters, M., & Weir, A. (2016) · British Journal of Sports Medicine · doi:10.1136/bjsports-2016-096679 · Cited by 36
Hassan, A. E., Lin, D., Rajbahadur, G. K., Gallaba, K., Cogo, F. R., Chen, B., Zhang, H., Thangarajah, K., Oliva, G., Lin, J. (., et al. (2024) · Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering · doi:10.1145/3663529.3663849 · Cited by 35
Evolving Generative AI: Entangling the Accountability Relationship
Elliott, M. T. J., Deepak, P., & MacCárthaigh, M. (2025) · Digital Government Research and Practice · doi:10.1145/3664823 · Cited by 30
Understanding the Human-LLM Dynamic: A Literature Survey of LLM Use in Programming TasksPreprint
Etsenake, D., & Nagappan, M. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2410.01026 · Cited by 30
Philosophy of cognitive science in the age of deep learning
Millière, R. (2024) · Wiley Interdisciplinary Reviews Cognitive Science · doi:10.1002/wcs.1684 · Cited by 29
Scientists' Perspectives on the Potential for Generative AI in their Fields
Morris, M. R. (2023) · arXiv · doi:10.48550/arxiv.2304.01420 · Cited by 28
Review of Generative AI Methods in Cybersecurity
Yigit, Y., Buchanan, W. J., Tehrani, M. G., & Maglaras, L. (2024) · arXiv · doi:10.48550/arxiv.2403.08701 · Cited by 28
Generative Artificial Intelligence and the Future of Software Testing
Layman, L. M., & Vetter, R. (2024) · Computer · doi:10.1109/mc.2023.3306998 · Cited by 27
Cost-efficient prompt engineering for unsupervised entity resolution in the product matching domain
Nananukul, N., Sisaengsuwanchai, K., & Kejriwal, M. (2024) · Discover Artificial Intelligence · doi:10.1007/s44163-024-00159-8 · Cited by 23
Davis, J. L. (2024) · Australian Journal Of International Affairs · doi:10.1080/10357718.2024.2328293 · Cited by 21
Hybrid Intelligence Systems Combining Human Expertise and AI/RPA for Complex Problem Solving
Venigandla, K., Vemuri, N., & Vemuri, N. (2024) · International Journal of Innovative Science and Research Technology (IJISRT) · doi:10.38124/ijisrt/ijisrt24mar2039 · Cited by 20
Ibrahim, M., Wan, Z., Li, H., Panda, P., Krishna, T., Kanerva, P., Chen, Y., & Raychowdhury, A. (2024) · International Conference on Hardware/Software Codesign and System Synthesis · doi:10.1109/codes-isss60120.2024.00012 · Cited by 19
Yıldırım, R., Aydın, K., & Çetin, O. (2024) · European Interdisciplinary Cybersecurity Conference (EICC) · doi:10.1145/3655693.3655701 · Cited by 18
Chain of Code: Reasoning with a Language Model-Augmented Code Emulator
Li, C., Liang, J., Zeng, A., Chen, X., Hausman, K., Sadigh, D., Levine, S., Fei-Fei, L., Xia, F., & Ichter, B. (2023) · arXiv · doi:10.48550/arxiv.2312.04474 · Cited by 16
On the Use of Grey Literature: A Survey with the Brazilian Software Engineering Research Community
Kamei, F., Wiese, I., Pinto, G., Ribeiro, M., & Soares, S. (2020) · Proceedings of the XXXIV Brazilian Symposium on Software Engineering · doi:10.1145/3422392.3422442 · Cited by 15
Shin, H., Park, J., Yu, J., Kim, J.-E., Kim, H. Y., & Oh, C. (2024) · International Journal of Human-Computer Interaction · doi:10.1080/10447318.2024.2413293 · Cited by 13
A Comprehensive Overview of Artificial Intelligence
Jean-Claude, K. K. (2022) · International Conference on Artificial Intelligence, Soft Computing and Applications (AIAPP) · doi:10.5121/csit.2022.122314 · Cited by 12
Chain of Natural Language Inference for Reducing Large Language Model Ungrounded Hallucinations
Lei, D., Li, Y., Hu, M., Wang, M., Yun, V., Ching, E., & Kamal, E. (2023) · arXiv · doi:10.48550/arxiv.2310.03951 · Cited by 10
Enabling High-Level Machine Reasoning with Cognitive Neuro-Symbolic Systems
Oltramari, A. (2024) · Proceedings of the AAAI Symposium Series · doi:10.1609/aaaiss.v2i1.27701 · Cited by 9
Uncovering Weaknesses in Neural Code GenerationPreprint
Lian, X., Wang, S., Ma, J., Liu, F., Tan, X. L., Zhang, L., Shi, L., & Gao, C. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2407.09793 · Cited by 6
The Fault in our Stars: Quality Assessment of Code Generation BenchmarksPreprint
Siddiq, M. L., Dristi, S., Saha, J., et al. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2404.10155 · Cited by 5
From Deep Neural Language Models to LLMs
Kucharavy, A. (2024) · Springer eBooks · doi:10.1007/978-3-031-54827-7_1 · Cited by 5
Grayson, L., & Gomersall, A. (2006) · Evidence & Policy · doi:10.1332/174426406778881818 · Cited by 4
Large Language Models Meet NL2Code: A SurveyPreprint
Zan, D., Chen, B., Zhang, F., Lu, D., Wu, B., Guan, B., Wang, Y., & Lou, J. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2212.09420 · Cited by 3
Intersymbolic AI: Interlinking Symbolic AI and Subsymbolic AI
Platzer, A. (2024) · Repository KITopen (Karlsruhe Institute of Technology) · doi:10.48550/arxiv.2406.11563 · Cited by 3
CoIE: Chain-of-Instruct Editing for Multi-Attribute Face ManipulationPreprint
Zhang, Z., Zhang, B., & Liu, G. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2312.07879 · Cited by 2
Hassan, A. E., Lin, D., Rajbahadur, G. K., et al. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2402.15943 · Cited by 2
Research works printed but not linked: 3
- 21. Vaswani A. Attention is all you need. 31st Conference on Neural Information Processing Systems; United States of America, California2017. p. 11.
- 30. 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.
- 64. 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) · TechRxiv · doi:10.36227/techrxiv.174140719.96375390/v2 · Cited by 25
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
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.


