Skip to main content
QUICK REVIEW

[논문 리뷰] How Confident Is the First Token? An Uncertainty-Calibrated Prompt Optimization Framework for Large Language Model Classification and Understanding

Wei Chen, Guoyang Ju|arXiv (Cornell University)|2026. 02. 23.
Topic ModelingComputer Science인용 수 0
한 줄 요약

논문은 Log-Scale Focal Uncertainty (LSFU)와 UCPOF를 도입하여 prompt 최적화를 위한 첫 토큰 불확실성을 보정하고 소수 샷 정확도를 향상시키며 RAG에서 불필요한 검색을 줄인다.

ABSTRACT

With the widespread adoption of large language models (LLMs) in natural language processing, prompt engineering and retrieval-augmented generation (RAG) have become mainstream to enhance LLMs' performance on complex tasks. However, LLMs generate outputs autoregressively, leading to inevitable output uncertainty. Since model performance is highly sensitive to prompt design, precise uncertainty measurement is crucial for reliable prompt optimization. For multi-class multiple-choice (understanding) tasks, conventional uncertainty measures (e.g., entropy) based on output probabilities treat all classes equally and ignore class prior differences in pretraining corpora. This failure to distinguish spurious confidence (from priors) from true certainty (from contextual understanding) results in poor confidence calibration. To address this, we propose Log-Scale Focal Uncertainty (LSFU), a first-token-based metric inspired by focal loss. LSFU incorporates label prior probabilities as a risk-modulation factor to suppress noise from high-frequency classes and emphasize risk for low-frequency long-tail classes, with a dynamic weighting mechanism unifying the measurement scale. Based on LSFU, we further propose the uncertainty-calibrated prompt optimization framework (UCPOF), which leverages the first token of model outputs to select high-quality exemplars and dynamically optimize prompts. Comprehensive evaluations show UCPOF improves average accuracy by 6.03% over few-shot baselines, surpasses always-on full RAG by 5.75% in overall average accuracy, and reduces the average retrieval trigger rate by 50.66%. By adaptively triggering RAG only for high-uncertainty samples, our framework significantly lowers computational costs while maintaining state-of-the-art performance.

연구 동기 및 목표

  • In-context learning for classification tasks에서 프롬프트 설계를 안내하기 위한 신뢰할 수 있는 불확실성 신호의 필요성을 고무한다.
  • 첫 토큰 기반 불확실성(LSFU)이 클래스 priors를 고려해 보정을 개선하도록 제안한다.
  • LSFU를 사용한 금샷 Gold Shot Selection으로 정적 프롬프트를 선택하고 불확실성 인지 프롬팅 프레임워크 UCPOF를 개발한다.
  • UCPOF가 정확도를 개선하고 검색 트리거를 줄여 비용 효율적인 적응 프롬프트를 가능하게 함을 보인다.

제안 방법

  • Log-Scale Focal Uncertainty (LSFU)를 도입하여 첫 토큰의 상위-K 엔트로피를 라벨 priors modulation factor (1 - P_prior(y))^2와 로그 변환과 결합한다.
  • LSFU를 사용하여 고품질의 정적 프롬프트(Gold Shot Selection)를 위한 금샷 예시를 선택한다.
  • UCPOF를 두 단계 프레임워크로 정의한다: 오프라인 준비(정적 프롬프트 + 게이팅 임계값)와 온라인 추론(정적 프롬프트 → 게이트 → 필요 시 반영 프롬프트)
  • 고위험 샘플에 대해 반영 프롬프트를 위한 의미적으로 유사한 참조를 검색하도록 게이트 임계값 T를 설정한다.
  • P_UCPOF(y|x)가 S(x) < τ이면 ICL을 사용하고, 그렇지 않으면 검색된 컨텍스트와 함께 RAG를 사용한다는 공식적인 의사결정 규칙을 제공한다.
  • 오프라인 벡터 지식 베이스를 모든 샘플 인코딩을 통해 구축하여 반영 프롬프트에 대한 검색을 지원한다.

실험 결과

연구 질문

  • RQ1첫 토큰 불확실성이 프롬프트링 및 예시 선택에 대한 전반적 작업 이해를 신뢰성 있게 나타낼 수 있는가?
  • RQ2첫 토큰 불확실성(LSFU)에 라벨 priors를 도입하면 엔트로피 기반 측정에 비해 보정이 개선되는가?
  • RQ3UCPOF가 항상 작동하는 전체 RAG와 비교하여 검색 사용량을 줄이면서 정확도를 유지하거나 개선할 수 있는가?
  • RQ4동적 검색 트리거가 분류 작업의 추론 비용과 성능에 어떤 영향을 미치는가?

주요 결과

  • LSFU는 고주파 클래스의 가중치를 낮추고 롱테일 위험을 강조하여 프롬프트 최적화 신호를 향상시킵니다.
  • LSFU를 통한 Gold Shot 예시 선택은 무작위 또는 유사도 기반 선택보다 더 안정적이고 집중된 정적 프롬프트를 제공합니다.
  • UCPOF는 few-shot 베이스라인 대비 평균 정확도를 6.03% 증가시키고 항상 작동하는 전체 RAG를 능가하며 전반적인 정확도 5.75% 향상을 달성합니다.
  • UCPOF는 검색 트리거 비율를 50.66% 줄여 고불확실성 샘플에 대해서만 적응적 검색을 가능하게 하고 계산 비용을 감소시킵니다.
  • 이 프레임워크는 오프라인 정적 프롬팅과 온라인 동적 보정을 결합하여 최첨단 성능을 유지하면서 추론 비용을 낮춥니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.