paper-with-me

홈 › Papers

Efficient Prompting via Dynamic In-Context Learning

2023-05-18 · Wangchunshu Zhou, Yuchen Eleanor Jiang, Ryan Cotterell, Mrinmaya Sachan

The primary way of building AI applications is shifting from training specialist models to prompting generalist models. A common practice for prompting generalist models, often referred to as in-context learning, is to append a few examples (demonstrations) to the prompt to help the model better understand the task. While effective, in-context learning can be inefficient because it makes the input prompt much longer, consuming valuable space in the context window and leading to larger computational costs. In this paper, we propose DynaICL, a recipe for efficient prompting with black-box generalist models that dynamically allocate in-context examples according to the input complexity and the computational budget. To achieve this, we train a meta controller that predicts the number of in-context examples suitable for the generalist model to make a good prediction based on the performance-efficiency trade-off for a specific input. We then dynamically allocate the number of demonstrations for an input according to predictions from the meta controller and the given computation budget. Experimental results show that dynamic example allocation helps achieve a better performance-efficiency trade-off in two practical settings where computational resources or the required performance is constrained. Specifically, DynaICL saves up to 46% token budget compared to the common practice that allocates the same number of in-context examples to each input. We also find that a meta controller trained on a certain backbone model and tasks can successfully generalize to unseen models and tasks.

📄 PDF Abstract BibTeX arXiv:2305.11170

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context Learning

Similar Papers 제목 키워드 기반

Contextual Dynamic Prompting for Response Generation in Task-oriented Dialog Systems

2023-01-30 · Sandesh Swamy, Narges Tabari, Chacha Chen, Rashmi Gangadharaiah

Response generation is one of the critical components in task-oriented dialog systems. Existing studies have shown that large pre-trained language models can be adapted to this task. The typical paradigm of adapting such…

Response Generation

Program of Thoughts for Financial Reasoning: Leveraging Dynamic In-Context Examples and Generative Retrieval

2025-10-15 · Subhendu Khatuya, Shashwat Naidu, Pawan Goyal, Niloy Ganguly arxiv

Despite continuous advancements in the capabilities of large language models (LLMs), numerical reasoning remains a challenging area. Techniques like chain-of-thought prompting, tree-of-thought prompting, and program-of-t…

Retrieval augmented generation based dynamic prompting for few-shot biomedical named entity recognition using large language models

2025-07-25 · Yao Ge, Sudeshna Das, Yuting Guo, Abeed Sarker arxiv

Biomedical named entity recognition (NER) is a high-utility natural language processing (NLP) task, and large language models (LLMs) show promise particularly in few-shot settings (i.e., limited training data). In this a…

Prompt Engineering

Dynamic VLM-Guided Negative Prompting for Diffusion Models

2025-10-30 · Hoyeon Chang, Seungjin Kim, Yoonseok Choi arxiv

We propose a novel approach for dynamic negative prompting in diffusion models that leverages Vision-Language Models (VLMs) to adaptively generate negative prompts during the denoising process. Unlike traditional Negativ…

DynRank: Improving Passage Retrieval with Dynamic Zero-Shot Prompting Based on Question Classification

2024-11-30 · Abdelrahman Abdallah, Jamshid Mozafari, Bhawna Piryani, Mohammed M. Abdelgwad 외

This paper presents DynRank, a novel framework for enhancing passage retrieval in open-domain question-answering systems through dynamic zero-shot question classification. Traditional approaches rely on static prompts an…

Open-Domain Question AnsweringPassage RetrievalQuestion AnsweringRetrieval