Learn to build the context Preprint · 2026

ActICLPost-Training for Agentic
Multimodal In-Context Learning

Learn what to retrieve. Decide what to keep.

Yanshu Li1Ruixiang Tang2Junyi Jessy Li1Elias Stengel-Eskin1

1 University of Texas at Austin2 Rutgers University

+11.6 pp

over similarity-based retrieval

+4.4 pp

over the strongest prior baseline

7 × 3

benchmarks × model backbones

Average gains in the adaptive setting, compared with 4-shot MMICES and ProMSA, respectively.

A useful context is built.
One decision at a time.

Follow an agent as it finds a missing skill,
revises its examples, and gets ready to answer.

An illustrated walkthrough01 / 06
The query

When did online sales
grow the most?

Illustrative online and store salesOnline sales: 20 in 2019, 35 in 2020, 40 in 2021, 50 in 2022. The largest year-over-year percentage growth is 75 percent in 2020. Store bars are shown for contrast.2019202020212022
OnlineIn-store

Find the largest percentage increase over the previous year.

Answer2020 ✓(35 − 20) / 20 = 75%
ActICL agentIdentify the gap
The next decision

A similar-looking chart is a start. Which examples will teach the skills this question needs?

Demonstrations0 retained
01

Series mapping

Which color is online?

Candidate
02

Value reading

How tall is one bar?

Candidate
07

Percentage growth

Read values. Compare change.

Not retrieved yet
Retained context
Waiting for useful examples…
Start with the information gap.The agent reasons about what its current context is missing.

Illustrative reconstruction of the chart example in Figure 1, using simplified chart values. This walkthrough is not a live model run or a measured prediction.

01 / The question

Which examples
actually help?

Multimodal in-context learning depends on its demonstrations. Visual similarity alone can return examples that repeat the same skill—or miss the one the query needs.

ActICL learns to acquire and use the context. The agent reasons about its information gaps, searches with targeted goals, inspects candidates, and revises its examples before answering.

One-pass retrieval

Retrieve once.
Keep the nearest examples.

Each demonstration is scored independently of the context being built.

Query→Top-k→Answer
Agentic acquisition

Reason, inspect,
and revise the context.

Each decision responds to what the agent has already learned.

Query→Reason ↔ Tools→Answer
See the paper’s overview figure
Figure 1 contrasts standard retrieval, trained context-aware retrieval, and ActICL's iterative search, read, curate, and solve loop.
Figure 1 · From similarity-based retrieval to reasoning-guided context construction. Open PDF ↗

02 / The method

Four tools.
One evolving context.

The agent decides what to search for, what to inspect, what to retain, and when the context is ready.

01
⌕

search

Formulate a retrieval goal. Receive compact candidate previews through visual, textual, or joint retrieval.

Candidate previews
02

read

Inspect a promising candidate. Reveal its complete input–output demonstration, including the target answer.

Full demonstrations
03

curate

Add useful demonstrations and remove redundant ones. Read examples remain available for later reuse.

A revised context
04

solve

Commit a context that meets the request and budgets. Pass it to the same model or another answering model.

A context ready to use

Learn to acquire.
Learn to answer.

Two stages of post-training jointly improve
context construction and context use.

Stage 01 / Supervised fine-tuning

Learn from successful trajectories.

Rejection sampling retains valid, budget-compliant acquisitions with correct answers. Supervision covers both the tool-use trajectory and its answer.

4ktrajectory–answer pairs
per backbone
Stage 02 / Joint reinforcement learning

Optimize what makes a context useful.

Acquisition learns from answer quality minus resource costs. Answering learns to use the acquired context, with separate advantages and shared parameters.

Answer quality−Context cost−Acquisition cost
ActICL framework: an agent reasons over a multimodal query and budgets, uses search, read, and curate to update context, commits it with solve, and learns through SFT and joint RL.
Figure 2 · The complete acquisition and post-training framework.Open PDF ↗

03 / The evidence

Better context.
Stronger answers.

Explore results across seven benchmarks.
Compare fixed 4-shot and adaptive acquisition.

Adaptive · Qwen3.5-9B

ActICL chooses its demonstration count. All retrieval baselines use four demonstrations.

Average benchmark score

Higher is better
Explore all seven benchmarks
Table 1 · Qwen3.5-9B · scores in percent
MethodTextVQAMME-RCharXivGVLMathVisionMDK12VL-ICLAvg.

Scores are shown as percentages from Table 1; gains are percentage points (pp). Fixed 4-shot controls demonstration count, not total inference cost. Adaptive ActICL uses 3.54 demonstrations on average across the main experiments.

Beyond the trained backbone

A smaller agent.
Context for frontier models.

ActICL’s Qwen3.5-9B agent can supply demonstrations to a separate answering model. In this experiment, the answering models stay fixed.

+3.5 pp

on GPT-5.6-Sol over MMICES
Three-benchmark average · 4-shot

Table 3 · 4-shot · scores in percent
Context builderPerception
Bench
MindCubeMMMU-Pro

ContextNav uses Gemini3.5-Flash as its policy; ActICL uses Qwen3.5-9B. Model names follow the paper.

04 / What makes it work

Acquisition and answering.
Stronger together.

Ablations separate the value of the training stages
and the decisions inside the acquisition loop.

Both training stages matter.

Table 4

Qwen3.5-9B, adaptive setting. Average score on MME-R, CharXiv, and MathVision. Bars use a shared 0–100 scale.

−2.8 pp

Goals need to evolve.

Replacing the agent’s retrieval goals with a fixed query-based goal reduces the average score.

+2.2 pp

Context use improves, too.

With externally supplied contexts, ActICL outperforms LoRA on average across the evaluated ICL and interleaved image–text settings.

05 / Citation

Build on ActICL.

@article{li2026acticl,
  title={ActICL: Post-Training for Agentic Multimodal In-Context Learning},
  author={Li, Yanshu and Tang, Ruixiang and Li, Junyi Jessy and Stengel-Eskin, Elias},
  journal={arXiv preprint arXiv:2610.19475},
  year={2026}
}