KACE: Knowledge-Adaptive Context Engineering for Mathematical Reasoning

summary

Video file (mp4)

The gist

The gist The KACE framework introduces Knowledge-Adaptive Context Engineering, which separates learned knowledge storage from active prompt usage through an epistemic and difficulty-based demarcation

In short

KACE introduces Knowledge-Adaptive Context Engineering, a method to improve frozen language models for math by managing learned knowledge. It creates a structured knowledge base of typed cards stratified by problem difficulty and domain. This allows the system to dynamically select only relevant knowledge based on the problem's specific needs, outperforming fixed context strategies.

Key concepts

Knowledge-Adaptive Context Engineering (KACE)
KACE is a framework that separates stored knowledge from active prompt usage. It uses an epistemic and difficulty-based system to decide how much inference to spend and which learned knowledge cards to show during problem solving, ensuring only relevant information is used.
Epistemic Tree (Knowledge Base)
This is the structured storage system for learned knowledge. Instead of a single context, KACE builds a tree where each node represents a specific piece of knowledge (a typed card). These cards are organized hierarchically based on the difficulty tier and domain they relate to, allowing for targeted retrieval.
Tiered Self-Consistency
This is the mechanism used to classify problems as easy, medium, or hard. It uses escalating agreement gates (e.g., 2/2 agreement for easy problems) to determine the problem's difficulty level and then directs the system to read only the corresponding branch of the knowledge tree.
Offline Construction Loop
This is how KACE learns from training data without needing gradients. It distills failed training traces into residual sets, which are then used by a teacher-reflection operator to propose and refine compact knowledge cards, building the structured knowledge base.

Terminology used across episodes

This episode discusses

The paper

KACE: Knowledge-Adaptive Context Engineering for Mathematical Reasoning · Read on arXiv

Jayant Parashar, Suchendra M. Bhandarkar

University of Georgia

Context-engineering methods improve a frozen language model by learning text from execution feedback and placing it in the prompt. When one learned prompt carries everything that was learned, irrelevant lessons compete with relevant ones, and the system can keep only what fits in that prompt. We present Knowledge-Adaptive Context Engineering (KACE), which decides per problem both how much inference to spend and which learned knowledge to show. A fixed tiered self-consistency schedule (2, 3, then 5 samples behind agreement gates) lets easy problems exit after two agreeing samples, and the tier at which a problem exits serves as its difficulty label. Offline, a teacher-guided learner distills failed training traces into short typed cards kept in a store partitioned by difficulty tier and domain, and each escalated tier reads only the cards of its (tier, domain) cell. On MATH-HARD, KACE reaches 77.3% against 72.7% for Best-of-5 self-consistency with fewer solver calls, and it scores above tiered ACE (70.0%) and tiered GEPA (72.0%). It also achieves the highest accuracy on AIME 2025 (61.1% against 53.3% for Best-of-5 and 57.8% for tiered GEPA) and on OlymMATH-EN (48.1%). A component analysis shows that the store adds 4.0 points on MATH-HARD and 3.7 on OlymMATH-EN over the tiered schedule alone, and that the (tier, domain) reading rule outperforms every alternative rule for choosing cards from the same store.

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "KACE: Knowledge-Adaptive Context Engineering for Mathematical Reasoning".

Jane: The gist The KACE framework introduces Knowledge-Adaptive Context Engineering, which separates learned knowledge storage from active prompt usage through an epistemic and difficulty-based demarcation to improve mathematical reasoning.

Tom: First, who's behind it and why it matters.

Paper summary: Tom: So we're looking at Knowledge-Adaptive Context Engineering for Mathematical Reasoning, or KACE today. Basically, the paper is tackling how to make these frozen language models better at math without having to update their weights.

Jane: That makes sense because when you just pile all the feedback into one big prompt, you run into context bloat where irrelevant stuff crowds out the useful information that actually helps with a specific problem.

Tom: Exactly. The authors introduce KACE which separates what's learned across all runs from what gets used in the actual prompt based on both difficulty and domain of the problem.

Lu: What's really interesting is their offline construction loop where they distill training traces into an epistemic tree, which is like a knowledge base of typed cards categorized by problem difficulty and epistemic domain.

Meng: So, it's not just dumping text in the prompt; it’s creating this structured resource where each card represents a specific reasoning aid like a lemma or an invariant, placed at the node corresponding to the failure that taught it.

Lalam: I see that they are using a teacher-guided learner offline to distill failed training traces into these cards, and each escalated tier in their tiered self-consistency schedule only reads the matching branch of this tree.

Jane: And at evaluation time, they use this tiered self-consistency procedure to classify problems as easy, medium, or hard through agreement gates that dictate how much inference to spend and which knowledge to show.

Tom: They’re using a fixed tiered self-consistency schedule with two, then three samples behind agreement gates for the easy tier, and five samples behind for the hard tier.

Meng: The key finding there is that this exit path acts as an empirical difficulty signal because the tier at which a problem exits serves as its difficulty label.

Lu: They show that on MATH-HARD, KACE reaches seventy-seven point three percent accuracy against seventy-two point seven percent for Best-of-five self-consistency with fewer solver calls, and it scores above tiered ACE at seventy point zero percent <ref:2606.00532#pg2,7% for Best-of-5>.

Jane: That’s a solid number because it shows that this structured approach actually outperforms other methods under comparable conditions, like the tiered GEPA which scores seventy-two point zero percent on MATH-HARD <ref:2606.00532#pg2>.

Tom: And they also achieved the highest accuracy on AIME two thousand twenty-five at sixty-one point one percent, compared to fifty-three point three percent for Best-of-five and fifty-seven point eight percent for tiered GEPA, and OlymMATH-EN at forty-eight point one percent.

Meng: The component analysis shows that just the store adds four point on MATH-HARD and three point on OlymMATH-EN over the tiered schedule alone compared to what they started with.

Lu: And the authors found that this tier domain reading rule outperforms every alternative rule for choosing cards from the same store, which is a big piece of evidence for their design choice.

Jane: So, looking at this paper, KACE introduces Knowledge-Adaptive Context Engineering by separating storage from usage using an epistemic and difficulty-based demarcation to improve mathematical reasoning.

Tom: It’s about taking that knowledge learned across many runs and turning it into a structured resource that the model only accesses when the problem's difficulty matches what we have stored.

Meng: It sounds like they are addressing the issue where monolithic context accumulation causes irrelevant lessons to crowd out useful ones, and KACE tries to solve that by being conditional about what context is active.

Lu: The offline construction loop is pretty deep; it involves an ADD phase where each block updates itself using only its own residuals based on proposed compact cards for missing lemmas or invariants.

Jane: It’s a self-reflective learning loop where they use failed traces to propose those missing pieces, and then a refinement phase applies the knowledge base K by keeping, editing, relocating, or deprecating existing cards.

Tom: I'm keen on the mechanism of how they distill those traces into typed cards stratified by problem difficulty and epistemic domain; that’s where the structure comes from.

Meng: What I worry about is scaling this offline construction loop; they mention a search-space limitation because operationalizing the search mechanism needed to scale LLM reasoning during context-based learning is still an open question.

Lu: They also flag that cross-benchmark transfer isn't automatic, meaning cards distilled from AIME style failure traces don't necessarily help on OlymMATH-EN.

Jane: It’s a fair limitation because the knowledge base is highly specific to the domain and difficulty it was trained on, so applying it elsewhere requires more effort.

Tom: So, in conclusion of this part of the discussion, KACE offers a structured alternative to monolithic playbooks by treating context engineering as the offline construction of an epistemic tree of typed knowledge cards consumed at test-time through a locked tiered self-consistency pipeline.

Meng: And that structure, organized along the axes of difficulty and domain, seems like it provides a durable, inspectable knowledge store that could be useful for higher stakes applications beyond just math benchmarks.

Lu: It moves the conversation away from trying to find one massive context window to figuring out how to condition access to a structured body of knowledge based on the problem's characteristics.

Jane: That’s the core idea, so moving toward a system where we only pull in exactly what is relevant and proven for that specific type of mathematical challenge.

Conclusion: Tom: So, we’re wrapping up on KACE, Knowledge-Adaptive Context Engineering for Mathematical Reasoning. It basically shows how to stop feeding models everything at once and instead create a smart system that decides exactly which learned knowledge to show based on the problem's difficulty and what kind of math it is.

Jane: That makes sense because when we look at these frozen language models, they can get overwhelmed by too much context, so KACE is about creating this structured way to use that knowledge.

Tom: Yeah, the authors are Pranjal Aggarwal and his team; they built this whole offline construction loop where they distill training failures into a knowledge base of typed cards.

Jane: So, the big idea is that instead of one giant instruction set for every problem, you have a library of specific mathematical facts or steps that you only pull out when the problem is hard enough to need them.

Tom: Exactly. It’s about separating the storage—that tree structure of knowledge—from the active prompt usage, so it stops irrelevant lessons from crowding out the important ones.

Jane: And what this means for people just listening is that we’re moving toward systems where they don't just rely on a huge chunk of text, but on a carefully selected set of proven steps tailored to how difficult the specific math problem is.

Tom: Right. It’s about making context engineering conditional instead of monolithic. And the paper shows this structure helps models get better performance on hard math tasks like MATH-HARD compared to just using a fixed Best-of-five approach without any learned knowledge at all.

Jane: So, it suggests that for these complex reasoning problems, we don't need more raw data or bigger models necessarily; we need smarter ways of organizing the existing knowledge so the model knows which piece to look at.

Tom: It’s about making context a structured resource rather than just a pile of text. And the authors are hinting that this structured knowledge store could be a really durable way for AI systems to learn and reason in higher stakes areas down the line.

Jane: That sounds like it points toward how we build more reliable AI, where what's learned is organized in a way that’s actually useful when things get tough.

Tom: Exactly. And next up, we’re going to look at some of the specific numbers and what those results mean for actual benchmarks on math competitions.

More episodes

← Home