⚠️ INTERNAL TESTING — This project is in active R&D. Not a public product. For rapid42 team use only.
Cortex is our internal research into proving a simple hypothesis: a small model with deep codebase context can outperform frontier cloud models on domain-specific tasks — at zero marginal cost.
$ python experiments/runner.py
━━━ Brief 08 (EventEmitter) ━━━
RAG context: 12,341 chars patterns
Pass 1 done: 187 lines
Pass 2: reviewing...
✓ Brief 08 (21/21) — 100%
→ Baseline: 172/175 (98.3%)
What we're building
Cortex indexes your entire codebase into a local vector database, then uses semantic search to inject the most relevant patterns into every generation — so the model produces code that fits your project, not a generic template.
No API calls. No data leaving the machine. No cost per query. Running on consumer hardware.
Multiple specialised retrieval experts (code patterns, errors, docs) feed context to a small local model.
10 real coding briefs with 175 acceptance tests the model never sees. Every claim is a number.
Qdrant + Ollama/MLX on-device. Zero telemetry. Works air-gapped. IP stays yours.
Benchmark results
Running on Qwen3.5-4B via RTX 4090. Sealed acceptance tests. 10 briefs, 175 test cases.
Same sealed briefs, same acceptance tests
Qwen3.5-4B · RTX 4090 · ~0¢/query
Anthropic API · ~$0.03/query
Same model, no RAG — raw baseline
The hypothesis holds. Small model + deep domain context ≥ frontier model with no context. At near-zero marginal cost.
Roadmap
Qdrant vector index of codebase. nomic-embed-text embeddings. Retrieval working end-to-end.
Multi-pass generation, self-check loop, task router, re-retrieval on failure. 96.6% on sealed tests.
Agent remembers successful generations. Gets better with every project it works on.
Docker, config, README. Deployable by any engineering team. Open or closed source TBD.
Context
Cortex is not a product yet. It's a research bet: can we build AI infrastructure that makes our engineering team faster without depending on cloud providers or paying per-token? The benchmark numbers suggest yes.