CSEQL-Llama: A Text-to-CSEQL Framework Based on Multi-agent Collaborative Data Synthesis and Parameter-Efficient Fine-Tuning
摘要
Text-to-CSEQL task, which involves translating natural language (NL) questions into structured cyberspace search engine query language (CSEQL) queries, has gained traction with recent advances in large language models (LLMs). However, existing approaches continue to face key challenges, including high reliance on closed-source models, risks to data privacy, limited annotated training data, and insufficient dataset quality. To address these issues, we propose a two-stage framework that integrates multi-agent coordinated data synthesis with parameter-efficient fine-tuning (PEFT). First, three specialized agents are employed to synthesize high-quality, semantically precise, and stylistically diverse NL question–CSEQL query pairs. Based on this process, SynCSEQL is constructed as the largest dataset for Text-to-CSEQL, featuring extensive field coverage and rich linguistic variation. Next, we apply the Low-Rank Adaptation (LoRA) method to fine-tune an open-source LLM on SynCSEQL, resulting in CSEQL-Llama, a domain-specific model optimized for CSEQL query generation. We have conducted extensive empirical evaluations on the synthesized dataset to validate the effectiveness of our approach. Experimental results show that CSEQL-Llama significantly outperforms both open-source and closed-source baselines across multiple evaluation metrics. In particular, it demonstrates enhanced robustness and generalization in complex query scenarios.