Context-Grounded Skill Internalization for Vision-Language Agents

Ant Group · The University of Hong Kong · Shanghai Jiao Tong University · University of Oxford
* Project lead   ·   † Corresponding authors

After skill internalization, an agent may say it followed a skill even when no skill was provided at test time.

Test input

Task description.

No skill at test time.

Trained agent’s response

“According to the skills, …”

We systematically study this problem and show how to reduce such claims.

Scroll to explore the paper

Why does the agent cite a missing skill?

The agent uses a guide to solve the task.

A common training approach keeps the answer but removes the guide.

Context misalignment
The answer still cites a guide that is missing from the training input.

Skill internalization

The guide is gone.
Why cite it?

A common way to internalize a skill is to generate demonstration trajectories with the skill in context using the model itself, and then fine-tune the same model on them with the skill removed. It changes the training input but keeps the supervision target, so the model learns to reproduce what it wrote with the skill.

At test time, the trained agent can still say it consulted that guide. Our method, CGSI, corrects the training signal so the agent can use what it learned without crediting a guide it never received on this task.

Same task for both trained modelsALFWorld · First turn

Look at the laptop under the desk lamp.

Illustration of the desk and side table the agent can search.

At test time Both models see the room description and task. Neither receives a skill.

Baseline · after standard skill internalization
“According to the skills, I should first locate the desklamp since it’s likely on a desk or sidetable.”
Our method · after CGSI (Mask) training
“First, I should locate the desklamp, which is most likely on a desk or sidetable.”
First action in both runsgo to desk 1

Both complete the task. The CGSI agent explains where to search using what it knows about desk lamps.

Compare the third training method

CGSI (Rewrite) also chooses the desk. Its reasoning begins:

First, I should navigate to furniture that commonly hosts a desklamp, such as the desk or sidetable, …

From example to explanation

How a reference survives after the guide is removed.

Learn with a guide

During training, an agent gets a written guide called a skill. Its successful answers become examples for teaching it to act on its own.

Remove the guide

A common recipe removes the guide from each training input but keeps the answer. Phrases like “according to the skills” remain in the text the agent learns to produce.

Correct the example

Our method, CGSI, detects sentences that cite the missing guide. It skips those words when computing the training loss (Mask), or rewrites the sentence (Rewrite).

View the method diagramDetector training and context-grounded supervised fine-tuning workflow from the paper.

How often does skill removal leave unsupported references in successful demonstrations?

When the skill is removed, 18–75% of successful demonstrations contain at least one reference that loses its support. On ARC-AGI-1 with the 9B model, this happens in 1,721 of 2,281 successful trajectories.

Successful trajectories with an unsupported reference after skill removal
Qwen3.5ALFWorldWebShopARC-AGI-1
4B33.97%412 / 1,21364.79%322 / 49743.95%552 / 1,256
9B40.28%518 / 1,28618.34%104 / 56775.45%1,721 / 2,281

Can CGSI reduce CoMi while preserving task success?

Across six full-parameter settings, CGSI (Mask) reduces CoMi by 72.5–94.6% relative to SFT (skill dropped). On WebShop with Qwen3.5-4B, CoMi falls from 46.0% to 3.4%, while task success goes from 39.2% to 41.6%.

Qwen3.5-4B · Full-parameter SFT
MethodALFWorldWebShopARC-AGI-1
Success ↑CoMi ↓Success ↑CoMi ↓Success ↑CoMi ↓
Base39.41.56.80.62.000.00
SFT (skill kept)76.31.835.41.45.250.00
SFT (skill dropped)83.916.139.246.013.2515.75
CGSI (Mask)85.04.441.63.416.751.25
CGSI (Rewrite)85.41.837.413.29.751.25

Both metrics are percentages. CoMi counts test trajectories with at least one unsupported reference. All models are evaluated without the skill, on 274 ALFWorld, 500 WebShop, and 400 ARC-AGI-1 tasks.

Does it matter which sentences are masked?

On WebShop, random masking and CGSI mask the same number of sentences. The 4B agent still cites missing guidance in 49.4% of test trajectories after random masking, compared with 3.4% after detector-selected masking.

Test CoMi · WebShop, Qwen3.5-4B
SFT (skill dropped)No sentences masked
46.0%
Random masking893 sentences · 1.07% of tokens
49.4%
CGSI (Mask)893 sentences · 1.21% of tokens
3.4%

Full-parameter SFT. One run per configuration and one random draw.

How much CoMi remains after RL without the skill?

After 60 skill-free GRPO updates on ALFWorld and WebShop, task success improves from every initialization. Models initialized from SFT (skill dropped) still show CoMi in 8.4–35.2% of test trajectories, compared with 0.4–5.2% for the corrected initializations.

Task success (%) by number of GRPO updates
SFT initialization 0 10 20 30 40 50 60
SFT (skill dropped)83.985.089.490.592.094.293.4
VLM Audit (Rewrite)79.285.490.189.893.495.693.4
CGSI (Mask)85.089.190.194.994.596.096.4
CGSI (Rewrite)85.488.790.192.091.293.195.6
CoMi (%) before and after GRPO
SFT initialization Before RL After 60 updates
SFT (skill dropped)16.113.9
VLM Audit (Rewrite)1.50.4
CGSI (Mask)4.41.8
CGSI (Rewrite)1.80.4
Does asking the teacher not to mention the skill reduce CoMi in its demonstrations?

On 1,000 ALFWorld tasks, adding that instruction raises removal-induced CoMi from 38.9% to 51.9%. Some responses cite the prohibition itself:

“The system instructions say not to mention the skill or its contents in thinking.”