|
1 | 1 | <div align="center"> |
2 | 2 |
|
3 | | -# 🧠 Epistemic Forge |
| 3 | +# 🧠 Epistemic Forge (v1.0.0-rc1) |
4 | 4 |
|
5 | 5 | [](https://www.python.org/downloads/) |
6 | 6 | [](LICENSE) |
7 | | -[](https://github.com/faresrafat3/arsenal-unified-master-pipeline) |
8 | | -[](docs/benchmark/BENCHMARK.md) |
| 7 | +[](https://github.com/faresrafat3/arsenal-unified-master-pipeline) |
9 | 8 |
|
10 | | -**Stop shipping confident mush.** |
11 | | -**Epistemic Forge is a Neuro-Symbolic State Machine for LLMs.** |
12 | | -Instead of chatty, unpredictable multi-agent systems that burn tokens, we use a deterministic L0–L6 pipeline. We enforce strict Toulmin-based Pydantic schemas at every node, allowing you to extract GPT-4 level deep tree-search and expert dialectics from any model with **100% predictable output shapes.** |
| 9 | +**A Neuro-Symbolic State Machine for LLMs.** |
13 | 10 |
|
14 | | -Turn messy research, philosophy, freelance, and Kaggle questions into **claim lattices** — structured arguments with evidence slots, objections, confidence, and next actions. |
| 11 | +Instead of chatty, unpredictable multi-agent systems that burn tokens, we use a deterministic **L0–L6 pipeline**. We enforce strict Toulmin-based Pydantic schemas at every node, allowing you to extract GPT-4 level deep tree-search and expert dialectics from *any* model with **100% predictable output shapes**. |
15 | 12 |
|
16 | 13 | </div> |
17 | 14 |
|
18 | 15 | --- |
19 | 16 |
|
20 | | -## 🛑 The Problem |
| 17 | +## 🚀 The 2026 SOTA Capabilities |
21 | 18 |
|
22 | | -Experts and freelancers constantly answer hard questions under uncertainty: |
23 | | -- A founder wants a **2-week research sprint** scoped *now*. |
24 | | -- A Kaggle teammate wants a **leakage-safe baseline**, not vibes. |
25 | | -- A seminar needs a **dialectic**, not a blog take. |
| 19 | +This engine was brutally refactored to represent the bleeding edge of AI research: |
26 | 20 |
|
27 | | -Default LLM / one-shot Q&A style fails the same way every time: smooth prose with hidden assumptions, no objections, and false precision. |
| 21 | +- 🌐 **Hermes Universal Routing:** Powered by `LiteLLM` and `Instructor`, you can swap the cognitive engine instantly. Use `openai/gpt-4o-mini`, `anthropic/claude-3-5-sonnet`, or `ollama/llama3` without changing a line of code. |
| 22 | +- 🧬 **ADAS (Automated Design of Agentic Systems):** If your query is too niche, the L1.5 layer dynamically programs a brand-new Pydantic Schema and Python Expert Class at runtime to solve it. |
| 23 | +- ⚖️ **Process Reward Models (PRM):** Our L3 Tree Search doesn't just guess. It uses an LLM-as-a-Judge to evaluate its own thoughts step-by-step, executing immediate rollbacks if it detects a logical fallacy (Test-Time Compute). |
| 24 | +- 🌍 **Live Empirical Grounding (Zero-Cost RAG):** Before reasoning, the system executes a live web search (via DuckDuckGo) to fetch the scientific consensus. **No confident mush. No hallucinations.** Every claim requires an `epistemic_warrant` and a `potential_falsifier`. |
| 25 | +- 🛡️ **Adversarial Self-Refine:** The L4 layer acts as a ruthless NeurIPS-level peer reviewer, aggressively critiquing the draft and forcing rewrites until it passes the threshold. |
| 26 | +- 💰 **Cognitive Economy Tracker:** Built-in Token Budgeting. If the system approaches your budget limit mid-search, it halts the expensive tree expansion and safely falls back to the crystallization phase. |
28 | 27 |
|
29 | | -## 🛠️ The Solution: Epistemic Forge |
30 | | -A local-first Python package (**no paid API required**) that implements a practical slice of the [ARSENAL](https://github.com/faresrafat3/arsenal-unified-master-pipeline) L0–L6 pipeline. It forces the LLM to construct a **Toulmin-anchored claim lattice** before generating an answer. |
| 28 | +## 🏗️ The L0-L6 Cognitive Architecture |
31 | 29 |
|
32 | | -### Key Features |
33 | | -- 📊 **Toulmin-Anchored Benchmark**: +199% overall quality vs baseline Q&A on 10 edge cases. |
34 | | -- 🔗 **Claim Lattices**: Maps claims, warrants, backing, and rebuttals automatically. |
35 | | -- ⚡ **Local-First CLI**: Fully functional directly from your terminal. |
| 30 | +1. **L0 / L1 (Optimizer):** Dynamic Meta-Prompting (OPRO-style) to generate task-specific instructions. |
| 31 | +2. **L1.5 (ADAS):** Self-Evolving expert injection. |
| 32 | +3. **L2 (Synthesis Engine):** Neuro-Symbolic experts (Hegelian Dialectic, Rigor Sentinel). |
| 33 | +4. **L3 (Tree Search):** PRM-guided Beam Search over analytical framings. |
| 34 | +5. **L4 (Crucible):** LLM-as-a-Judge Self-Correction loop. |
| 35 | +6. **L6 (AI Scientist Review):** Final academic grading and artifact crystallization. |
36 | 36 |
|
37 | | -## 🚀 Getting Started |
| 37 | +## 💻 Developer Experience (DX) |
| 38 | + |
| 39 | +We provide a frictionless, enterprise-grade developer experience. |
38 | 40 |
|
39 | 41 | ```bash |
| 42 | +# 1. Clone & Install |
40 | 43 | git clone https://github.com/faresrafat3/epistemic-forge.git |
41 | 44 | cd epistemic-forge |
42 | | -pip install -r requirements.txt |
43 | | -python main.py --query "Is RAG strictly better than Long-Context LLMs?" |
| 45 | +make install |
| 46 | + |
| 47 | +# 2. Run the Rich Terminal CLI |
| 48 | +export OPENAI_API_KEY="sk-..." |
| 49 | +make cli |
| 50 | + |
| 51 | +# 3. Or launch the Streamlit Web Dashboard |
| 52 | +make ui |
44 | 53 | ``` |
| 54 | + |
| 55 | +## 🤝 Contributing & Scientific Rigor |
| 56 | +We strictly enforce a `temperature=0.0` and `seed=42` across reasoning tasks to guarantee **Scientific Reproducibility**. |
| 57 | +Please see our [Contributing Guidelines](CONTRIBUTING.md) and [PR Template](.github/PULL_REQUEST_TEMPLATE.md) before submitting code. |
| 58 | + |
| 59 | +<div align="center"> |
| 60 | + <em>Built with precision — from Cairo to the open web.</em> |
| 61 | +</div> |
0 commit comments