API-Aware Stepwise Prompting for LLM-based Workflow Code Generation

The automation of network operations is often hindered by a shortage of personnel possessing specialized knowledge, including domain expertise, API proficiency, and programming skills. Although large language models (LLMs) have demonstrated potential in generating code from natural language, current methodologies encounter difficulties in producing accurate workflow code, particularly when confronted with extended sequences and intricate control flows. To mitigate these challenges, we propose an API-aware stepwise prompting method for LLM-based workflow code generation. This approach systematically decomposes the generation process into four steps: API selection, dataflow analysis, sequence diagram design, and workflow code generation. By employing this stepwise prompting method, the model is better equipped to manage API dependencies and control structures. Experimental results indicate that the inclusion and precise sequencing of intermediate steps markedly enhance generation accuracy. The proposed method consistently surpasses simpler baseline approaches, underscoring the efficacy of a structured methodology.

Authors

Institutions

Publication Details

Published
2025-09-22
DOI
https://doi.org/10.23919/apnoms67058.2025.11181303
Primary Topic
Scientific Computing and Data Management
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

API-Aware Stepwise Prompting for LLM-based Workflow Code Generation

Kazuki Aiura, R. Morimoto, Michiaki Sekine, Yu Miyoshi et al.
Scientific Computing and Data Management
article

API-Aware Stepwise Prompting for LLM-based Workflow Code Generation

Kazuki Aiura, R. Morimoto, Michiaki Sekine, Yu Miyoshi, Yuji Soejima
article en

Abstract

The automation of network operations is often hindered by a shortage of personnel possessing specialized knowledge, including domain expertise, API proficiency, and programming skills. Although large language models (LLMs) have demonstrated potential in generating code from natural language, current methodologies encounter difficulties in producing accurate workflow code, particularly when confronted with extended sequences and intricate control flows. To mitigate these challenges, we propose an API-aware stepwise prompting method for LLM-based workflow code generation. This approach systematically decomposes the generation process into four steps: API selection, dataflow analysis, sequence diagram design, and workflow code generation. By employing this stepwise prompting method, the model is better equipped to manage API dependencies and control structures. Experimental results indicate that the inclusion and precise sequencing of intermediate steps markedly enhance generation accuracy. The proposed method consistently surpasses simpler baseline approaches, underscoring the efficacy of a structured methodology.

NTT (Japan) (JP)
Openalex Percentile: Top 73%
Scientific Computing and Data Management
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.