Configuration
Relevant source files
The following files were used as context for generating this wiki page:
- scripts/generate_knowledge_base.py
- knowledge/papers/devops-integration-with-capability-model-maturity-integration-a-systematic-mappi.json
- knowledge/techniques/capability-maturity-model-integration-cmmi-with-devops-practices.json
- knowledge/problems/code-quality-assessment.json
- knowledge/papers/milgrams-experiment-in-the-knowledge-space-individual-navigation-strategies.json
The CodeScholar project utilizes a multi-pass pipeline to transform raw paper metadata into a structured 3-layer knowledge architecture. Configuration within this system encompasses the parameters used to control the extraction of implementable knowledge, the orchestration of the generation pipeline, and the schema definitions for papers, techniques, and problem entry points. This configuration ensures that AI agents can consume research data effectively via a structured wiki.
Sources: scripts/generate_knowledge_base.py:1-25, scripts/generate_knowledge_base.py:915-940
Pipeline Orchestration
The knowledge base generation is configured as a four-pass process. Each pass is responsible for a different layer of the knowledge architecture, moving from deep extraction to cross-domain mapping.
Generation Passes
| Pass | Target Layer | Description |
|---|---|---|
| Pass 1 | Papers | Extracts deep structured knowledge from individual papers (GPT-4o). |
| Pass 2 | Techniques | Clusters papers to generate synthesized technique reference cards. |
| Pass 3 | Problems | Clusters techniques to generate problem entry point decision guides. |
| Pass 4 | Connections | Maps cross-domain connections for emergent discovery. |
Sources: scripts/generate_knowledge_base.py:11-20
Execution Flow
The following diagram illustrates the sequential dependency of the pipeline configuration:
The pipeline relies on the all_knowledge list, which is populated during Pass 1 and serves as the data source for all subsequent passes.
Sources: scripts/generate_knowledge_base.py:688-812
CLI Configuration Parameters
The generate_knowledge_base.py script provides various command-line arguments to configure the execution environment, model selection, and processing limits.
| Parameter | Type | Default | Description |
|---|---|---|---|
--model | string | gpt-4o | The OpenAI model used for knowledge extraction. |
--limit | integer | 0 | Limits processing to N papers (0 for all). |
--concurrency | integer | 5 | Number of concurrent API calls using ThreadPoolExecutor. |
--delay | float | 0.3 | Delay in seconds between API calls to manage rate limits. |
--min-papers-for-technique | integer | 1 | Minimum papers required to generate a technique card. |
--min-techniques-for-problem | integer | 1 | Minimum techniques required to generate a problem card. |
Sources: scripts/generate_knowledge_base.py:642-663
AI Extraction Configuration
Knowledge extraction is governed by highly specific "System Prompts" that configure the LLM's behavior. These prompts define the JSON schema and the "Senior Research Engineer" persona required for high-quality data extraction.
Paper Extraction Configuration
Pass 1 uses the PAPER_SYSTEM_PROMPT to configure the extraction of technical details, including algorithm steps, complexity, and implementation guides.
{
"problem_type": "Specific CS terminology (e.g., 'sequence classification')",
"technique_category": "optimization_algorithm, neural_architecture, etc.",
"method": {
"algorithm_steps": "3-8 steps in plain English",
"key_parameters": "Tunable parameters with typical values"
}
}
Sources: scripts/generate_knowledge_base.py:117-185
Technique Synthesis Configuration
Pass 2 uses the TECHNIQUE_SYSTEM_PROMPT to synthesize multiple papers. It configures the model to provide a "maturity" rating (e.g., experimental, proven, established) and an implementation skeleton.
Sources: scripts/generate_knowledge_base.py:321-365, knowledge/techniques/capability-maturity-model-integration-cmmi-with-devops-practices.json:81
Data Schema Configurations
The system identifies and categorizes information into fixed taxonomies defined within the internal JSON structures.
Problem Assessment Schema
Problems are configured with a decision_matrix and a start_here recommendation to guide users through different approaches.
| Field | Description |
|---|---|
you_have_this_if | Indicators that an engineer has this type of problem. |
decision_matrix | Comparison of techniques based on speed, memory, and accuracy. |
approaches | Detailed tradeoffs for specific techniques. |
Sources: knowledge/problems/code-quality-assessment.json:3-48, scripts/generate_knowledge_base.py:488-518
Paper Metadata Schema
The paper configuration includes identifiers for external access and internal classification.
Summary
The configuration of CodeScholar is centered on a structured pipeline that orchestrates LLM-based extraction and synthesis. By defining strict JSON schemas and persona-driven prompts, the system ensures that research papers are converted into a consistent, implementable format. This configuration allows for scalable knowledge base expansion while maintaining technical depth across various domains like Software Engineering and Machine Learning.