Hallucination continues to be one of the most critical challenges in the institutional adoption journey of Large Language Models (LLMs). While prior studies have primarily focused on the post-generation analysis and refinement of outputs, this paper centers on the effectiveness of queries in eliciting accurate responses from LLMs. We present HalluciBot, a model that estimates the query's propensity to hallucinate before generation, without invoking any LLMs during inference. HalluciBot can serve as a proxy reward model for query rewriting, offering a general framework to estimate query quality based on accuracy and consensus. In essence, HalluciBot investigates how poorly constructed queries can lead to erroneous outputs - moreover, by employing query rewriting guided by HalluciBot's empirical estimates, we demonstrate that 95.7% output accuracy can be achieved for Multiple Choice questions. The training procedure for HalluciBot consists of perturbing 369,837 queries n times, employing n+1 independent LLM agents, sampling an output from each query, conducting a Multi-Agent Monte Carlo simulation on the sampled outputs, and training an encoder classifier. The idea of perturbation is the outcome of our ablation studies that measures the increase in output diversity (+12.5 agreement spread) by perturbing a query in lexically different but semantically similar ways. Therefore, HalluciBot paves the way to ratiocinate (76.0% test F1 score, 46.6% in saved computation on hallucinatory queries), rewrite (+30.2% positive class transition from hallucinatory to non-hallucinatory), rank (+50.6% positive class transition from hallucinatory to non-hallucinatory), and route queries to effective pipelines.
翻译:幻觉问题仍然是大型语言模型(LLM)在机构应用过程中面临的最关键挑战之一。先前的研究主要集中于对生成后输出的分析与精炼,而本文则聚焦于查询在引发LLM准确响应方面的有效性。我们提出了HalluciBot,该模型可在不调用任何LLM进行推理的情况下,在生成前评估查询引发幻觉的倾向性。HalluciBot可作为查询重写的代理奖励模型,提供一个基于准确性与共识来评估查询质量的通用框架。本质上,HalluciBot探究了构建不当的查询如何导致错误输出——更重要的是,通过采用由HalluciBot经验估计指导的查询重写,我们证明了在多项选择题上可实现95.7%的输出准确率。HalluciBot的训练流程包括:对369,837个查询进行n次扰动,使用n+1个独立的LLM代理,对每个查询采样输出,对采样输出进行多代理蒙特卡洛模拟,并训练一个编码器分类器。扰动思想的提出源于我们的消融研究结果,该研究表明通过以词汇不同但语义相似的方式扰动查询,可使输出多样性显著提升(+12.5%的一致性分布差异)。因此,HalluciBot为推理(测试F1分数达76.0%,在幻觉查询上节省46.6%的计算量)、重写(+30.2%的幻觉类向非幻觉类的正向转移)、排序(+50.6%的幻觉类向非幻觉类的正向转移)以及将查询路由至高效流程开辟了道路。