# Retrieval Augmented Generation Based LLM Evaluation For Protocol State Machine Inference With Chain-of-Thought Reasoning

arXiv: https://arxiv.org/abs/2502.15727 · HTML: https://mlsanity.com/paper/2502.15727/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning.
- Builds on 10 of its 23 references that are in the map.
- First posted on arXiv 30 Jan 2025.

## Placed in

- LLM reasoning / [Knowledge- and tool-augmented reasoning](https://mlsanity.com/lr/knowledge-and-tool-augmented-reasoning/)
- Retrieval-augmented generation / [Agentic RAG, agents and memory](https://mlsanity.com/rag/agentic-rag-agents-and-memory/)
- LLM agents and tool use / [Web, search, and research agents](https://mlsanity.com/agents/web-search-and-research-agents/)

## Builds on (most cited first, 10 of 10)

- [ReAct: Synergizing Reasoning and Acting in Language Models](https://mlsanity.com/paper/2210.03629/) (2022)
- [Evaluating Large Language Models Trained on Code](https://mlsanity.com/paper/2107.03374/) (2021)
- [Augmenting Greybox Fuzzing with Generative AI](https://mlsanity.com/paper/2306.06782/) (2023)
- [Harnessing Large Language Models for Seed Generation in Greybox Fuzzing](https://mlsanity.com/paper/2411.18143/) (2024)
- [LLM-DaaS: LLM-driven Drone-as-a-Service Operations from Text User Requests](https://mlsanity.com/paper/2412.11672/) (2024)
- [LLM-SEM: A Sentiment-Based Student Engagement Metric Using LLMS for E-Learning Platforms](https://mlsanity.com/paper/2412.13765/) (2024)
- [RIRO: Reshaping Inputs, Refining Outputs Unlocking the Potential of Large Language Models in Data-Scarce Contexts](https://mlsanity.com/paper/2412.15254/) (2024)
- [LMRPA: Large Language Model-Driven Efficient Robotic Process Automation for OCR](https://mlsanity.com/paper/2412.18063/) (2024)
- [LMV-RPA: Large Model Voting-based Robotic Process Automation](https://mlsanity.com/paper/2412.17965/) (2024)
- [Unleashing the Power of LLM to Infer State Machine from the Protocol Implementation](https://mlsanity.com/paper/2405.00393/) (2024)

## Built on by (most cited first, 4 of 4)

- [RAGXplain: From Explainable Evaluation to Actionable Guidance of RAG Pipelines](https://mlsanity.com/paper/2505.13538/) (2025)
- [An Agentic Flow for Finite State Machine Extraction using Prompt Chaining](https://mlsanity.com/paper/2507.11222/) (2025)
- [MultiFuzz: A Dense Retrieval-based Multi-Agent System for Network Protocol Fuzzing](https://mlsanity.com/paper/2508.14300/) (2025)
- [An LLM-Powered AI Agent Framework for Holistic IoT Traffic Interpretation](https://mlsanity.com/paper/2510.13925/) (2025)

## Abstract (arXiv)

This paper presents a novel approach to evaluate the efficiency of a RAG-based agentic Large Language Model (LLM) architecture for network packet seed generation and enrichment. Enhanced by chain-of-thought (COT) prompting techniques, the proposed approach focuses on the improvement of the seeds' structural quality in order to guide protocol fuzzing frameworks through a wide exploration of the protocol state space. Our method leverages RAG and text embeddings to dynamically reference to the Request For Comments (RFC) documents knowledge base for answering queries regarding the protocol's Finite State Machine (FSM), then iteratively reasons through the retrieved knowledge, for output refinement and proper seed placement. We then evaluate the response structure quality of the agent's output, based on metrics as BLEU, ROUGE, and Word Error Rate (WER) by comparing the generated packets against the ground-truth packets. Our experiments demonstrate significant improvements of up to 18.19%, 14.81%, and 23.45% in BLEU, ROUGE, and WER, respectively, over baseline models. These results confirm the potential of such approach, improving LLM-based protocol fuzzing frameworks for the identification of hidden vulnerabilities.
