Packet captures remain the definitive ground truth for modern network operations. Whenever a user reports severe download degradation or a cybersecurity task force initiates an incident response, a network engineer eventually opens a capture file to examine the exact data that crossed the physical or virtual wire. Yet, performing this investigative work manually is notoriously slow, demands rare expertise, and scales poorly against the massive volumes of modern traffic.
Large language models seem like natural assistants for this burden, as they already excel at summarizing raw logs and drafting operational troubleshooting steps. However, handing a standard packet capture to an LLM causes immediate failure. When converted into text using traditional parsing tools, just a few megabytes of traffic can expand to nearly 20 million tokens, vastly exceeding the context window of any commercial or open-source model available today.
To bridge this fundamental mismatch between network telemetry and artificial intelligence, researchers have developed PCAP-LM. This innovative methodology rewrites a network capture into a compact symbolic format, allowing an AI assistant to read an entire traffic trace in a single pass. Full technical details of the breakthrough are documented in a newly released research paper.
Translate, Don’t Just Shrink
The conventional approach of compressing capture files yields minimal improvement for AI consumption. Standard utilities like gzip compress a raw capture by only about a factor of two, largely because the vast majority of modern web traffic is already encrypted, meaning the data is already as dense as theoretically possible. Furthermore, an analyst rarely needs to read every single raw byte of a payload; instead, they require the narrative of each network conversation: who communicated with whom, when the session started, how long it lasted, the volume of data transferred in each direction, whether the connection utilized encryption, and whether anomalies or failures occurred mid-stream.
PCAP-LM preserves this high-level conversational story while intentionally discarding the redundant remainder. The system rewrites each individual conversation as a concise line of custom symbols, resembling musical notation. In this scheme, every packet becomes a compact mark denoting its transmission direction, protocol type, size category, and precise timing. Developers call these symbols PacketGlyphs.
To ensure general-purpose models can interpret the data without specialized fine-tuning, a brief legend is placed at the top of each document. Highly repetitive stretches of traffic—such as the thousands of nearly identical packets generated during a large file download—are folded into concise run-length encoded patterns indicating a repeated action. Additionally, frequent symbol combinations are merged into composite tokens through a constrained variant of Byte-Pair Encoding. Under optimal conditions, a massive download spanning 14,000 individual packets collapses into a single readable line. On real-world captures featuring variable sizes and irregular timings, a typical resulting document shrinks down to approximately 100 KB of text.
Putting the Method to the Test
The research team evaluated PCAP-LM using authentic traffic captures gathered during a rigorous 5G and 4G mobile measurement campaign. On average, the rewritten files proved to be roughly 800 times smaller than the standard detailed text outputs generated by Wireshark’s command-line tool, ensuring that every tested capture fit comfortably within a standard model context window.
Compression alone holds little value if the underlying data integrity is compromised. To measure practical utility, researchers posed ten fundamental forensic questions to a state-of-the-art AI model across 30 previously unseen captures. The queries tested basic operational metrics, including the number of active conversations, session durations, total packet counts, the presence of connection resets or retransmissions, encryption status, and the specific services contacted.

When reading the PCAP-LM formatted documents, the AI model answered 99.3% of the forensic questions correctly. By contrast, when provided with conventional text output truncated to match the exact length of the PCAP-LM files, the model achieved only 51% accuracy.
This performance gap highlights a crucial insight regarding context management. Because the conventional input was heavily truncated due to token limits, the model only observed the initial dozen packets of each capture, rendering metrics like total duration or cumulative packet count completely unanswerable. The experiment demonstrates that a holistic summary of an entire network capture provides vastly superior utility for high-level diagnostics than a hyper-detailed microscopic view restricted to a tiny fraction of the traffic.
Acknowledging Technical Limitations
This significant reduction in data volume does not come without compromises. PCAP-LM deliberately strips away payload contents, exact sequence numbers, and granular microsecond timings. During testing, the system’s lightweight heuristics failed to identify retransmissions in roughly a quarter of the affected captures, all of which originated from traffic routed behind an intermediary proxy.
To mitigate this trade-off, each PCAP-LM document can maintain an embedded reference pointer back to the original raw packets. This architecture allows an AI agent or a human security analyst to retrieve full low-level details whenever an anomaly warrants deeper inspection. Furthermore, the initial evaluations focused exclusively on a specific traffic profile involving large encrypted downloads originating from a single test server. Diverse application protocols and complex mixed traffic environments may require expanding the symbol vocabulary or retraining compression parameters. Crucially, PCAP-LM operates entirely without decrypting traffic, ensuring that encrypted payloads remain secure and opaque by design.
Implications for Network Operators and Future Outlook
The broader significance of PCAP-LM centers on practical implementation, demonstrating how network operators can safely integrate artificial intelligence into operational workflows without sacrificing security budgets, computational efficiency, or analytical accuracy.
The technique opens a larger industry-wide discussion regarding how automated systems should process network telemetry. Standard command-line interface agents excel at targeted, localized queries but frequently suffer from severe tunnel vision. PCAP-LM counters this limitation by exposing overall conversational behavior at a single glance, though its inherently lossy design means fine-grained forensic details may occasionally be overlooked.
Researchers encourage network operators to explore this boundary within their own infrastructures by comparing holistic symbolic summaries against traditional agentic workflows to determine which philosophy identifies unknown anomalies more rapidly. By leveraging side-indexes that point directly back to original frame numbers within hybrid AI architectures, engineers can build systems where large language models read summaries for situational awareness and trigger local tools for raw packet retrieval only when suspicious patterns emerge.
Xavier Marjou, a telecommunications and deep learning researcher at Orange in France with three decades of industry experience, conducted the research as part of an ongoing effort to bridge artificial intelligence with resilient network architecture.