* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, ‚Segoe UI‘, Roboto, sans-serif; background: #0f0f23; color: #e0e0e0; min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
h1 { text-align: center; color: #6c63ff; font-size: 2.2em; margin-bottom: 10px; }
.subtitle { text-align: center; color: #888; margin-bottom: 40px; }
.steps { display: flex; justify-content: space-between; margin-bottom: 40px; }
.step { text-align: center; flex: 1; padding: 15px; border-radius: 8px; background: #1a1a2e; margin: 0 5px; opacity: 0.5; transition: all 0.3s; }
.step.active { opacity: 1; border: 2px solid #6c63ff; background: #16213e; }
.step.completed { opacity: 1; border: 2px solid #28a745; background: #0f2e1a; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: #6c63ff; color: white; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 5px; }
.completed .step-num { background: #28a745; }
.card { background: #1a1a2e; border-radius: 12px; padding: 30px; margin-bottom: 20px; border: 1px solid #2a2a4a; }
.question { font-size: 1.2em; color: #fff; margin-bottom: 20px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { padding: 15px 20px; background: #16213e; border: 2px solid #2a2a4a; border-radius: 8px; cursor: pointer; transition: all 0.2s; color: #ccc; }
.option:hover { border-color: #6c63ff; background: #1a1a3e; }
.option.selected { border-color: #6c63ff; background: #1a1a3e; color: white; }
.nav-buttons { display: flex; justify-content: space-between; margin-top: 30px; }
.btn { padding: 12px 30px; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #6c63ff; color: white; }
.btn-primary:hover { background: #5a52d5; }
.btn-secondary { background: #2a2a4a; color: #ccc; }
.btn-secondary:hover { background: #3a3a5a; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }
.result { display: none; text-align: center; }
.result-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 40px; margin: 20px 0; }
.result-technique { font-size: 2em; font-weight: bold; color: white; margin: 10px 0; }
.result-score { font-size: 1.2em; color: #ffd700; }
.result-desc { background: #1a1a2e; border-radius: 8px; padding: 20px; margin: 20px 0; text-align: left; }
.result-tags { margin: 10px 0; }
.result-tag { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 13px; margin: 3px; }
.tag-cot { background: #28a745; color: white; }
.tag-tot { background: #dc3545; color: white; }
.tag-react { background: #6c63ff; color: white; }
.tag-reflexion { background: #fd7e14; color: white; }
.tag-sc { background: #20c997; color: white; }
.tag-pas { background: #e83e8c; color: white; }
.confidence-bar { height: 8px; background: #2a2a4a; border-radius: 4px; margin: 10px 0; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.comparison-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.mini-card { background: #16213e; border-radius: 8px; padding: 15px; text-align: left; }
.mini-card h4 { color: #6c63ff; margin-bottom: 8px; }
.mini-card p { color: #888; font-size: 14px; }
code { background: #0f0f23; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #6c63ff; }
AI Reasoning Technique Selector
Reviewed: June 4, 2026
Answer 5 questions to get your personalized reasoning technique recommendation
Task Type
Complexity
Information
Latency
Criticality
Recommended Technique
Runner-up Techniques
const questions = [
{
id: ‚q1‘,
text: ‚What type of task are you working on?‘,
options: [
{ value: ‚math‘, label: ‚Math or logic problem solving‘, weights: { cot: 4, tot: 1, sc: 3, react: 0, reflexion: 1, pas: 2 } },
{ value: ‚creative‘, label: ‚Creative content generation‘, weights: { cot: 1, tot: 4, sc: 2, react: 1, reflexion: 2, pas: 2 } },
{ value: ‚research‘, label: ‚Research or information gathering‘, weights: { cot: 1, tot: 2, sc: 1, react: 4, reflexion: 2, pas: 3 } },
{ value: ‚coding‘, label: ‚Code generation or debugging‘, weights: { cot: 3, tot: 1, sc: 2, react: 2, reflexion: 4, pas: 3 } },
{ value: ‚analysis‘, label: ‚Complex analysis or planning‘, weights: { cot: 2, tot: 3, sc: 2, react: 2, reflexion: 2, pas: 4 } },
{ value: ‚chat‘, label: ‚Conversational QA or assistant‘, weights: { cot: 2, tot: 1, sc: 2, react: 3, reflexion: 1, pas: 2 } }
]
},
{
id: ‚q2‘,
text: ‚How complex is the task?‘,
options: [
{ value: ’simple‘, label: ‚Simple — can be solved in 2-3 steps‘, weights: { cot: 4, tot: 0, sc: 2, react: 1, reflexion: 0, pas: 3 } },
{ value: ‚moderate‘, label: ‚Moderate — requires careful breakdown‘, weights: { cot: 3, tot: 2, sc: 3, react: 2, reflexion: 3, pas: 4 } },
{ value: ‚complex‘, label: ‚Complex — multiple sub-problems and paths‘, weights: { cot: 1, tot: 4, sc: 3, react: 3, reflexion: 3, pas: 4 } },
{ value: ‚open‘, label: ‚Open-ended — no single correct answer‘, weights: { cot: 0, tot: 4, sc: 2, react: 2, reflexion: 3, pas: 3 } }
]
},
{
id: ‚q3‘,
text: ‚Does the task require external information or tools?‘,
options: [
{ value: ’none‘, label: ‚No — everything needed is in the prompt‘, weights: { cot: 4, tot: 3, sc: 3, react: 0, reflexion: 2, pas: 3 } },
{ value: ‚lookup‘, label: ‚Yes — need to look up facts or search‘, weights: { cot: 1, tot: 1, sc: 1, react: 4, reflexion: 1, pas: 2 } },
{ value: ‚tools‘, label: ‚Yes — need to use APIs, calculators, or tools‘, weights: { cot: 0, tot: 1, sc: 1, react: 4, reflexion: 2, pas: 2 } },
{ value: ‚code‘, label: ‚Yes — need to run or test code‘, weights: { cot: 1, tot: 1, sc: 1, react: 3, reflexion: 4, pas: 2 } }
]
},
{
id: ‚q4‘,
text: ‚What is your latency budget?‘,
options: [
{ value: ‚fast‘, label: ‚Fast — under 2 seconds is critical‘, weights: { cot: 4, tot: 1, sc: 1, react: 2, reflexion: 1, pas: 3 } },
{ value: ’normal‘, label: ‚Normal — 2-10 seconds is fine‘, weights: { cot: 3, tot: 2, sc: 3, react: 3, reflexion: 3, pas: 3 } },
{ value: ‚patient‘, label: ‚Patient — quality matters more than speed‘, weights: { cot: 2, tot: 4, sc: 4, react: 3, reflexion: 4, pas: 3 } }
]
},
{
id: ‚q5‘,
text: ‚How critical is the answer being correct?‘,
options: [
{ value: ‚low‘, label: ‚Low — rough answer is fine‘, weights: { cot: 4, tot: 1, sc: 2, react: 2, reflexion: 1, pas: 3 } },
{ value: ‚medium‘, label: ‚Medium — should be mostly correct‘, weights: { cot: 3, tot: 2, sc: 4, react: 3, reflexion: 3, pas: 3 } },
{ value: ‚high‘, label: ‚High — must be accurate and reliable‘, weights: { cot: 2, tot: 3, sc: 4, react: 3, reflexion: 4, pas: 3 } },
{ value: ‚life‘, label: ‚Critical — errors have serious consequences‘, weights: { cot: 1, tot: 3, sc: 4, react: 3, reflexion: 4, pas: 3 } }
]
}
];
const techniqueInfo = {
cot: { name: ‚Chain-of-Thought (CoT)‘, desc: ‚The foundational reasoning technique. Generates a step-by-step linear reasoning chain before answering. Best for math, logic, and sequential problems.‘, tagClass: ‚tag-cot‘, color: ‚#28a745‘ },
tot: { name: ‚Tree-of-Thought (ToT)‘, desc: ‚Explores multiple reasoning paths in a tree structure, evaluating and pruning branches. Best for creative, planning, and open-ended problems.‘, tagClass: ‚tag-tot‘, color: ‚#dc3545‘ },
sc: { name: ‚Self-Consistency‘, desc: ‚Generates multiple reasoning paths and takes a majority vote on the answer. Best when the answer can be verified and accuracy is critical.‘, tagClass: ‚tag-sc‘, color: ‚#20c997‘ },
react: { name: ‚ReAct (Reasoning + Acting)‘, desc: ‚Interleaves reasoning with external tool use. The model thinks, acts, observes, and repeats. Best for research and tool-dependent tasks.‘, tagClass: ‚tag-react‘, color: ‚#6c63ff‘ },
reflexion: { name: ‚Reflexion‘, desc: ‚Self-reflective technique where the model critiques its own output and improves iteratively. Best for coding and tasks with verifiable outputs.‘, tagClass: ‚tag-reflexion‘, color: ‚#fd7e14‘ },
pas: { name: ‚Plan-and-Solve‘, desc: ‚Explicitly separates planning from execution. First creates a structured plan, then follows it step by step. Best for complex, well-structured analysis.‘, tagClass: ‚tag-pas‘, color: ‚#e83e8c‘ }
};
let currentStep = 0;
let answers = {};
function renderQuestion() {
const q = questions[currentStep];
const area = document.getElementById(‚question-area‘);
let html = ‚
‚;
area.innerHTML = html;
// Update step indicators
for (let i = 1; i <= 5; i++) {
const el = document.getElementById('step-ind-' + i);
el.classList.remove('active', 'completed');
if (i === currentStep + 1) el.classList.add('active');
else if (i {
el.classList.toggle(’selected‘, q.options[i].value === value);
});
}
function nextStep() {
if (currentStep 0) {
currentStep–;
renderQuestion();
}
}
function showResult() {
document.getElementById(‚question-area‘).style.display = ’none‘;
document.getElementById(‚result-area‘).style.display = ‚block‘;
document.getElementById(’steps‘).style.display = ’none‘;
// Calculate scores
const scores = { cot: 0, tot: 0, sc: 0, react: 0, reflexion: 0, pas: 0 };
questions.forEach(q => {
const ans = answers[q.id];
const opt = q.options.find(o => o.value === ans);
if (opt && opt.weights) {
Object.keys(opt.weights).forEach(k => { scores[k] += opt.weights[k]; });
}
});
const sorted = Object.entries(scores).sort((a, b) => b[1] – a[1]);
const winner = sorted[0];
const info = techniqueInfo[winner[0]];
const maxPossible = questions.length * 4;
const confidence = Math.min(Math.round((winner[1] / maxPossible) * 100), 98);
document.getElementById(‚result-technique‘).textContent = info.name;
document.getElementById(‚result-score‘).textContent = ‚Match score: ‚ + winner[1] + ‚/‘ + maxPossible + ‚ (‚ + confidence + ‚% confidence)‘;
document.getElementById(‚result-desc‘).innerHTML = ‚How it works: ‚ + info.desc;
document.getElementById(‚result-tags‘).innerHTML = ‚‚ + info.name + ‚‚;
// Runner-ups
let ruHtml = “;
sorted.slice(1, 4).forEach(([key, score]) => {
const ti = techniqueInfo[key];
const pct = Math.round((score / maxPossible) * 100);
ruHtml += ‚
‚ + ti.name + ‚ (‚ + score + ‚/‘ + maxPossible + ‚)
‚ + ti.desc.substring(0, 100) + ‚…
‚;
});
document.getElementById(‚runner-ups‘).innerHTML = ‚
‚;
}
function reset() {
currentStep = 0;
answers = {};
document.getElementById(‚question-area‘).style.display = ‚block‘;
document.getElementById(‚result-area‘).style.display = ’none‘;
document.getElementById(’steps‘).style.display = ‚flex‘;
renderQuestion();
}
renderQuestion();
