Human in the loop chain of code prompting for deterministic tool development with generative AI

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 GenAI-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 GenAI-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 GenAI-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.

Authors

Institutions

Publication Details

Journal
Discover Artificial Intelligence
Published
2025-12-24
DOI
https://doi.org/10.1007/s44163-025-00704-z
Primary Topic
Artificial Intelligence in Healthcare and Education
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Human in the loop chain of code prompting for deterministic tool development with generative AI

Cameron Frederick Atkinson
Discover Artificial Intelligence
Artificial Intelligence in Healthcare and Education
article

Human in the loop chain of code prompting for deterministic tool development with generative AI

Cameron Frederick Atkinson
article en

Abstract

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 GenAI-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 GenAI-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 GenAI-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.

Discover Artificial IntelligenceVol. 6(1)
University of Tasmania (AU), Natural Hazards Research Australia (AU)
Partnerships for the goals
Openalex Percentile: Top 40%
Artificial Intelligence in Healthcare and Education
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Human in the loop chain of code prompting for deterministic tool development with generative AI — Cameron Frederick Atkinson · Discover Artificial Intelligence (2025) | TGRS Research Map | TGRS