EasyRAG: Efficient Retrieval-Augmented Generation Framework for Automated Network Operations

Zhangchi Feng, Dongdong Kuang, Zhongyuan Wang, Zhijie Nie, Yaowei Zheng, Richong ZhangarXiv 2024 · OpenReview

Abstract

This paper presents EasyRAG, a simple, lightweight, and efficient retrieval-augmented generation framework for automated network operations (AIOps). Our framework offers three primary advantages: accurate question answering through a specific data processing workflow and dual-route retrieval; simple deployment requiring no model fine-tuning and minimal VRAM; and efficient inference via a plug-and-play acceleration scheme. EasyRAG achieved first place in the GLM4 track in the preliminary round and second place in the semifinals of the 2024 AIOps Challenge. Our code is available at https://github.com/BUAADreamer/EasyRAG.

Introduction

Automated Network Operations (AIOps) demand systems capable of parsing vast technical documentation to provide real-time troubleshooting and maintenance support. However, standard Retrieval-Augmented Generation (RAG) pipelines often struggle with domain-specific jargon, high inference latency, and deployment complexity. Technical documents, such as 5G maintenance manuals, contain complex HTML structures and thousands of images that general-purpose models find difficult to navigate efficiently. EasyRAG was developed to address these hurdles, proving that a lightweight, "plug-and-play" framework can achieve state-of-the-art performance without the need for costly model fine-tuning.

The EasyRAG Architecture

The EasyRAG framework is divided into two primary phases: Ingestion and the EasyRAG pipeline itself.

Overview of the EasyRAG framework including ingestion and the retrieval-generation pipeline.

Refined Ingestion

To ensure stable reproducibility, EasyRAG utilizes a custom ingestion class rather than standard libraries like llama-index. A key innovation here is the elimination of "path influence." By decoupling file path metadata from text length calculations during chunking, the system ensures consistent segmentation regardless of varying directory depths.

Dual-Route Retrieval and Reranking

The system employs a dual-route strategy for coarse ranking, combining a "sparse" route (BM25 for keyword matching) with a "dense" route (GTE-Qwen2-7B for semantic meaning). This ensures high recall across both technical keywords and conceptual queries. Following retrieval, a bge-reranker-v2-minicpm model is used for reranking. To optimize speed, the authors implemented an Early-Exit algorithm: the system evaluates the reranker's confidence at the 12th layer; if a clear result is found, it skips the remaining 16 layers, reducing reranking latency by approximately 33%.

Key Optimization Strategies

Context Compression (BM25-Extract)

To reduce the "noise" presented to the final LLM generator, EasyRAG implements context compression. Before answer generation, retrieved chunks are trimmed to only the most relevant sentences using BM25 similarity. This ensures the generator focuses on the most pertinent technical details, improving both speed and accuracy.

Image Filtering

In the AIOps domain, technical documents are often saturated with images. However, the authors discovered that 97% of these images were irrelevant to specific QA tasks. By applying OCR and rule-based filtering, the image pool was reduced from 6,000 to under 200. This targeted approach significantly enhanced system accuracy and reduced processing overhead.

Experimental Insights and Results

EasyRAG was evaluated using the 2024 CCF International AIOps Challenge dataset, consisting of technical documentation in HTML format and roughly 6,000 images.

Ablation study showing the impact of various components, including image filtering and answer merging, on final accuracy.

As shown in the ablation study, the integration of rule-based image filtering and document concatenation strategies pushed the system's accuracy to a peak of 96.65%. Interestingly, the authors noted a "Simplicity Paradox": complex query rewriting techniques like HyDE (Hypothetical Document Embedding) often performed worse than direct prompts due to LLM hallucinations in highly technical contexts.

In terms of efficiency, switching to the bm25s library reduced sparse retrieval time from 17 seconds to just 0.05 seconds. The entire system is designed for a minimal resource footprint, running on a single 80GB GPU with the reranker requiring only 5GB of VRAM.

Conclusion

EasyRAG demonstrates that efficiency and high performance are not mutually exclusive in the AIOps domain. By focusing on refined data ingestion, early-exit reranking, and aggressive noise filtering, the framework provides a scalable solution for technical document QA. Future work will explore deeper multimodal integration and further model quantization to reduce memory usage without sacrificing accuracy.

Summary updated

BibTeX
@misc{feng2024easyrag,
  author = {Zhangchi Feng and Dongdong Kuang and Zhongyuan Wang and Zhijie Nie and Yaowei Zheng and Richong Zhang},
  title = {{EasyRAG: Efficient Retrieval-Augmented Generation Framework for Automated Network Operations}},
  year = {2024},
  eprint = {2410.10315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.10315},
}
Figure