CodaCite Engineering Roadmap¶
This roadmap outlines the strategic evolution of the CodaCite engine, transitioning from a stable, unit-tested foundation toward a high-performance, multi-modal knowledge platform.
Phase 1: Stabilization & Manual Verification (UAT)¶
Before proceeding with new feature development, the core pipeline must be validated through "Real-World" stress testing.
Step 1: The "Real-World" Smoke Test¶
- Ingestion Stress Test: Upload a medium-sized document (10+ pages). Verify the
StructuralContextChunkerperformance and verify that VRAM-aware routing correctly selects the GPU/CPU/MPS device. - Factual Precision Check: Ask hyper-specific questions. Verify that the response includes verbatim quotes and correct
[n]citations. - Negative Constraint Check: Ask questions about non-existent information. Verify the fallback phrase: "The provided documents do not contain information about..."
- UI Citation Rendering: Ensure the frontend properly handles Server-Sent Events (SSE) and renders citation badges correctly.
Phase 2: Performance & Infrastructure Optimization¶
Focusing on the next set of computational bottlenecks identified during the stabilization phase.
Mission A: Graph/Entity Extraction Optimization¶
- Objective: Reduce the CPU overhead of zero-shot NER (GLiNER) and relationship mapping.
- Key Tasks: Implement efficient batching in
app/pipelines/extraction/, drop low-value chunks before processing, and optimize context window usage for relationship mapping.
Mission C: Global Summarization Tuning¶
- Objective: Optimize Map-Reduce logic for local 7B models.
- Key Tasks: Refactor
app/pipelines/ingestion/summarization.pyto use rolling summaries or high-density chunk batching to maintain low temperatures and fast generation times.
SurrealDB 3.x Migration¶
- Objective: Fully transition to O(1) RecordID fetching across all persistence nodes.
- Key Tasks: Audit existing
surrealqlqueries inapp/db/andapp/pipelines/to eliminate join latency.
Phase 3: User Experience & Visualization¶
Bridging the gap between backend intelligence and user-facing clarity.
Mission B: UI/UX Citation Guardrail Visualization¶
- Objective: Visually represent backend hallucination detection.
- Key Tasks: Update
index.htmlandstyle.cssto handle{"verified": false, "warning": true}payloads. Implement red citation badges or warning icons (⚠️) for unverified quotes.
Phase 4: Advanced AI Capabilities¶
Expanding the system's cognitive breadth beyond standard text-based RAG.
Phase 7: Multi-Modal Contextualization¶
- Objective: Integrate Vision-Language Model (VLM) capabilities into the RAG pipeline.
- Key Tasks: Enable processing of charts, diagrams, and images within PDFs using models like
Qwen2-VLorPixtral.
Entity Resolution Optimization¶
- Objective: Implement advanced Semantic Blocking and Cross-Encoder merge logic for "Modular Monolith" entity resolution.
- Key Tasks: Finalize the extraction and integration of the resolution logic into the main ingestion flow.
Execution Blueprints (SOPs)¶
The following blueprints represent verified implementation strategies for key infrastructure upgrades.
Blueprint: Dynamic VRAM Allocation for Docling¶
- Safe Torch Imports: Wrap
import torchintry/except. - Optimal Device Selection: Helper method to probe
torch.cuda(>1.5GB) ortorch.backends.mps. - Fallback: Default to
"cpu"with appropriate logging.
Blueprint: Local Generator Prompting & Depth¶
- System Prompt Hardening: Rule 4: "Do NOT output prefixes like 'Answer:' or 'Response:'."
- Context Expansion: Set
top_kto 6 for local models to ensure relationship intersection (e.g., Benjamin AND Peter). - Guardrail Resilience: Ensure
verified: Falseflags do not suppress text output in the UI.
Phase 5: Agentic Infrastructure & Engineering Excellence¶
Mission D: Persona & Rule Realignment¶
- Objective: Synchronize the Antigravity agent configuration with the Vertical Slice Architecture.
- Key Tasks:
- Update
.agents/rules/00-global-invariants.mdto strictly enforce feature slices and prohibit deprecated hexagonal directories. - Realign
.agents/rules/02-backend-architect.mdto targetapp/pipelines/exclusively. - Implement
.agents/rules/08-ingestion-engineer.mdto protect structural chunking integrity and character offset mapping.
- Update
Mission E: SurrealDB 3.x Pattern Standardization¶
- Objective: Optimize the developer experience for graph-based queries.
- Key Tasks:
- Update
.agents/rules/01-surreal-dba.mdwith the O(1) Direct ID Retrieval pattern. - Enforce strict typing for
RecordIDobjects in all pipeline queries.
- Update
Mission F: Autonomous Synchronization Workflow¶
- Objective: Automate repository-wide consistency audits.
- Key Tasks:
- Enhance
/sync-zensicalto perform autonomous slice discovery and navigation audits. - Integrate
uv run ruffanduv run mypychecks into the/commitworkflow to ensure zero-bypass policy enforcement.
- Enhance