Do LLMs Understand Ambiguity in Text?

A Case Study in Open-world Question Answering

School of Computing & AI, Arizona State University
IEEE International Conference on Big Data (IEEE BigData) 2024
The problem of ambiguity in open-domain question answering, and how we disambiguate it for LLM question answering.

The problem of ambiguity in open-domain question answering (left), and how we resolve it for LLM QA using two training-free prompts (right).

Abstract

Ambiguity in natural language poses significant challenges to Large Language Models (LLMs) used for open-domain question answering. LLMs often struggle with the inherent uncertainties of human communication, leading to misinterpretations, miscommunications, hallucinations, and biased responses. This significantly weakens their ability to be used for tasks like fact-checking, question answering, feature extraction, and sentiment analysis. Using open-domain question answering as a test case, we compare off-the-shelf and few-shot LLM performance, focusing on measuring the impact of explicit disambiguation strategies.

We demonstrate how simple, training-free, token-level disambiguation methods may be effectively used to improve LLM performance for ambiguous question answering tasks. We empirically show our findings and discuss best practices and broader impacts regarding ambiguity in LLMs.

Key Takeaways

  • LLMs are sensitive to ambiguity. Off-the-shelf GPT-4o and GPT-4o-mini tend to pick one reading of an ambiguous question and answer it confidently, even when several answers are valid.
  • Training-free disambiguation prompts help. Two token-level strategies, rephrasing with "what" and adding model-generated context, improve ground-truth answer overlap over naive prompting for both models.
  • Adding context works best of the prompt-based methods, but it backfires when the model tacks on irrelevant context.
  • Small-scale fine-tuning did not help. On GPT-4o-mini it slightly hurt (0.626 vs. 0.643 naive), probably from catastrophic forgetting.
  • Lower temperature is not a fix. Dropping from 1.0 to 0.2 changes almost nothing.

Approach: training-free disambiguation

We define the task over a dataset of triples (qi, qdi, âi), where qi is the ambiguous question, qdi its human-disambiguated rewrite, and âi the ground-truth answer. For an LLM M, we compare M(qi) against M(qdi), and against two training-free prompts that try to close the gap without access to the human rewrite.

1. Naive (baseline)

Answer the question as concisely as possible with ONLY one answer
without any other text:
Question: {x}

2. Rephrase using "What"

Rephrasing a question to begin with "what" makes it more specific and reduces response variability (rephrased questions were ~1.45× longer on average).

Rewrite this question replacing all questions with a what, but retain
the meaning by specifying what entity or what person or what timeframe
the "what" is answering. Also, specify the current year is 2018 if
needed to answer a time-based question.
Question: {x}

3. Adding context

We ask the model to generate context from its own world knowledge to reduce scope ambiguity, then append the original question. The context-enriched questions ran about 14.2× longer than the originals.

Add extra information to the following question. Also specify the
current month and year is January 2018, so answer questions accordingly.
Your aim is to disambiguate what it is asking.
Question: {x}
Overview of scope ambiguity and how adding context resolves it.

Scope ambiguity: two questions with identical structure but different meaning are separated by adding entity context.

Results

We evaluate on 1,000 randomly sampled ambiguous questions from AmbigQA (a subset of Google's NQ-Open), scoring answers by cosine similarity of text-embedding-3-large embeddings against ground truth. Higher GT Answer Overlap is better. For both GPT-4o and GPT-4o-mini, training-free disambiguation beats the naive baseline, with adding context best.

GPT-4o

MetricNaiveDisamb. via 'what'Disamb. via contextUpper-bound (GT disamb.)
Question coherence–0.9050.7430.317
Naive Answer Overlap–0.8260.7990.895
GT Answer Overlap ↑0.7590.7780.7890.858

GPT-4o-mini

MetricNaiveDisamb. via 'what'Disamb. via contextUpper-bound (GT disamb.)
Question coherence–0.9070.7390.317
Naive Answer Overlap–0.7710.7390.745
GT Answer Overlap ↑0.6920.7070.710.783
KDE of cosine similarity between ground truth and LLM response, full sample.

Full sample: cosine similarity of LLM response vs. ground truth for the two disambiguation strategies.

KDE of cosine similarity on the human-resolvable subset of AmbigQA.

Human-resolvable subset: here adding context skews right. LLMs disambiguate well in the cases humans can too.

GT Answer Overlap for GPT-4o and GPT-4o-mini at high (1.0) and low (0.2) temperature.

Temperature ablation: lowering temperature from 1.0 to 0.2 yields only minor, non-significant differences.

Frequently Asked Questions

Do LLMs understand ambiguity in text?

Not reliably. GPT-4o and GPT-4o-mini often settle on a single reading of an ambiguous question and answer confidently, even when the wording admits several valid answers. They do better once the question is disambiguated, especially in the cases humans also find resolvable.

How can you improve LLM accuracy on ambiguous questions?

Use a training-free disambiguation prompt. Either rephrase the question to start with "what", or have the model add context from its own world knowledge before answering. Both raise ground-truth answer overlap over naive prompting, and adding context works best.

Does fine-tuning help?

Not at the scale tested. Few-shot fine-tuning of GPT-4o-mini on 50 QA pairs slightly reduced accuracy (0.626 vs. 0.643 naive), likely from catastrophic forgetting.

Does lowering temperature help?

No meaningful benefit. Dropping temperature from 1.0 to 0.2 gives only minor, non-significant changes.

What data and models were used?

1,000 ambiguous questions sampled from AmbigQA (a subset of Google's NQ-Open), evaluated on OpenAI GPT-4o and GPT-4o-mini, scored by cosine similarity of text-embedding-3-large embeddings.

BibTeX

@inproceedings{keluskar2024llms,
  title={Do llms understand ambiguity in text? a case study in open-world question answering},
  author={Keluskar, Aryan and Bhattacharjee, Amrita and Liu, Huan},
  booktitle={2024 IEEE International Conference on Big Data (BigData)},
  pages={7485--7490},
  year={2024},
  organization={IEEE}
}