Breaking complex research into verifiable reasoning — like light through a prism.
A production-grade agentic research system built on the Recursive Language Model paradigm (Zhang, Kraska, Khattab — MIT, Dec 2025). PRISM processes 1M+ token research corpora with full audit trails, using Claude Sonnet as root model and Qwen3-8B as local sub-LM.
User Query
│
▼
┌──────────────────────────┐
│ Root Model (Claude) │ ← Decomposes via Python REPL
│ Writes code that calls │
│ sub-LM + processes │
└──────────┬───────────────┘
│
┌──────┼──────┐
▼ ▼ ▼
Qwen3 Qwen3 Qwen3 ← Sub-LM calls (10-50 per query)
-8B -8B -8B via vLLM (local, zero cost)
│ │ │
└──────┼──────┘
▼
┌─────────────┐
│ Synthesise │ ← Root merges sub-results
└──────┬──────┘
│
┌──────┴──────────┐
│ Qdrant │ Langfuse │ ← Vector search + 100% tracing
└────────┘─────────┘
- Recursive decomposition via RLM paradigm — root model writes executable Python that orchestrates sub-LM calls
- 1M+ token processing — iterative chunking and synthesis handles corpora far beyond any single model's context window
- 100% step tracing — every REPL iteration, sub-LM call, and code execution logged to Langfuse
- Hybrid search — Qdrant with dense (BGE) + sparse (SPLADE) embeddings and Reciprocal Rank Fusion
- RAGAS evaluation — faithfulness, answer relevancy, factual correctness benchmarked against GPT-4o baseline
- Zero-cost sub-LM — Qwen3-8B served locally via vLLM with PagedAttention
git clone https://github.com/your-username/prism-research-agent.git
cd prism-research-agent
pip install -e ".[dev]"
cp .env.example .env # Fill in your API keys# Start Qdrant (vector store)
docker compose -f docker/docker-compose.yml up -d
# Start Qwen3-8B sub-LM (requires GPU)
vllm serve mit-oasys/rlm-qwen3-8b-v0.1 --port 8000 --dtype auto# Ingest a paper
python -m src.agent --query "What is the RLM paradigm?" --corpus-ids 2512.24601
# Launch the Gradio demo
python -m frontend.app# PRISM benchmark
python -m src.evaluation.benchmark --questions data/benchmark/questions.json
# GPT-4o baseline comparison
python -m src.evaluation.baseline --questions data/benchmark/questions.json| Component | Technology |
|---|---|
| Core paradigm | rlms — Recursive Language Model library |
| Root model | Claude Sonnet 4 |
| Sub-LM | Qwen3-8B via vLLM (local) |
| Tracing | Langfuse |
| Vector search | Qdrant (hybrid search) |
| Evaluation | RAGAS |
| Document parsing | Unstructured.io |
| Frontend | Gradio |
src/
├── agent/ # Root model orchestration + RLM pipeline
├── sub_lm/ # vLLM client for Qwen3-8B
├── ingestion/ # arXiv → PDF parsing → Qdrant indexing
├── evaluation/ # RAGAS metrics + benchmark runner
├── training/ # Phase 2: RL post-training (planned)
└── tracing/ # Langfuse setup + decorators
Post-train Qwen3-8B with GRPO reinforcement learning to learn recursive decomposition as a native behaviour, replacing root-model-driven orchestration with self-directed recursion.
MIT