@extends('layouts.admin') @section('content')

AI Question Analyzer

Analyze a Question

Ek question paste karo → AI batayega difficulty level, exam probability, concept, aur bahut kuch.

@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif {{-- ═══════════ FORM ═══════════ --}}
@csrf
@for($i = 0; $i < 4; $i++)
{{ chr(65 + $i) }}
@endfor
{{-- ═══════════ RESULT ═══════════ --}} @if(session('analysis')) @php $a = session('analysis'); @endphp
{{-- Header --}}

Question Analysis

{{ Str::limit($a->question_text, 200) }}

@php $color = $a->difficulty === 'easy' ? 'emerald' : ($a->difficulty === 'hard' ? 'rose' : 'amber'); @endphp {{ strtoupper($a->difficulty ?? 'N/A') }}
{{-- 4 Main Cards --}}

Difficulty Score

{{ $a->difficulty_score ?? '—' }}/100

Exam Probability

{{ $a->exam_probability ?? '—' }}%

PYQ Frequency

{{ $a->pyq_frequency ?? '—' }}×

Est. Time

{{ $a->estimated_time_seconds ?? '—' }}s

{{-- Concept + Bloom --}}

Concept Tested

{{ $a->concept_tested ?? '—' }}

Bloom Level

{{ $a->bloom_level ?? '—' }}

{{-- Reason --}} @if($a->reason)

Why This Difficulty?

{{ $a->reason }}

@endif {{-- 2-column: Trap + Prerequisite --}}
@if($a->common_trap)

Common Trap

{{ $a->common_trap }}

@endif @if($a->prerequisite)

Prerequisite

{{ $a->prerequisite }}

@endif
{{-- Explanation --}} @if($a->explanation)

Explanation

{{ $a->explanation }}

@endif {{-- Recommendation --}} @if($a->recommendation)

📚 Recommendation

{{ $a->recommendation }}

@endif {{-- Confidence --}} @if($a->confidence)

Confidence: {{ $a->confidence }}

@endif
@endif {{-- ═══════════ RECENT ANALYSES ═══════════ --}} @if($recent->isNotEmpty())

Recent Analyses

@foreach($recent as $r)

{{ Str::limit($r->question_text, 80) }}

{{ $r->difficulty }}
@csrf @method('DELETE')
@endforeach
@endif @endsection