神经符号查询编译器
Neuro-Symbolic Query Compiler
May 17, 2025
作者: Yuyao Zhang, Zhicheng Dou, Xiaoxi Li, Jiajie Jin, Yongkang Wu, Zhonghua Li, Qi Ye, Ji-Rong Wen
cs.AI
摘要
在检索增强生成(RAG)系统中,精准识别搜索意图仍是一个具有挑战性的目标,尤其是在资源受限及面对具有嵌套结构和依赖关系的复杂查询时。本文提出了QCompiler,一个受语言学语法规则和编译器设计启发的神经符号框架,旨在弥合这一差距。该框架理论上设计了一种最小化但充分的巴科斯-诺尔范式(BNF)语法G[q],用以形式化复杂查询。与以往方法不同,此语法在保持完整性的同时最大限度地减少了冗余。基于此,QCompiler集成了查询表达式翻译器、词法语法解析器及递归下降处理器,将查询编译为抽象语法树(ASTs)以供执行。叶子节点中子查询的原子性确保了更精确的文档检索与响应生成,显著提升了RAG系统处理复杂查询的能力。
English
Precise recognition of search intent in Retrieval-Augmented Generation (RAG)
systems remains a challenging goal, especially under resource constraints and
for complex queries with nested structures and dependencies. This paper
presents QCompiler, a neuro-symbolic framework inspired by linguistic grammar
rules and compiler design, to bridge this gap. It theoretically designs a
minimal yet sufficient Backus-Naur Form (BNF) grammar G[q] to formalize
complex queries. Unlike previous methods, this grammar maintains completeness
while minimizing redundancy. Based on this, QCompiler includes a Query
Expression Translator, a Lexical Syntax Parser, and a Recursive Descent
Processor to compile queries into Abstract Syntax Trees (ASTs) for execution.
The atomicity of the sub-queries in the leaf nodes ensures more precise
document retrieval and response generation, significantly improving the RAG
system's ability to address complex queries.Summary
AI-Generated Summary