ICDL-Agent: A Tool-Augmented LLM Agent for Automatic Instrument Workflows in Incoherent Doppler LiDAR Analysis
Abstract
1. Introduction
2. Materials and Methods
2.1. Instrumentation and Datasets
2.2. Doppler Wind Retrieval
2.2.1. FPI Transmission Reconstruction
2.2.2. Response Function and LOS Wind Retrieval
2.2.3. Error Estimation and Quality Control
- Fitting the response curve from the FPI scan,
- Simulate a Rayleigh signal and compute the response curve
- Convert photon count profiles into LOS wind profiles
- Compute the error bar based on the SNR signal
2.2.4. Uncertainty-Weighted Wind-Profile Correction
2.3. Agent Architecture
2.3.1. Overall Architecture
2.3.2. Functional Nodes and Shared State
2.3.3. Tool Registry and Extensibility
2.4. Workflows
2.4.1. Workflow with Existing Tools Only
2.4.2. Workflow with Dynamic Tool Creation
2.5. Execution Control
2.5.1. Prompt-Guided Execution Control
2.5.2. Boundaries and Error Propagation Control
2.5.3. Information Compatibility and Fusion Criteria
2.6. Disclosure of Generative AI Use
3. Results
3.1. Agent-Based Doppler Wind Retrieval
3.2. Advanced Agent Performance
3.2.1. Interactive LiDAR Analysis Through Conversational Refinement
3.2.2. Higher-Level Diagnostics
3.2.3. Transferability
3.3. Agent Behavior, Planning Quality, and Robustness
3.3.1. Task Success Rate, Ablation Baseline, and Failure Taxonomy
3.3.2. Failure-Case Analysis
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AI | Artificial Intelligence |
| API | Application Programming Interface |
| CDL | Coherent Doppler LiDAR |
| ECMWF | European Centre for Medium-Range Weather Forecasts |
| ERA5 | Fifth-generation ECMWF atmospheric reanalysis |
| EW | East–West |
| FPI | Fabry–Pérot Interferometer |
| ICDL | Incoherent Doppler LiDAR |
| LiDAR | Light Detection and Ranging |
| LLM | Large Language Model |
| LOS | Line of Sight |
| MAE | Mean Absolute Error |
| NS | North–South |
| PMT | Photomultiplier Tube |
| R2 | Coefficient of Determination |
| SNR | Signal-to-Noise Ratio |
| USTC | University of Science and Technology of China |
Appendix A
Appendix A.1. Revised Error Analysis
Appendix A.2. Agent Outputs
Appendix A.2.1. Predefined Functions
- Case 1:
- -
- User: “do a FPI fit and response function calculation”
- -
- LiDAR agent:

- Case 2:
- -
- User: “calculate the wind profile of 1021 and the wind field of 0930 EW”
- -
- LiDAR agent:

Appendix A.2.2. Generated Functions
- Case 1:
- -
- User: “Overlays the SNR profile and error bar profile on one figure for date 0912 EW.”

- Case 2:
- -
- User: “highlights altitude regions where the error bar exceeds a threshold for date 0914 EW.”

- Case 3:
- -
- User: “Resamples the wind field to a coarser time resolution for date 0914 EW.”

Appendix A.2.3. Diagnostic Examples
- Case 1:
- -
- User: “compute the wind field of 1022 and do a gravity wave analysis”
- -
- LiDAR agent: “Wind field inversion for date 1022 completed successfully for both EW and NS directions, covering heights approximately 13 km to over 23 km. Gravity wave analysis performed for both directions with key parameters: EW direction: period_h = 2.84 h, wavelength_km = 14.25 km, power = 0.35; NS direction: period_h = 3.10 h, wavelength_km = 20.50 km, power = 0.40.”

- Case 2:
- -
- User: “compute the wind profile of 0930 EW and 1022 EW, compare two profiles and make a summary”
- -
- LiDAR agent:
Appendix A.2.4. Gradio UI

Appendix A.3. LLM Interaction and Prompting
Appendix A.3.1. Node-Level Prompting Mechanisms and Prompt Templates
- Intent-detection node
- -
- When generating needed_tools, ** you may only use parameter names that appear in args**.
- -
- Do not invent keys such as “parameter”, “input”, or other unsupported names.
- -
- If the user says “find the transmission peaks of FPI”:
- -
- first use `fit_fpi_transmission` to fit the transmission curve;
- -
- then design a new tool `find_fpi_peaks` to locate the peaks of the two channels;
- -
- set use_existing_tools = false;
- -
- the plan should include: fit_fpi_transmission, find_fpi_peaks;
- -
- new_tool_spec should describe the functionality and parameters of find_fpi_peaks.
- -
- If the user says “find/provide/plot the Response curve”, “find the R function”, “plot the Response function”, etc.,
- -
- preferably use `fit_fpi_transmission` first to obtain the fitted transmission data;
- -
- then use `compute_response_function` to compute the Response function;
- -
- that is, needed_tools should preferably include:
- (1)
- fit_fpi_transmission
- (2)
- compute_response_function
- -
- If the user intent contains “coherent lidar wind retrieval/coherent-lidar wind-profile retrieval”:
- -
- you must set `use_existing_tools = false`;
- -
- `new_tool_spec` should define a new coherent-lidar-specific tool, such as `coherent_lidar_wind_retrieval`;
- -
- do not use `invert_wind_profile_slice`/`invert_wind_profile_field` as the main solution.
- Planning node
- -
- The plan is an array. Each element has the following form:
- -
- Only real numerical values or filenames may be provided. Do not provide natural-language descriptions.
- -
- If a parameter is uncertain, omit that key entirely from args.
- -
- Only provide real .npy filenames that exist under the data directory, for example, “photonSumList_30 bin_0911_NoNoise.npy”.
- -
- If uncertain, do not write file_path in args; let the system use the default data.
- -
- Only provide numerical values, for example, 532 or 355.
- -
- If uncertain, do not write wavelength_nm in args; let the system use the default value.
- -
- Only provide a 12-character string in the format ‘%Y%m%d-%H%M%S’, for example 20180913-214428.
- -
- If no specific time is given, let the system use the default value.
- -
- Provide a four-character string, such as 0911 or 1201.
- -
- If no date is given, let the system use the default value.
- -
- Two values are supported: “EW” for east–west and “NS” for north–south.
- -
- The default is “EW”.
- -
- If the user requests a calculation for both directions, the planner should generate two plan entries, one using “EW” and one using “NS”.
- -
- For example, if the user says “calculate the wind profile”, EW may be sufficient; if the user says “calculate the complete wind speed”, both EW and NS should be calculated.
- -
- If the user input contains “[plot full-night wind field]”, use invert_wind_profile_field.
- -
- If the user input asks for “[plot a single profile, or a single time point]”, use invert_wind_profile_slice.
- -
- **New**: If the user asks to calculate data for two directions, the planner must add one plan entry for each direction.
- -
- **New**: If the user explicitly requests coherent lidar wind retrieval,
- -
- Tools that accept `date`, a short MMDD code such as “0913”, and `direction`, either “EW” or “NS”:
- -
- `invert_wind_profile_field (date: str = “0911”, direction: str = “EW”, …)` — use `date` to specify the data date and `direction` to specify the wind direction.
- -
- `invert_wind_profile_slice (date: str = “0911”, direction: str = “EW”, …)`—use `date` to specify the data date and `direction` to specify the wind direction; optional `time_str` may be used to specify an exact time point.
- -
- `compute_error_bar (state, date: str = “0911”, direction: str = “EW”, …)`—use `date` and `direction` to specify the data.
- -
- Tools that accept `time_str`, an exact time in the format `YYYYMMDD-HHMMSS`:
- -
- `invert_wind_profile_slice (time_str: str)`—used to select the profile closest to the specified time point.
- -
- Tools that accept `file_path`, a path string relative to `DATA_DIR`:
- -
- `fit_fpi_transmission (file_path: str = “sig_trans.txt”, …)`—directly loads FPI spectral data from a file.
- -
- For other tools, the planner may pass `file_path` only if there is truly no relevant intermediate result in the state. Otherwise, it should pass `date` or leave args empty so that the tool can internally retrieve data through `get_result`.
- -
- About output filename parameters, such as `output_name`/`output_image_path`:
- -
- The planner must provide a concrete filename string without a directory, for example, “wind_field_0913.png” or “gravity_wave_0913.png”. The tool will internally save it using `OUTPUT_DIR/filename`.
- -
- If a tool has parameters such as `output_image_path`, `output_path`, or `output_name` for saving images or files, the planner must provide a concrete filename string in args, such as “gravity_wave_0913_EW.png”. Do not provide code snippets or expressions involving state.
- -
- Naming rule: if the step contains both `date` and `direction`, use `<tool_name>_<date>_<direction>.png`; if it contains only `date`, use `<tool_name>_<date>.png`; otherwise, use `<tool_name>.png`. Do not include a directory prefix. The tool implementation will internally save the file using `OUTPUT_DIR/filename`.
- -
- Example:
- -
- If state already contains results relevant to the tool task, such as `wind_field_result` or `wind_result`, and these results are organized by date-direction, for example `wind_field_result[“0913”][“EW”]` or `wind_result[“0913”][“EW”]`, preferably pass `date` and possibly `direction` in args, for example `{“date”:”0913”, “direction”:”EW”}`. Do not pass expressions such as `”wind_result[‘0913’][‘EW’]”` as strings.
- -
- Do not pass state field names directly as parameter values. The planner should provide literals, such as numbers or strings, that can be directly used as Python arguments, and let the tool internally read the actual data through `get_result(state, …)`.
- -
- Some parameters are passed through global variables, for example: from ..config import DATA_DIR, OUTPUT_DIR, DEFAULT_WAVELENGTH_NM, MEMORY_PATH. These have already been imported; you do not need to import them.
- Tool-Creation node
- -
- The generated function code must **not contain any import statements**, including both `import xxx` and `from xxx import yyy`.
- -
- Directly use the module-level imports and functions already available in `dynamic_tools.py`; do not repeat imports inside the new function.
- -
- Configuration constants, such as `DATA_DIR`, `OUTPUT_DIR`, `DEFAULT_WAVELENGTH_NM`, and `MEMORY_PATH`, should be used directly by their existing names. Do not re-import them inside the function.
- -
- The current runtime environment does not guarantee that continuous wavelet functions such as morlet or cwt from scipy.signal are available.
- -
- Structured intermediate results must be retrieved through `get_result(state, “<some *_result key>“)` and processed inside the function.
- -
- For example:
- -
- Only simple scalar values or clear file-path strings (`str`) are allowed as extra parameters in the signature. Do not include arrays, dicts, or intermediate result names in the signature.
- -
- Never redefine `get_result` inside the function body, for example `def get_result(…): …`; you must reuse the framework-provided `from ..agent.state_cache import get_result`.
- -
- Never read intermediate results through custom paths such as `state.results`, `state.memory`, or `state.cache`; always use `get_result(state, “<key>“)`.
- -
- If the state already contains structured intermediate results related to the current tool task, such as `wind_field_result`, `wind_result`, `fpi_result`, `response_result`, etc., **do not** add corresponding parameters such as `file_path`, `wind_field_data_path`, or other alternative data parameters to the function signature.
- -
- You must use `get_result(state, “<key>“)` inside the function, or read and process the existing intermediate results from state/cache.
- -
- Only when the state truly contains no relevant intermediate results and the tool genuinely needs to load a raw observation file may the signature include a `file_path: str` parameter. In that case, the implementation must explicitly load the file using `DATA_DIR/file_path`.
- -
- `<extra_params>` may only contain simple scalar values (`int/float/bool/str`) or `file_path: str` for loading a raw observation file.
- -
- The function implementation must retrieve all structured intermediate results through `get_result(state, “xxx”)`. Do not pass them as parameters.
- -
- scalar values, such as float/int/str/bool;
- -
- NumPy arrays, which may also be converted to lists;
- -
- an optional “image_path” field pointing to the saved image path, if a plot is generated.
- -
- wind speed should be aligned to remove laser-frequency drift, using the mean wind speed between 15 and 20 km altitude as the reference aligned to 0 m/s;
- -
- The wind-speed range should be clipped to −100 to 100 m/s.
- -
- Prefer the short code format, four-digit MMDD. Do **not** blindly parse it into a full datetime using `strptime`.
- -
- `fpi_result`: contains ‘pos’, ‘ch1_smooth’, ‘ch2_smooth’, ‘image_path’, etc.
- -
- `response_result`: contains ‘freq_shift’, ‘response’, ‘image_path’, etc.
- -
- `wind_field_result`: full-night wind-field dictionary, organized by two levels date-direction, such as `{date: {direction: {…}}}`, or `{date: {…}}` for a single direction. Common fields include ‘v_los_field’, shape (nt, nz), ‘height’, nz, unit m, ‘time_str’, nt, format “YYYYMMDD-HHMMSS”, etc.
- -
- `wind_result`: wind-profile retrieval result, organized by two levels of date-direction, such as `{date: {direction: {…}}}`, or `{date: {…}}`. It contains fields such as ‘v_los’, ‘height’, ‘time_index’, ‘time_str’, etc.
- -
- `errorbar_result`: error-bar result, organized by two levels date-direction, such as `{date: {direction: {…}}}`, or `{date: {…}}`. It contains ‘sigma_v’, ‘height’, etc.
- -
- Access example, must be followed:
- -
- Note: do not perform direct Boolean evaluation of NumPy arrays. Do not write `if arr:`. Use explicit checks such as `np.any()`/`np.all()`/`arr.size`/`np.isnan()`.
- -
- When falling back between fields, such as `v_los_field`/`v_los`, `height`/`heights`, or `time_str`/`times`, do not write `a = entry.get(“k1”) or entry.get(“k2”)`.You must use explicit `None` checks:`a = entry.get(“k1”);``if a is None: a = entry.get(“k2”)`
- -
- The common format of `time_str` is `YYYYMMDD-HHMMSS`, for example `20180930-205745`.Do not directly use `np.array(time_strs, dtype=‘datetime64’)`, and do not strip off the date part before parsing.Prefer:`pd.to_datetime(time_strs, format=“%Y%m%d-%H%M%S”, errors=“coerce”)`.
- -
- Do not write a rigid validation rule for the `time_str` parameter that accepts only `YYYYMMDD-HHMMSS`.
- -
- For filtering steps such as `time_highpass_butter`/`vertical_bandpass_butter`, first check whether the sampling interval is finite and greater than 0,
- -
- z_fft_spectrum(U_hp, distance) returns A with shape (Nk, Nt). When plotting the 1D FFT:
- Validation node
- -
- the user’s original request;
- -
- the tool-call plan;
- -
- the result summary.
- Code Repair
- -
- You must output a **complete and independent function definition**, starting from `def function_name(` and ending at the final line of the function, usually the `return …` statement.
- -
- The old version will be **fully removed, and the new function will be appended** to the end of the file, so your code must **not include any content before the function definition**.
- -
- Your function must be **complete and self-contained**, including all required inline logic. Do not rely on missing external code.
- -
- Use `state`/`get_result` correctly to retrieve intermediate results;
- -
- Never switch to `state.results`/`state.memory`/`state.cache` to read intermediate results;
- -
- [Key repair rule] If the function parameters include `wind_data_ew`, `wind_data_ns`, or similar complex data parameters such as dicts or arrays, this usually indicates a flawed function design. These parameters should be removed, and the function should instead retrieve all required intermediate results internally through `get_result(state, ‘wind_field_result’)` or similar calls. It should then use simple parameters such as `date` and `direction` to extract the required parts of the data.
- -
- Avoid ambiguous Boolean evaluation of NumPy arrays. Do not write expressions such as `if arr:`;
- -
- Field fallback must not use `a = x.get(“k1”) or x.get(“k2”)`, because if `k1` is a NumPy array it may trigger an ambiguity error. Use explicit `None` checks instead;
- -
- For `time_str`, such as `20180930-205745`, do not directly use `np.array(…, dtype = ‘datetime64’)`. Use:
- -
- For date-less strings such as `time_start = “22:30:00”`, do not use `np.datetime64(time_start)` directly.
- -
- For the `time_str` parameter, do not enforce a rigid validation rule that only allows `YYYYMMDD-HHMMSS`.
- -
- When fixing 1D FFT (`z_fft_spectrum`) plots: A has shape `(Nk, Nt)`. NEVER use `np.nanmean(A, axis = 1)`
- -
- Never generate or keep `from ..utils.xxx import …`/`from lidar_agent.utils.xxx import …`. If the traceback is `ModuleNotFoundError: No module named ‘lidar_agent.utils’`, remove the import and instead call helper functions that already exist in the current file or modules that actually exist in the project.
- -
- Do not add any `import` statements in the repaired function, including both `import x` and `from x import y`; directly use the module-level imports and helper functions already available in `dynamic_tools.py`.
- -
- Never generate or keep `from ..tools.wave_tools import …`/`from ..tools.fft_tools import …`/`from ..tools.wavelet_tools import …`.
- -
- Use the existing project constants `OUTPUT_DIR`/`DATA_DIR` for paths;
- -
- Return a dict and preserve the original return fields;
- -
- Ensure that your code is not excessively long. Within 500 lines is preferred.
Appendix A.3.2. Prompting Techniques
Appendix A.4. Document-Guided Tool Creation
Appendix A.4.1. Gravity-Wave Document
- Input data checking and state retrieval
- Time and height subsetting
- Polynomial regression for background removal
- Vertical band-pass filtering through the Butterworth filter
- Temporal high-pass filtering
- Two-dimensional FFT analysis
- Vertical wavelet analysis
- Result packaging and output generation
- Wind direction component: EW or NS
- Date and time format: YYYYMMDD-HHMMSS
- Upper analysis height: typically truncated at 50 km
- Polynomial background order: deg = 4
- Vertical band-pass wavelength range: 2–15 km
- Butterworth filter order: typically order = 4 or 5 depending on the step
- Temporal high-pass cutoff period: 4 h or depending on data temporal length
- FFT zero-padding length: default 4096
- Wavelet family: Morlet wavelet
- Morlet order/nondimensional frequency parameter: order = 3
- Wavelet scale spacing: dj = 1/20
- Wavelet scale extent parameter: Jn = 7
- Exponential height correction prior to wavelet analysis: scale height H = 7 km
- Wavelet plotting range: e.g., scale_min = −4.0, scale_max = 0.0
- Peak-detection spacing parameter: e.g., distance = 10
Appendix A.4.2. CDL Wind Retrieval Guidance Document
- Data layoutThe data block is a 2D spectral intensity matrix with shape (149, 256).Each row represents one altitude bin.The vertical resolution is 30 m per row.Therefore, the altitude array should be constructed as:height_m = row_index * 30for row_index = 0, 1, …, 148.Each row contains 256 spectral samples.These 256 points span the frequency range from 0 MHz to 240 MHz.freq_axis_mhz = np.linspace (0.0, 240.0, 256)Each point value is the signal intensity at that frequency bin.
- Frequency axis definition and the backgroundConstruct a frequency axis with 256 points covering 0 to 240 MHz.The zero-Doppler reference is located at 80 MHz.In index terms, this corresponds approximately to the 75th point from the low-frequency side.The exact processing should use the physical frequency value 80 MHz as the zero-shift reference, rather than relying only on the index.The intentsity should have the background filtered out, the back ground is the last 5 lines.Compute the average intensity at each frequency bin of the last 5 lines: intensity_row_background, shape of (256)let intensity_row-intensity_row_background, to get the pure signal, when signal intensity is below 0 after background extraction, let it be 0
- Spectral processing methodProcess the spectrum row by row.For each altitude row:Read the 256-point spectrum as intensity versus frequency.The three right most column should be trimmed.Apply the spectral centroid method to estimate the center frequency of the signal:centroid_mhz = np.sum(intensity_row [5:−5] * freq_axis_mhz [5:−5])/np.sum(intensity_row [5:−5])Compute the Doppler frequency shift relative to the zero-Doppler position:delta_nu_mhz = 80.0 − centroid_mhzdelta_nu_hz = delta_nu_mhz * 1 × 106
- Radial wind-speed retrievalThe lidar laser center wavelength is 1550 nm.Convert the Doppler frequency shift to line-of-sight wind speed using:vlos = delta_nu_hz * 1550 × 10−9/2.0/2Important:If the centroid is computed in MHz, convert it to Hz before applying the formula.The final output wind speed should be in m/s.find the signal cutoff point where total intensity for each line drops below 1 × 10−6
- Output productGenerate a wind profile as a 1D array of radial wind speed versus altitude:altitude range: 30 to 4470 mtotal number of levels: 150vertical spacing: 30 m
- Visualization requirements2 plots required:Plot the signal intesity profile with: total intensity for each linex-axis: intensity in log scaley-axis: altitude in kmy-axis display range: 0 to 1.5 kmPlot the retrieved wind profile with:x-axis: radial wind speed in m/sy-axis: altitude in kmy-axis display range: 0 to 1.5 kmx-axis display range: −40 to +40 m/s
References
- Chanin, M.L.; Garnier, A.; Hauchecorne, A.; Porteneuve, J. A Doppler lidar for measuring winds in the middle atmosphere. Geophys. Res. Lett. 1989, 16, 1273–1276. [Google Scholar] [CrossRef]
- Chanin, M.; Hauchecorne, A. Lidar observation of gravity and tidal waves in the stratosphere and mesosphere. J. Geophys. Res. Oceans 1981, 86, 9715–9721. [Google Scholar] [CrossRef]
- Garnier, A.; Chanin, M.L. Description of a Doppler rayleigh LIDAR for measuring winds in the middle atmosphere. Appl. Phys. B 1992, 55, 35–40. [Google Scholar] [CrossRef]
- Korb, C.L.; Gentry, B.M.; Weng, C.Y. Edge technique: Theory and application to the lidar measurement of atmospheric wind. Appl. Opt. 1992, 31, 4202–4213. [Google Scholar] [CrossRef]
- Flesia, C.; Korb, C.L. Theory of the double-edge molecular technique for Doppler lidar wind measurement. Appl. Opt. 1999, 38, 432–440. [Google Scholar] [CrossRef] [PubMed]
- Baumgarten, G. Doppler Rayleigh/Mie/Raman lidar for wind and temperature measurements in the middle atmosphere up to 80 km. Atmos. Meas. Tech. 2010, 3, 1509–1518. [Google Scholar] [CrossRef]
- Gardner, C.S.; Miller, M.S.; Liu, C.-H. Rayleigh lidar observations of gravity wave activity in the upper stratosphere at Urbana, Illinois. J. Atmos. Sci. 1989, 46, 1838–1854. [Google Scholar] [CrossRef]
- Dou, X.; Han, Y.; Sun, D.; Xia, H.; Shu, Z.; Zhao, R.; Shangguan, M.; Guo, J. Mobile Rayleigh Doppler lidar for wind and temperature measurements in the stratosphere and lower mesosphere. Opt. Express 2014, 22, A1203–A1221. [Google Scholar] [CrossRef]
- Zhao, R.-C.; Xia, H.-Y.; Dou, X.-K.; Sun, D.-S.; Han, Y.-L.; Shangguan, M.-J.; Guo, J.; Shu, Z.-F. Correction of temperature influence on the wind retrieval from a mobile Rayleigh Doppler lidar. Chin. Phys. B 2015, 24, 024218. [Google Scholar] [CrossRef][Green Version]
- Chen, C.; Xue, X.; Sun, D.; Zhao, R.; Han, Y.; Chen, T.; Liu, H.; Zhao, Y. Comparison of Lower Stratosphere Wind Observations From the USTC’s Rayleigh Doppler Lidar and the ESA’s Satellite Mission Aeolus. Earth Space Sci. 2022, 9, e2021EA002176. [Google Scholar] [CrossRef]
- Yamashita, C.; Chu, X.; Liu, H.L.; Espy, P.J.; Nott, G.J.; Huang, W. Stratospheric gravity wave characteristics and seasonal variations observed by lidar at the South Pole and Rothera, Antarctica. J. Geophys. Res. Atmos. 2009, 114, D12101. [Google Scholar] [CrossRef]
- Sun, D.; Zhong, Z.; Zhou, J.; Hu, H.; Kobayashi, T. Accuracy Analysis of the Fabry–Perot Etalon Based Doppler Wind Lidar. Opt. Rev. 2005, 12, 409–414. [Google Scholar] [CrossRef]
- Zhang, N.; Sun, D.; Han, Y.; Chen, C.; Wang, Y.; Zheng, J.; Liu, H.; Han, F.; Zhou, A.; Tang, L. Zero Doppler correction for Fabry–Pérot interferometer-based direct-detection Doppler wind LIDAR. Opt. Eng. 2019, 58, 054101. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language Models are Few-Shot Learners. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates: Red Hook, NY, USA, 2020; pp. 1877–1901. [Google Scholar]
- Beurer-Kellner, L.; Fischer, M.; Vechev, M. Prompting Is Programming: A Query Language for Large Language Models. Proc. ACM Program. Lang. 2023, 7, 1946–1969. [Google Scholar] [CrossRef]
- Vemprala, S.H.; Bonatti, R.; Bucker, A.; Kapoor, A. ChatGPT for Robotics: Design Principles and Model Abilities. IEEE Access 2024, 12, 55682–55696. [Google Scholar] [CrossRef]
- Schick, T.; Dwivedi-Yu, J.; Dessì, R.; Raileanu, R.; Lomeli, M.; Hambro, E.; Zettlemoyer, L.; Cancedda, N.; Scialom, T. Toolformer: Language Models Can Teach Themselves to Use Tools. In Proceedings of the Thirty-Seventh Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Achiam, J.; Adler, S.; Agarwal, S.; Ahmad, L.; Akkaya, I.; Aleman, F.L.; Almeida, D.; Altenschmidt, J.; Altman, S.; Anadkat, S.; et al. GPT-4 Technical Report. arXiv 2023, arXiv:2303.08774. [Google Scholar]
- Yao, S.; Zhao, J.; Yu, D.; Du, N.; Shafran, I.; Narasimhan, K.; Cao, Y. ReAct: Synergizing Reasoning and Acting in Language Models. arXiv 2023, arXiv:2210.03629. [Google Scholar] [CrossRef]
- OpenAI. Introducing GPT-5. 2025. Available online: https://openai.com/index/introducing-gpt-5/ (accessed on 20 March 2026).
- Zhang, Y.; Li, J.; Wang, Z.; He, Z.; Guan, Q.; Lin, J.; Yu, W. Geospatial large language model trained with a simulated environment for generating tool-use chains autonomously. Int. J. Appl. Earth Obs. Geoinf. 2025, 136, 104312. [Google Scholar] [CrossRef]
- Pierdicca, R.; Muralikrishna, N.; Tonetto, F.; Ghianda, A. On the Use of LLMs for GIS-Based Spatial Analysis. ISPRS Int. J. Geo-Inf. 2025, 14, 401. [Google Scholar] [CrossRef]
- Zhan, Y.; Xiong, Z.; Yuan, Y. SkyEyeGPT: Unifying remote sensing vision-language tasks via instruction tuning with large language model. ISPRS J. Photogramm. Remote Sens. 2025, 221, 64–77. [Google Scholar] [CrossRef]
- Bran, A.M.; Cox, S.; Schilter, O.; Baldassari, C.; White, A.D.; Schwaller, P. ChemCrow: Augmenting Large-Language Models with Chemistry Tools. Nat. Mach. Intell. 2024, 6, 525–535. [Google Scholar] [CrossRef] [PubMed]
- Nie, Y.; Gao, S. ChatGPT for Intelligent Spatial Analysis Workflow Construction. In SIGSPATIAL ‘24: Proceedings of the 32nd ACM International Conference on Advances in Geographic Information Systems; Association for Computing Machinery: New York, NY, USA, 2024. [Google Scholar]
- Xi, Z.; Chen, W.; Guo, X.; He, W.; Ding, Y.; Hong, B.; Zhang, M.; Wang, J.; Jin, S.; Zhou, E.; et al. The rise and potential of large language model based agents: A survey. Sci. China Inf. Sci. 2025, 68, 121101. [Google Scholar] [CrossRef]
- Luo, Q.; Lin, Q.; Xu, L.; Wu, S.; Mao, R.; Wang, C.; Feng, H.; Huang, B.; Du, Z. GeoJSON agents: A multi-agent LLM architecture for geospatial analysis—Function calling vs. code generation. Big Earth Data 2026, 1–55. [Google Scholar] [CrossRef]
- Xing, Z.; Meng, Z.; Zheng, G.; Yang, L.; Guo, X.; Tan, L.; Jiang, Y. Human-computer interactive rehabilitation: A 3D graph deep learning method for non-contact gesture recognition in post-epidemic and aging societies. Measurement 2026, 257, 118794. [Google Scholar] [CrossRef]
- Xing, Z.; Li, L.; Yang, Y.; Zhou, W.; Ma, G.; Chen, S.; Lyu, L.; Li, X. A lightweight model for indoor object detection in unstructured scenes based on joint attention and prior knowledge in the context of home rehabilitation. J. King Saud Univ. Comput. Inf. Sci. 2026. [Google Scholar] [CrossRef]
- Li, J.; Chen, C.; Han, Y.; Chen, T.; Xue, X.; Liu, H.; Zhang, S.; Yang, J.; Sun, D. Wind Profile Reconstruction Based on Convolutional Neural Network for Incoherent Doppler Wind LiDAR. Remote Sens. 2024, 16, 1473. [Google Scholar] [CrossRef]
- Song, Y.; Han, Y.; Su, Z.; Chen, C.; Sun, D.; Chen, T.; Xue, X. Denoising coherent Doppler lidar data based on a U-Net convolutional neural network. Appl. Opt. 2024, 63, 275–282. [Google Scholar] [CrossRef]
- Kliebisch, O.; Uittenbosch, H.; Thurn, J.; Mahnke, P. Coherent Doppler wind lidar with real-time wind processing and low signal-to-noise ratio reconstruction based on a convolutional neural network. Opt. Express 2022, 30, 5540–5552. [Google Scholar] [CrossRef]
- Mohandes, M.A.; Rehman, S. Wind Speed Extrapolation Using Machine Learning Methods and LiDAR Measurements. IEEE Access 2018, 6, 77634–77642. [Google Scholar] [CrossRef]
- Han, Y.; Sun, D.; Han, F.; Liu, H.; Zhao, R.; Zhen, J.; Zhang, N.; Chen, C.; Li, Z. Demonstration of daytime wind measurement by using mobile Rayleigh Doppler Lidar incorporating cascaded Fabry-Perot etalons. Opt. Express 2019, 27, 34230–34246. [Google Scholar] [CrossRef] [PubMed]
- Craven, G.W.P. Smoothing noisy data with spline functions. Numer. Math. 1978, 31, 377–403. [Google Scholar] [CrossRef]
- Weinert, H.L. Efficient computation for Whittaker–Henderson smoothing. Comput. Stat. Data Anal. 2007, 52, 959–974. [Google Scholar] [CrossRef]
- Eilers, P.H. A Perfect Smoother. Anal. Chem. 2003, 75, 3631–3636. [Google Scholar] [CrossRef]
- Chen, C.; Zhang, N. Wind observations of USTC Rayleigh Doppler Lidar in 2019 (Xinjiang); Science Data Bank: Beijing, China, 2022. [Google Scholar]
- Kong, S.Z.A.; Chen, H.; Li, Q.; Qin, Y.; Sun, R.; Zhou, X.; Wang, E.; Dong, X. Better Zero-Shot Reasoning with Role-Play Prompting. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Mexico City, Mexico, 16–21 June 2024; Gomez, H., Duh, K., Bethard, S., Eds.; Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; Volume 1, pp. 4099–4113. [Google Scholar] [CrossRef]
- White, Q.F.J.; Hays, S.; Sandborn, M.; Olea, C.; Gilbert, H.; Elnashar, A.; Spencer-Smith, J.; Schmidt, D.C. A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT. In Proceedings of the 30th Conference on Pattern Languages of Programs, Monticello, IL, USA, 23–25 October 2023. [Google Scholar]
- Gao, A.M.L.; Zhou, S.; Alon, U.; Liu, P.; Yang, Y.; Callan, J.; Neubig, G. PAL: Program-aided language models. In Proceedings of the 40th International Conference on Machine Learning, Honolulu, HI, USA, 23–25 October 2023. [Google Scholar]











| LLM-Based Node | Main Input | Required Output | Main Constraints | Next Node |
|---|---|---|---|---|
| Intent Detection | User request, available tool list, tool argument schema, brief state context | Structured intent, use_existing_tools, needed tools, new-tool specification if needed | Tool names and argument keys must come from registry; no invented tool interfaces | Existing tools route: planning; Dynamic tool creation route: tool creation |
| Planning | User request, intent result, tool registry, state summary | Ordered JSON tool-call plan | Args must be executable literals; no natural-language placeholders; large arrays/dicts must be read internally from shared state | Execution |
| Tool Creation | New-tool specification, state summary, similar tool examples, procedural documents if needed | Complete Python function code and metadata | Fixed function signature; use get_result(state, …); return dict; avoid unsupported imports; follow LiDAR rules | Registration and planning |
| Validation | User request, executed plan, result summary/error summary | is_ok, issue list, user-facing summary | Check task completion, structure, numerical plausibility, physical reasonableness | Success: output response; Failed: code repair |
| Code Repair (Validation) | Failed function source code, traceback, expected behavior | Corrected complete function code | Preserve function signature; minimal internal changes; correct state access; no unsupported dependencies | Repair in process: re-execute; Repeated failure: explicit error report |
| Control Layer | Purpose | Example Implementation |
|---|---|---|
| Workflow Routing | Select workflow branch | use_existing_tools = true |
| Planning | Assign tool order and args | JSON tool sequence |
| Data accessing | Preserve correct state and database accessing | get_result() function, shared_state[“wind_result”] |
| Code generation | Ensure generated tools remain executable | fixed template, fixed return format |
| Physical rules | Enforce physical principle | LiDAR parameters, domain formulas |
| Validation | Validate and correct results | data type check, numerical correctness, output check |
| Profile: | R2 | MAE | ||||||
|---|---|---|---|---|---|---|---|---|
| Metric: | EW | NS | Wind Speed | Wind Dir | EW | NS | Wind Speed | Wind Dir |
| Traditional Algorithm | −0.97 | −1.94 | −1.58 | 0.20 | 7.25 | 4.41 | 4.78 | 41.46 |
| Agent-Assisted Algorithm | 0.52 | 0.15 | 0.08 | 0.33 | 3.73 | 2.45 | 3.15 | 33.78 |
| Profile: | R2 | MAE | ||||||
|---|---|---|---|---|---|---|---|---|
| Metric: | EW | NS | Wind Speed | Wind Dir | EW | NS | Wind Speed | Wind Dir |
| Traditional Algorithm | 0.63 | −1.08 | 0.52 | −0.13 | 2.95 | 2.15 | 2.55 | 27.04 |
| Agent-Assisted Algorithm | 0.80 | −0.26 | 0.73 | 0.11 | 2.31 | 1.72 | 2.04 | 21.44 |
| ERA5 | 0.19 | −2.20 | −0.09 | −0.32 | 5.30 | 4.06 | 5.05 | 37.4 |
| Task Category | Tasks | Model | Execution Success Rate | Result Correctness Rate | Common Failure Modes |
|---|---|---|---|---|---|
| Single-tool | 10 | GPT-5-mini | 10/10 (100%) | 10/10 (100%) | NA |
| Qwen-plus | 9/10 (90%) | 7/10 (70%) | missing prerequisite data (1) E2; incomplete/non-interpretable output (2) E4 | ||
| Multi-tool | 10 | GPT-5-mini | 10/10 (100%) | 9/10 (90.0%) | data missing (1) E0; |
| Qwen-plus | 8/10 (80%) | 5/10 (50%) | incomplete workflow output (3); invalid argument or missing prerequisite (2) E2 | ||
| Tool creation | 30 | GPT-5-mini | 17/30 (56.7%) | 16/30 (53.3%) | ambiguous intent (2) E1; missing Args (1) E2; data type misalignment (5) E3; import error (2) E0; missing prerequisite data (3) E2; physical infeasibility (1) E4 |
| Qwen-plus | 24/30 (80.0%) | 15/30 (50.0%) | state/interface mismatch (3) E3; physically implausible output (4) E4; incomplete output (4) E2/E4; unit/argument mismatch (2) E3/E4; dependency/tool error (2) E3 |
| Task Category | Tasks | Execution Success Rate | Failure Modes |
|---|---|---|---|
| Single-tool | 10 | 10/10 (100%) | NA |
| Multi-tool | 10 | 9/10 (90.0%) | Validation/runtime(1) E4; |
| Tool creation | 30 | 14/30 (56.7%) | Validation/runtime(13) E4; Tool creation(3) E3; |
| Error Type | Definition (Primary Cause) | Failures | Fraction of Failures | Typical Triggers |
|---|---|---|---|---|
| E0 External Factors | Non-systematic errors | 2 | 2/15 (13.3%) | imported uninstalled module, missing data |
| E1 Intent | Ambiguous or wrong intent parsed | 2 | 2/15 (13.3%) | misinterpret, typos, human expectation mismatch |
| E2 Workflow | Plan/sequence missing step or precondition | 4 | 4/15 (26.7%) | missing prerequisite data, missing arguments; |
| E3 Tool creation | Mismatched functionality or an implementation mistake | 6 | 6/15 (40%) | module import failure; missing arguments |
| E4 Validation | Validation or runtime errors | 1 | 1/15 (6.7%) | physically implausible outputs |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the International Society for Photogrammetry and Remote Sensing. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Li, J.; Han, Y.; Chen, C.; Chen, T.; Xue, X.; Pu, L.; Su, Z.; Liu, H.; Zhang, S.; Yang, J.; et al. ICDL-Agent: A Tool-Augmented LLM Agent for Automatic Instrument Workflows in Incoherent Doppler LiDAR Analysis. ISPRS Int. J. Geo-Inf. 2026, 15, 238. https://doi.org/10.3390/ijgi15060238
Li J, Han Y, Chen C, Chen T, Xue X, Pu L, Su Z, Liu H, Zhang S, Yang J, et al. ICDL-Agent: A Tool-Augmented LLM Agent for Automatic Instrument Workflows in Incoherent Doppler LiDAR Analysis. ISPRS International Journal of Geo-Information. 2026; 15(6):238. https://doi.org/10.3390/ijgi15060238
Chicago/Turabian StyleLi, Jiawei, Yuli Han, Chong Chen, Tingdi Chen, Xianghui Xue, Liangyu Pu, Zhaowang Su, Hengjia Liu, Shuhua Zhang, Jing Yang, and et al. 2026. "ICDL-Agent: A Tool-Augmented LLM Agent for Automatic Instrument Workflows in Incoherent Doppler LiDAR Analysis" ISPRS International Journal of Geo-Information 15, no. 6: 238. https://doi.org/10.3390/ijgi15060238
APA StyleLi, J., Han, Y., Chen, C., Chen, T., Xue, X., Pu, L., Su, Z., Liu, H., Zhang, S., Yang, J., & Sun, D. (2026). ICDL-Agent: A Tool-Augmented LLM Agent for Automatic Instrument Workflows in Incoherent Doppler LiDAR Analysis. ISPRS International Journal of Geo-Information, 15(6), 238. https://doi.org/10.3390/ijgi15060238

