arXiv(opens in a new tab)cs.CVOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.19475

ActICL: Post-Training for Agentic Multimodal In-Context Learning

Yanshu Li, Ruixiang Tang, Junyi Jessy Li, Elias Stengel-Eskin

ABSTRACT

Multimodal in-context learning (ICL) is an important capability of multimodal large language models (MLLMs). Its performance is closely tied to the demonstrations it uses, making demonstration retrieval a core problem in many ICL-based systems. Common methods use fixed scoring methods to retrieve all the demonstrations at once, which may introduce redundancy and noise. Context-aware retrieval methods have emerged to address this problem by allowing incremental retrieval based on a growing context. However, none of them lets the MLLM itself learn how to judge what new demonstrations it needs through its reasoning and then carry out progressive retrieval on its own. To this end, we introduce ActICL, a framework that trains an MLLM agent to acquire and use an ICL context via tool-augmented reasoning. ActICL builds an agent that analyzes its own information gaps during iterative reasoning and tool-use actions. Based on these gaps, it performs targeted retrieval to acquire a set of initial candidates. It can then use the existing context to further filter the candidates and refine the context, or it can iteratively perform a new retrieval. When the agent judges that the context is sufficient for the task, or when the resource limit is reached with the user request met, it sends the acquired context to an answering model, either the agent itself or another MLLM. We use a two-stage post-training procedure that jointly optimizes the agent's acquisition and answering. With an adaptive number of demonstrations, ActICL improves average performance by 11.6 percentage points over standard similarity-based retrieval across seven benchmarks and three MLLMs, and by 4.4 points compared to the strongest prior baseline. The contexts acquired by ActICL agents can also be used effectively by frontier models. When GPT-5.6-Sol performs 4-shot ICL, ActICL's contexts improve its performance by 3.5 points over standard retrieval, averaged over three benchmarks. Project page: https://kaamava.github.io/acticl-project-page/.

1 INTRODUCTION

Multimodal in-context learning (ICL) enables multimodal large language models (MLLMs) to adapt to new tasks from demonstrations provided at inference time (Alayrac et al., 2022), but its effectiveness depends heavily on whether these demonstrations form a context that helps the model solve the query (Tan et al., 2024; Baldassini et al., 2024). Most retrieval-augmented ICL systems retrieve in a single step: they score each demonstration in an external bank independently, by embedding similarity (Li et al., 2023; Chen et al., 2023) or a probability-based score (Wu et al., 2023; Peng et al., 2024), and keep the top-ranked ones. Although efficient, this can yield noisy or otherwise suboptimal contexts (Levy et al., 2023). For instance, similarity-only retrieval can reduce diversity and induce shortcut learning driven by dominant features (Li et al., 2023).

Thus, recent work has explored context-aware retrieval. Trained selectors estimate the utility of a demonstration conditioned on the current context (Yang et al., 2023; Allabadi et al., 2026; Lee et al., 2026), but their implicit scoring functions are tied to their training distributions and generalize poorly to unseen tasks. Agentic workflows prompt a strong MLLM to adjust the context before passing it to an answering model (Fu et al., 2025a). They bring reasoning into context construction but, as inference-time solutions, never learn from feedback what makes a context useful. Multimodal search agents do combine training with reasoning-based tool use (Wu et al., 2026a; Geng et al., 2026), but gather evidence that directly answers the query. Constructing ICL contexts instead requires assessing

Figure

Figure 1: Given a multimodal query, we seek to construct a context with demonstrations that helps an MLLM answer the query correctly. Prior work has largely (a) used off-the-shelf similarity-based retrievers, which often return redundant demonstrations, or (b) trained context-aware retrievers, which can fail to generalize at test time. Our approach (c), ActICL, treats ICL context construction as an iterative agentic task, training an agent to formulate complex search queries, process and filter retrieved evidence, and decide when to submit a context to an answering model.

the instructional value of input–output demonstrations: whether each clarifies the query’s task and what it adds beyond the current context. This motivates our central question: How can we train an MLLM to adaptively acquire useful context for agentic multimodal ICL, guided by its own reasoning and evolving information needs?

To address this question, we introduce ActICL, the first framework that trains an MLLM-based agent to construct and use a multimodal ICL context. As shown in Figure 1, the agent interleaves reasoning with four tool-use actions (search, read, curate, and solve) to retrieve and inspect demonstrations, revise its context, and commit it. During context acquisition, the agent decides whether to retrieve based on the test query and the demonstrations it has already inspected, obtaining new demonstration previews from the bank via search. Once enough candidates have been retrieved, the agent calls read to obtain the full content of key candidates. The curate action then lets it filter these demonstrations and update the context. Finally, when the agent adaptively considers the context sufficient, it invokes solve to commit it. To implement ActICL, we first design a pipeline that constructs training data covering diverse multimodal tasks with heterogeneous demonstration banks, exposing the agent to task-relevant demonstrations, distractors, and redundant information. On this dataset, we jointly optimize context acquisition and answering through a two-stage post-training procedure of rejection-sampling supervised fine-tuning (SFT) and reinforcement learning (RL), with rewards that combine answer quality and resource penalties.

We train ActICL agents with three different MLLMs as backbones: Qwen3-VL-8B, Qwen3-VL-30B-A3B, and Qwen3.5-9B, and evaluate on seven benchmarks. Broadly, we find that ActICL improves performance across tasks and models. When the same ActICL-trained agent constructs the context and answers, ActICL improves accuracy over standard similarity-based retrieval by 10.2 and 11.6 percentage points in the 4-shot and adaptive-shot settings, averaged across models and benchmarks. It also surpasses the strongest post-training-based baseline, ProMSA (Wu et al., 2026b), by 3.0 and 4.4 points. Moreover, we find that joint training also strengthens the model's internal ability to use multimodal context. With fixed ICL and interleaved image-text prompts, ActICL outperforms LoRA fine-tuning tailored to these tasks by 2.2 percentage points. Finally, we find that ActICL agents can act as retrievers for stronger models. When constructing contexts for frontier models such as GPT-5.6-Luna and GPT-5.6-Sol, the ActICL agent built upon Qwen3.5-9B outperforms ContextNav (Fu et al., 2025a), a test-time retrieval agentic workflow powered by Gemini3.5-Flash, by 2.1 points on average. In our ablation studies, we show that ActICL has a better marginal gain when adding more demonstrations, and that both stages of post-training are necessary. Together, these results show that reasoning-based training for context construction improves both context acquisition and utilization, with benefits that extend to broader ICL systems.