Improving LLM Generations via Fine-Grained Self-Endorsement (2024)

Abstract: This work studies mitigating fact-conflicting hallucinations for large language model (LLM) at inference time.Particularly, we propose a self-endorsement framework that leverages the fine-grained fact-level comparisons across multiple sampled responses.Compared with prior ensemble methods (e.g., self-consistency) that perform response-level selection, our approach can better alleviate hallucinations for knowledge-intensive tasks.Our approach can broadly benefit smaller and open-source LLMs as it mainly conducts simple content-based comparisons.Experiments on Biographies show that our method can effectively improve the factuality of generations with simple and intuitive prompts across different scales of LLMs.Besides, comprehensive analyses on TriviaQA and GSM8K demonstrate the potential of self-endorsement for broader application.

## introduction recent large language models (llms) such as llama @xcite and @xcite take billions of parameters and are trained on huge corpora of text documents with billions of tokens. as a result, they have demonstrated remarkable capabilities across various tasks such as longform generation, closed book qa and math reasoning. however, llms can still fail frequently on these knowledge-intensive and reasoning tasks where obviously incorrect facts or reasoning steps are generated. to address this issue, previous work has explored multiple orthogonal directions, such as introducing external knowledge and tool @xcite @xcite , continual supervised finetuning @xcite and inference-time improvement @xcite to reduce hallucination and improve reasoning capability. among these research directions, inferencetime improvement has recently gained popularity. the motivation behind may stem from various reasons: it can be used on black-box llms (e.g., no requirement on accessing the model weighs); it can work together with supervised finetuning by producing high-quality training data (a.k.a., selfdistillation @xcite ). many prior approaches of inference-time improvement can be grouped into two main directions. the ensemble methods like self-consistency @xcite and universal self-consistency @xcite build upon traditional ensemble learning by picking the optimal prediction from multiple candidates sampled from the target llm. conversely, in the other direction, self-refinement methods such as chain-of-verification @xcite and self-reflection @xcite leverage the target llm to refine its own predictions from varied perspectives. comparatively, the ensemble methods can eliminate occasional hallucinations by looking into multiple peering samples. but, they may fail on longform generation tasks because the sampled candidates disagree with each other on too many places, making it difficult to pick the best prediction. more importantly, they cannot combine the merits from the peering samples. on the other hand, the self-refinement methods perform fine-grained refinement. but they rely on the assumption that the target llm is strong enough to provide helpful critique for refinement, and thus most experiments on them are conducted on state-of-the-art closesource llms (e.g., gpt4 @xcite ). in this work, we follow the line of inferencetime improvement to study how and when finegrained cross-response validation (endorsement) can reduce hallucination and improve reasoning quality. particularly, we propose a framework to improve llm predictions by leveraging fine-grained cross-response endorsements. as shown in figure 1 , we begin by generating multiple samples from the target llm. next, we extract facts from each sample and prompt the llm to verify the endorsement of each fact by cross-referencing with the other samples. an endorsement score is then assigned to each fact based on its level of approval. finally, to produce the final response, we either select the sample with the most reliable facts or regenerate a new one by incorporating the facts with high endorsement scores as supplementary inputs to the llm. without complex instructions, the llm is only required to conduct two tasks: 1) check whether a fact is consistent with the knowledge in another response at a time; 2) generate a new response given additional high-quality facts as inputs. both tasks are fairly simple, thus we believe (and our experiments show that) our method can be broadly helpful to various open-source llms of different capacities. we mainly conduct experiments to examine the level of fact-conflicting hallucinations in model predictions. specifically, we evaluate on biographies @xcite , a benchmark of longform generation, and triviaqa @xcite , a popular dataset on generative qa. results on popular open-source models, such as llama2 @xcite and @xcite , show that our method greatly reduces hallucination by a large margin. details analyses suggest that our method can better select reliable fine-grained facts across various model sizes. study on gsm8k @xcite , a benchmark of math word problems, further validates the promise of self-endorsement for more pervasive use. ## baselines we take (universal) self-consistency @xcite and chain-of-verification @xcite as the baseline for comparison. they are two popular methods of inferencetime improvement based on ensemble learning and self-refinement, respectively. ## self-endorsement as shown in figure 1 , our self-endorsement framework interacts with an llm by taking the following steps given a user query x : (1) candidate sampling: it asks the llm to sample n candidate responses y 1 , y 2 , ..., y n . (2) fact decomposition: it breaks down each candidate y i into facts f i 1 , f i 2 , ..., f i n y i ## conclusion in this paper, we present self-endorsement, a framework that alleviates hallucinations and improves reasoning capability solely by the llm itself. particularly, we first perform fine-grained fact-level comparisons among multiple sampled candidates to identify reliable facts. then, we produce the final response by either selecting from candidates or regenerating based on these facts. we evaluate our approach on popular benchmarks including biographies for the longform generation, triviaqa for open-domain question answering, and gsm8k for mathematical multi-step reasoning. results show that self-endorsement can significantly benefit small or open-source llms without intricate instructions compared with previous approaches.