Abstract
AI systems, including LLM-based agents, often construct prompts from retrieved memories or few-shot demonstrations. Measuring how individual context items and their combinations affect performance supports regression testing, debugging, and attribution. For n candidate items, a complete analysis may require scoring all 2^n subsets. Existing methods pursue related but different objectives. Selection methods return only a small number of subsets, while reconstruction methods estimate missing scores under structural assumptions. Compression methods identify repeated information after the scores are available. These approaches do not directly address whether an observed score can replace a new evaluation while the score table is being acquired. We study this question using frozen few-shot demonstrations in a controlled, single-turn code-generation setting. We introduce the Audit-Gated Evaluation Scheduler (AGES) to reduce this cost. AGES uses score agreement on small subsets to propose reuse, then audits the proposal on larger subsets before copying any score. If the audit finds a mismatch, AGES retains all observed scores and evaluates every remaining subset. The fallback completes the table exactly without discarding previous evaluations. We evaluate AGES through offline replays of score tables obtained with deterministic Qwen2.5-Coder generation. With a shared demonstration pool, the frozen procedure reduces simulated unique score reads by 4.2% on LeetCodeDataset and 16.2% on 588 query-disjoint MBPP+ model–query score tables, compared with exhaustive evaluation. On MBPP+, 0.026% of copied scores are incorrect, and the selected subset attains a true maximum in all 588 tables.