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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ARCHAI Adaptive Assessment Engine
|
| 2 |
+
|
| 3 |
+
**SOTA-powered adaptive AI readiness assessment** β replaces static 12-question quizzes with intelligent, personalized testing that adapts to each user's ability level in real time.
|
| 4 |
+
|
| 5 |
+
π **Live API**: https://huggingface.co/spaces/Builder-Neekhil/archai-adaptive-engine
|
| 6 |
+
π **Frontend**: https://your-ai-arch.netlify.app (plug this engine in!)
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## What Makes This Different
|
| 11 |
+
|
| 12 |
+
| Feature | Static Quiz (v1) | Adaptive Engine (v2) |
|
| 13 |
+
|---------|------------------|------------------------|
|
| 14 |
+
| Question order | Fixed | **Fisher-information optimal** |
|
| 15 |
+
| Question count | Always 12 | **6β12 adaptive** (stops when precision is sufficient) |
|
| 16 |
+
| Scoring | Simple average | **Bayesian latent ability estimation** |
|
| 17 |
+
| Difficulty | Same for everyone | **Calibrated to each user** |
|
| 18 |
+
| Precision | None | **Standard error per dimension** |
|
| 19 |
+
| Learning path | Static recommendations | **Structured day/week/month actionables** |
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Architecture
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
βββββββββββββββββββ ββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ
|
| 27 |
+
β React Frontend ββββββΆβ FastAPI + IRT-2PL Engine ββββββΆβ Learning Path Gen β
|
| 28 |
+
β (your webapp) βββββββ β’ Bayesian Knowledge Tracingβββββββ (Day/Week/Month) β
|
| 29 |
+
βββββββββββββββββββ β β’ Fisher Info Selection β βββββββββββββββββββββββ
|
| 30 |
+
β β’ Precision-based Stopping β
|
| 31 |
+
ββββββββββββββββββββββββββββββββ
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
### Core Components
|
| 35 |
+
|
| 36 |
+
1. **2PL IRT Model** β Two-Parameter Logistic Item Response Theory:
|
| 37 |
+
- `P(correct|ΞΈ) = sigmoid(a Γ (ΞΈ β b))`
|
| 38 |
+
- `a` = discrimination (how well the question separates high/low ability)
|
| 39 |
+
- `b` = difficulty (calibrated to 6 maturity stages)
|
| 40 |
+
|
| 41 |
+
2. **Fisher Information Selection** β Next question maximizes information at the user's current ability estimate, minimizing measurement error.
|
| 42 |
+
|
| 43 |
+
3. **Bayesian Knowledge Tracing** β After each response, MAP estimate of latent ability ΞΈ is updated. Standard error tracks precision.
|
| 44 |
+
|
| 45 |
+
4. **Precision-Based Stopping** β Assessment stops early when all 6 dimensions achieve SE < 0.3 (β Β±3% confidence), saving user time.
|
| 46 |
+
|
| 47 |
+
5. **Structured Learning Paths** β Day-by-day micro-actions, week-by-week milestones, month-by-month strategic goals.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## API Endpoints
|
| 52 |
+
|
| 53 |
+
| Method | Endpoint | Description |
|
| 54 |
+
|--------|----------|-------------|
|
| 55 |
+
| `POST` | `/api/v1/session/start` | Initialize adaptive assessment |
|
| 56 |
+
| `POST` | `/api/v1/session/answer` | Submit answer, get next question |
|
| 57 |
+
| `GET` | `/api/v1/session/{id}` | Get current state or results |
|
| 58 |
+
| `POST` | `/api/v1/path/generate` | Generate learning path |
|
| 59 |
+
| `GET` | `/api/v1/questions` | Full calibrated question bank |
|
| 60 |
+
| `GET` | `/api/v1/health` | Health check + engine metadata |
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## Quick Start
|
| 65 |
+
|
| 66 |
+
### 1. Start Assessment
|
| 67 |
+
```bash
|
| 68 |
+
curl -X POST https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/session/start
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Returns:
|
| 72 |
+
```json
|
| 73 |
+
{
|
| 74 |
+
"session_id": "abc123",
|
| 75 |
+
"question": {
|
| 76 |
+
"id": "lit_3",
|
| 77 |
+
"dimension": "literacy",
|
| 78 |
+
"text": "Can you explain what a transformer architecture is...",
|
| 79 |
+
"options": ["No idea", "Vague understanding", "Can explain", "Can implement"],
|
| 80 |
+
"difficulty": 0.5,
|
| 81 |
+
"discrimination": 1.8
|
| 82 |
+
},
|
| 83 |
+
"progress": {"asked": 0, "total": 12, "dimensions_covered": []},
|
| 84 |
+
"status": "in_progress"
|
| 85 |
+
}
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
### 2. Submit Answer
|
| 89 |
+
```bash
|
| 90 |
+
curl -X POST https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/session/answer \
|
| 91 |
+
-H "Content-Type: application/json" \
|
| 92 |
+
-d '{"session_id":"abc123","question_id":"lit_3","option_index":2}'
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
Returns next adaptive question (or completion status).
|
| 96 |
+
|
| 97 |
+
### 3. Get Results
|
| 98 |
+
```bash
|
| 99 |
+
curl https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/session/abc123
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
Returns full profile with dimension scores, stage, archetype, strengths, gaps, and latent abilities.
|
| 103 |
+
|
| 104 |
+
### 4. Generate Learning Path
|
| 105 |
+
```bash
|
| 106 |
+
curl -X POST https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/path/generate \
|
| 107 |
+
-H "Content-Type: application/json" \
|
| 108 |
+
-d '{
|
| 109 |
+
"session_id": "abc123",
|
| 110 |
+
"persona_id": "swe",
|
| 111 |
+
"hours_per_week": 5,
|
| 112 |
+
"budget_usd": 25,
|
| 113 |
+
"hardware_id": "16gb",
|
| 114 |
+
"preference": "both"
|
| 115 |
+
}'
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
Returns structured `days`, `weeks`, `months` actionables with projections.
|
| 119 |
+
|
| 120 |
+
---
|
| 121 |
+
|
| 122 |
+
## Integration Guide
|
| 123 |
+
|
| 124 |
+
### Replace Static Questions in Your Frontend
|
| 125 |
+
|
| 126 |
+
```javascript
|
| 127 |
+
// OLD: Static question flow
|
| 128 |
+
const questions = staticQuestionBank; // always 12, fixed order
|
| 129 |
+
|
| 130 |
+
// NEW: Adaptive API calls
|
| 131 |
+
async function startAssessment() {
|
| 132 |
+
const res = await fetch('https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/session/start');
|
| 133 |
+
const data = await res.json();
|
| 134 |
+
sessionId = data.session_id;
|
| 135 |
+
showQuestion(data.question);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
async function submitAnswer(questionId, optionIndex) {
|
| 139 |
+
const res = await fetch('https://Builder-Neekhil-archai-adaptive-engine.hf.space/api/v1/session/answer', {
|
| 140 |
+
method: 'POST',
|
| 141 |
+
headers: {'Content-Type': 'application/json'},
|
| 142 |
+
body: JSON.stringify({session_id: sessionId, question_id: questionId, option_index: optionIndex})
|
| 143 |
+
});
|
| 144 |
+
const data = await res.json();
|
| 145 |
+
if (data.status === 'complete') {
|
| 146 |
+
showResults(data); // or fetch /session/{id}
|
| 147 |
+
} else {
|
| 148 |
+
showQuestion(data.question);
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
### Render Dimension Scores (Radar Chart)
|
| 154 |
+
|
| 155 |
+
The response includes:
|
| 156 |
+
- `dimension_scores`: `{literacy: 64, tooling: 63, ...}` β 0-100 for your existing radar
|
| 157 |
+
- `strengths` / `gaps`: Top 2 and bottom 2 with labels and colors
|
| 158 |
+
- `archetype`: One of 8 personas (Pioneer, Power User, etc.)
|
| 159 |
+
- `stage`: Awareness β Understanding β Application β Integration β Mastery
|
| 160 |
+
|
| 161 |
+
### Learning Path Rendering
|
| 162 |
+
|
| 163 |
+
The `learning_path` object contains:
|
| 164 |
+
- `days[0]`: Day 1 quick win (closes biggest gap in < 30 min)
|
| 165 |
+
- `weeks[n].actions`: Weekly milestones with deliverables
|
| 166 |
+
- `months[n].strategic_goals`: Month-level outcomes with metrics
|
| 167 |
+
- `projections`: Weeks to next stage, projected date
|
| 168 |
+
|
| 169 |
+
---
|
| 170 |
+
|
| 171 |
+
## Research Foundation
|
| 172 |
+
|
| 173 |
+
This engine implements techniques from:
|
| 174 |
+
|
| 175 |
+
- **Fluid Benchmarking** (2025, arXiv:2509.11106) β Fisher information adaptive selection for 50Γ efficiency
|
| 176 |
+
- **Reliable Amortized Evaluation** (2025, arXiv:2503.13335) β IRT-based difficulty calibration
|
| 177 |
+
- **Deep Knowledge Tracing with Learning Curves** (2020, arXiv:2008.01169) β Bayesian student modeling
|
| 178 |
+
- **FoundationalASSIST** (2025) β Multi-dimensional skill assessment architecture
|
| 179 |
+
|
| 180 |
+
---
|
| 181 |
+
|
| 182 |
+
## License
|
| 183 |
+
|
| 184 |
+
MIT β open for integration into your webapp.
|