Aligning Language Models to Explicitly Handle Ambiguity (2024)

Abstract: In interactions between users and language model agents, user utterances frequently exhibit ellipsis (omission of words or phrases) or imprecision (lack of exactness) to prioritize efficiency. This can lead to varying interpretations of the same input based on different assumptions or background knowledge. It is thus crucial for agents to adeptly handle the inherent ambiguity in queries to ensure reliability. However, even state-of-the-art large language models (LLMs) still face challenges in such scenarios, primarily due to the following hurdles: (1) LLMs are not explicitly trained to deal with ambiguous utterances; (2) the degree of ambiguity perceived by the LLMs may vary depending on the possessed knowledge. To address these issues, we propose Alignment with Perceived Ambiguity (APA), a novel pipeline that aligns LLMs to manage ambiguous queries by leveraging their own assessment of ambiguity (i.e., perceived ambiguity). Experimental results on question-answering datasets demonstrate that APA empowers LLMs to explicitly detect and manage ambiguous queries while retaining the ability to answer clear questions. Furthermore, our finding proves that APA excels beyond training with gold-standard labels, especially in out-of-distribution scenarios. The data and code are available at https://github.com/heyjoonkim/APA.

## introduction large language models (llms) @xcite @xcite have demonstrated remarkable capabilities in text generation, proving particularly effective for questionanswering (qa) tasks @xcite . qa systems in the wild frequently encounter unexpected user input, such as unanswerable @xcite figure 1 : an example of an ambiguous query from ambigqa. the term "national championship" poses diverse denotations, causing ambiguity. (left) a model with diverse relevant knowledge might perceive the case as ambiguous. (right) in contrast, the query can be deemed unambiguous when the model lacks substantial related knowledge. thus, the perceived ambiguity may differ depending on the model's intrinsic knowledge. or ambiguous questions @xcite @xcite . to build an agent that is both reliable and user-friendly, it is essential for the model to robustly handle such inputs. in this work, we seek to extend the scope of research to manage invalid inputs effectively. specifically, we focus on managing "ambiguity" @xcite , which poses a significant challenge in natural language processing (nlp) @xcite . ambiguity refers to cases where an expression conveys multiple denotations @xcite . users may pose queries with clear intentions that, possibly due to insufficient domain knowledge or omission during the utterance, result in ambiguous requests. if a model arbitrarily responds to such am-biguity, there is a risk of misinterpreting the user's original intent, potentially harming the model's reliability. this is particularly evident in domains requiring high reliability, such as legal @xcite or medical @xcite , where misinterpretations may lead to severe consequences. despite such importance, approaches to manage ambiguity robustly are still significantly unexplored. properly processing ambiguous inputs is challenging primarily due to the following two hurdles. firstly, models are not trained to express ambiguity explicitly. even if a model is capable of recognizing ambiguity, confirming this recognition requires explicit cues from the model itself, such as expressing uncertainty or offering multiple interpretations. the second challenge is that the degree of ambiguity perceived by the model can vary based on its intrinsic knowledge. consider the scenario depicted in figure 1 . the initial query is ambiguous as the phrase "national championship" poses various denotations, such as "national tennis championship" or "national golf championship". with comprehensive knowledge across possible denotations, a model can likely recognize the query's ambiguity (figure 1 , left). however, limited knowledge would lead the model to perceive the query as unambiguous (figure 1 , right). therefore, how a model interprets ambiguity hinges on its knowledge scope, which we define as perceived ambiguity. to overcome these issues, this paper proposes alignment with perceived ambiguity (apa)a novel alignment pipeline for models to explicitly handle ambiguous queries by leveraging their perceived ambiguity. specifically, we design a proxy task that guides the model in utilizing its intrinsic knowledge for self-disambiguation of a given query. we then quantify the information gained from this disambiguation as an implicit measure of the extent to which the model perceives the input as ambiguous. this measure serves as a cue for ambiguous sample selection. for the selected ambiguous query and its disambiguation, the model generates a clarification request regarding the ambiguity. finally, the model is trained to request explicit clarification in response to ambiguous queries. experimental results from a range of qa datasets demonstrate that apa enables a language model to properly handle ambiguous inputs while maintaining its inherent capabilities of answering unambiguous queries. furthermore, we present three new datasets to provide a com-prehensive framework for assessing ambiguity: ambigtriviaqa, ambigwebquestions, and am-bigfreebaseqa. these datasets facilitate a more extensive evaluation of models' robustness in addressing ambiguity, thus contributing to the further expansion of related research. our contributions can be summarized as follows: min et al. (2020) introduce the ambigqa dataset to tackle ambiguity in opendomain qa and stelmakh et al. (2022) expand it to long-form generation. furthermore, cole et al. (2023) demonstrate that quantifying sampling repetition presents a reliable uncertainty measure for ambiguity, while kim et al. (2023a) generate treeof-clarification (toc) that refines input ambiguity. while we share the goal of handling ambiguity, we propose a method of directly aligning the model. alignment of llms llms are typically trained through causal language modeling, a process essential for understanding and generating text of high when was the last time uga won a national championship? please disambiguate the question! when was the last time uga won a national championship? when was the last time uga won a national tennis championship? information-@xmath0. when was the last time uga won a national tennis championship? the question is ambiguous. please specify the sport you are referring to. 1. initial prediction assessment 2. perceived ambiguity detection 2-2. measure information-gain 3. response construction when was the last time uga won a national championship? the question is ambiguous. please specify the sport you are referring to. 4. sft 𝒙 ෝ 𝒙 𝐝𝐢𝐬𝐚𝐦𝐛𝐢𝐠 𝒙 ෝ 𝒙 𝐝𝐢𝐬𝐚𝐦𝐛𝐢𝐠 𝒙 𝒚 𝐜𝐥𝐚𝐫𝐢𝐟𝐲 ෝ 𝒚 𝒙 2-1. disambiguation when was the last time uga won a national tennis championship? ෝ 𝒙 𝐝𝐢𝐬𝐚𝐦𝐛𝐢𝐠 𝒚 𝐜𝐥𝐚𝐫𝐢𝐟𝐲 ## experimental results the main results are presented in inference-only methods exhibit significant limitations in handling ambiguous queries. di-rect fails to manage ambiguous queries, as evidenced by its consistent zero f1 a scores. ambig-aware and sample rep demonstrate a strong bias towards clarification requests, exhibiting deficient f1 u . self-ask displays a subpar f1 a , indicating it is challenging to resolve ambiguity by just "asking" the model without task-specific training. trained methods present enhanced performance compared to inference-only approaches. specifically, subset rand exhibits improved performance across both metrics compared to apa achieves superior performance across all datasets. despite employing an identical inference template, apa achieves a notable enhancement in f1 u compared to direct. this improvement is especially surprising considering that apa was trained on d correct , which consists of samples that the model is already capable of handling. moreover, apa consistently outperforms across all the datasets in terms of f1 a , achieving gains up to 6 points. the results highlight the effectiveness of leveraging perceived ambiguity for alignment, enhancing generalization and robustness. when compared to subset ent , the improvement of apa suggests that infogain provides better quantification of ambiguity than entropy. the efficacy of leveraging only the data perceived ambiguous, comprising approximately 32% in the llama2 family and 13% in mistral, again emphasizes the importance of data quality over quantity @xcite . furthermore, apa fixed generally exhibits enhanced performance compared to apa gen . this is because apa gen engages in a more challenging task of generating specific clarification requests. ## ablation study in this section, we perform a series of ablation studies to further evaluate apa. unless otherwise specified, all experiments are conducted on llama2 7b type generations x how many pages in a brave new world? xdisambig how many pages in the 1932 edition of the book brave new world by aldous huxley? y clarify your question is ambiguous. which edition of the book are you interested in? ## conclusion in this work, we present a novel alignment pipeline, dubbed alignment with perceived ambiguity (apa), designed to enhance the ability of llms to address ambiguities within queries, leveraging the model's intrinsic knowledge. our method employs an implicit measure infogain to quantify the ambiguity perceived by the model itself. the model learns to effectively manage (un)ambiguous queries through alignment based on this metric. experimental results demonstrate the effectiveness of apa, which outperforms all the baselines across various qa datasets. as a future avenue, we plan to explore extending this methodology to broader domains and more complex types of ambiguities, further solidifying the role of llms in managing the inherent uncertainty present in nlp tasks.