Librarian and Skill Injection: Grounding Autonomous Reasoning

Autonomous mathematical reasoning requires grounding in established academic literature and the ability to utilize specialized proof techniques. We have implemented the Librarian and Skill Injection frameworks to provide this grounding and strategic depth.

The Librarian: Literature Grounding via LanceDB

The Librarian component facilitates the retrieval of relevant academic context from a local vector store (LanceDB). This store indexes a curated corpus of mathematical abstracts and full-text papers, particularly in the domains of extremal combinatorics and analytic number theory.

During implementation, we addressed several filesystem resolution challenges within the bun runtime. Specifically, we resolved issues where import.meta.dir evaluated to internal virtual paths, preventing database initialization. By transitioning to process.cwd() based resolution, we ensured consistent access to local literature stores across diverse execution environments. The current corpus includes over 240 high-signal arXiv abstracts, providing a robust foundation for strategic planning.

Skill Injection Framework

To reduce reliance on the latent mathematical knowledge of model weights, we developed a structured SkillLibrary. This system indexes over 30 formalized mathematical techniques, including pigeonhole_principle, explicit_construction, and spectral_graph_bounds. These skills are stored as structured markdown in the .agents/skills/ directory.

The orchestration Hub utilizes semantic relevance matching to identify the most appropriate techniques for a given conjecture. These skills are then injected into the model context, providing a grounded basis for Directed Acyclic Graph (DAG) formulation and Monte Carlo Tree Search (MCTS) verification. This ensures that the Architect's planning phase is informed by rigorous mathematical frameworks rather than generic reasoning patterns.

Universal Domain Support

The integration of the Librarian and SkillLibrary has enabled Perqed to transition from specialized solvers to a generalized reasoning platform. We have successfully demonstrated this by evaluating Schur Number lower bounds, where the Architect was required to dynamically generate evaluation logic for arbitrary partitions. The Librarian provided the necessary historical context, while Skill Injection provided the strategic framework for the search.

By combining literature-based grounding with formalized skill retrieval, we ensure that Perqed's research output is both novel and mathematically rigorous.