TL;DR
While LLM agents excel at general software engineering tasks, they frequently stumble on domain-specific codebases because they lack "tacit knowledge"—the unwritten business rules, interface contracts, and conventions that human developers internalize through experience. This paper introduces PRAXIS, a framework that extracts this hidden knowledge by letting agents practice coding within a target repository, organizes it using a code dependency graph, and proactively injects it during inference to significantly boost code generation accuracy.
What Problem Does This Paper Address?
When dropped into a specialized, real-world repository, even state-of-the-art LLM agents experience a sharp decline in performance. The authors discover that even if you provide the agent with the exact source code of all necessary dependencies, it still fails to generate correct code.
The root cause is a lack of tacit knowledge. This includes project-specific nuances—like knowing a text chunk must be augmented with a specific prompt template before embedding, or that a callback must be registered to a shared model router (see Figure 2)—which are rarely documented in comments or readmes.
Tacit knowledge is uniquely difficult for AI to grasp because it is:
- Latent: It only surfaces during actual development and error handling.
- Structurally Dispersed: It spans across multiple components and propagates along dependency paths.
- Invisible to the Ignorant: An agent lacking this knowledge doesn't realize it's missing, meaning it will never think to search for it.
Methods
PRAXIS addresses the extraction, representation, and reuse of tacit knowledge through a four-stage pipeline:
- In-Domain Development Practice (Offline): The agent simulates a human developer by actively trying to implement core functions within the codebase. It uses automatically generated test inputs and differential testing (comparing its code's behavior against the ground-truth implementation) to intentionally trigger errors and surface hidden constraints.
- Structured Knowledge Acquisition (Offline): The agent's trial-and-error trajectories are distilled into structured "knowledge units" formatted as a procedural memory 4-tuple:
(trigger, content, evidence, confidence). - Graph-Grounded Knowledge Organization (Offline): Instead of saving these units in a flat text file, PRAXIS anchors them to specific nodes on the codebase's code dependency graph. It propagates the knowledge along edges (both upstream to callers and downstream to callees) to preserve cross-component constraints, followed by deduplication and conflict resolution.
- Tacit Knowledge Injection (Online): Because the agent won't actively search for what it doesn't know it lacks, PRAXIS proactively injects relevant knowledge units into the prompt context. This happens at task initialization (caller-side constraints) and dynamically whenever the agent interacts with tools like code search or file reading.
Additionally, the system supports Online Knowledge Evolution, updating the confidence scores of knowledge units based on whether real-world tasks succeed or fail.
Datasets
The authors evaluated PRAXIS on two major benchmarks:
- KoCo-Bench: The primary benchmark for domain code generation, spanning 11 software frameworks and 25 real-world projects across domains like Reinforcement Learning, RAG, and Model Optimization.
- AInsteinBench: A large-scale domain benchmark used to test transferability to repository-level bug-fixing tasks across 6 production scientific codebases (e.g., Qiskit, AMReX, OpenMM).
Key Insights and Ideas
- Active Failure Beats Passive Reading: Simply reading or summarizing a codebase statically yields negligible improvements (+4.8%). True domain knowledge is only exposed when an agent tries to write code, breaks something, and is forced to fix it via differential testing.
- Push, Don't Pull: Traditional RAG frameworks rely on the agent "pulling" information via queries. PRAXIS flips this by "pushing" knowledge contextually based on the code entities the agent touches, bypassing the agent's cognitive blindspot.
- Graph-Based Propagation: Knowledge in software engineering isn't isolated. By mapping knowledge to a dependency graph, a rule discovered while practicing on Function A automatically safeguards Function B if Function B calls Function A.
Key Results
- State-of-the-Art Performance: On KoCo-Bench, PRAXIS achieved an average Pass@1 of 32.06%, significantly outperforming the baseline OpenHands agent (19.08%) and SOTA evolution-based methods like Trace2Skill (25.19%).
- Compute Scaling: The framework exhibits a clear scaling property: the more functions the agent practices on offline, the higher its downstream performance climbs during inference.
- Cross-Task Generalization: Without any modifications, PRAXIS transferred successfully to repository-level bug fixing on AInsteinBench, raising the resolution rate from 27.2% to 31.2% and solving cheminformatics tasks that baselines failed entirely to resolve.
- High-Quality Extraction: Human developers rated the extracted knowledge highly, scoring content truthfulness at 4.28/5 and trigger accuracy at 4.24/5.
Limitations and Future Work
- API Cost Constraints: Due to the high cost of LLM APIs, the authors could not perform an exhaustive hyperparameter search.
- The Simulation Gap: While effective, simulating human workflows with an agent might still leave a minor gap compared to how real human developers internalize knowledge over years of project contribution.
- Codebase Complexity: While tested across diverse domains, the benchmarks may not fully mirror the extreme scale and architectural messiness of massive, multi-decade enterprise legacy systems. The authors plan to extend PRAXIS to more diverse domains in future work.
Summary updated