Crowd-sourced FAQ Generation & P2P Query Resolution Platform
Query.in is a MERN stack platform where interns ask questions that can't be answered by the knowledge base. Questions escalate through a peer-review pipeline, get rated, and ultimately get resolved by moderators or admins.
| Attribute | Value |
|---|---|
| Stack | MongoDB, Express.js, React (Vite), Node.js, Tailwind CSS, Socket.IO, Gemini + Groq LLM APIs |
| Design | Strict Black (#000000) & White (#FFFFFF) theme with Yellow (#FFD000) highlight for alerts, Gold (#FFD700) for rating stars, Red (#DC2626) for critical warnings, rounded-xl corners (16px), soft shadows, modern SaaS aesthetic |
| Auth | JWT-based with bcrypt password hashing |
| Roles | Admin, Moderator, Intern |
| Max Output Tokens | 2000 per LLM response |
| Query Cap | 5 unresolved queries per intern |
| Real-Time Sync | 100% synchronized via Socket.IO - Dashboards, APIs, and FAQs update instantly without refreshing |
graph TD
%% ========================================
%% 1. AUTHENTICATION & NAVIGATION
%% ========================================
Start[User visits Query.in] --> Login{Authenticated?}
Login -- No --> LoginPage[Login Page]
LoginPage --> AuthCheck{Check Role JWT}
Login -- Yes --> AuthCheck
AuthCheck -- Intern --> InternDash[Intern Dashboard]
AuthCheck -- Moderator --> ModDash[Moderator Dashboard]
AuthCheck -- Admin --> AdminDash[Admin Dashboard]
%% ========================================
%% 2. EXPLORE FAQS
%% ========================================
InternDash --> ExploreFAQ[Explore FAQs Page]
ExploreFAQ --> CategoryFilter[Filter by Category / Global Search]
CategoryFilter --> ReadFAQ[Read FAQ / Query Deflected]
%% ========================================
%% 3. ASK AI & SANITY CHECKS
%% ========================================
InternDash --> AskAI[Ask AI Portal]
AskAI --> TypeQuery[User Types Question]
TypeQuery --> Debounce[Debounced Auto-Complete Search]
Debounce --> SuggestionMatch{RAG Match?}
SuggestionMatch -- "Yes (clicks suggestion)" --> ReadFAQ
SuggestionMatch -- "No (clicks submit)" --> SubmitQuery[Submit Full Question]
SubmitQuery --> SanityCheck{Input Valid? <br/>Length > 2, No Garbage}
SanityCheck -- No --> RejectGarbage[Reject: 400 Bad Request]
SanityCheck -- Yes --> RAGSearch[Backend RAG Search Index]
%% ========================================
%% 4. AI MODERATION PIPELINE
%% ========================================
RAGSearch --> RAGMatch{Confidence > 50%?}
RAGMatch -- Yes --> ReturnFAQ[Return Internal FAQ Answer]
ReturnFAQ --> VoteFAQ{Intern Upvote?}
VoteFAQ -- Yes --> Resolved1[Status: RAG Resolved]
VoteFAQ -- No --> LLM
RAGMatch -- No --> LLM[LLM Pipeline Triggered]
LLM --> Gemini[Query Gemini 3.5-flash]
Gemini --> GeminiCheck{Fails/Timeout?}
GeminiCheck -- Yes --> Groq[Fallback to Groq LLaMA]
GeminiCheck -- No --> ShowAnswer[Show AI Generated Answer]
Groq --> ShowAnswer
ShowAnswer --> VoteAI{Intern Upvote?}
VoteAI -- Yes --> Resolved2[Status: LLM Resolved]
VoteAI -- No --> SpamCheck
%% ========================================
%% 5. ESCALATION & SPAM PREVENTION
%% ========================================
SpamCheck{Similar Query<br/>Already in Queue?}
SpamCheck -- Yes --> BlockSpam[Block: Duplicate Query Detected]
SpamCheck -- No --> CheckCap{Active Queries >= 5?}
CheckCap -- Yes --> BlockCap[Block: Escalation Limit Reached]
CheckCap -- No --> AddToQueue[Added to Peer Queue<br/>Status: Pending]
AddToQueue --> NoFaqTracking[Log in NoFaq Tracking Collection]
NoFaqTracking --> NoFaqCount{Hits 10 Occurrences?}
NoFaqCount -- Yes --> AlertAdmin[AI Suggestion:<br/>Alert Admin to Create FAQ]
NoFaqCount -- No --> WaitPeer[Query Visible to Peer Crowd]
%% ========================================
%% 6. CROWD-SOURCED PEER QUEUE
%% ========================================
WaitPeer --> PeerAnswers[Peers Submit Answers]
PeerAnswers --> MaxPeers{Max 5 Peers Reached?}
MaxPeers -- No --> MorePeers[Accept More Answers]
MaxPeers -- Yes --> WaitRating[Lock to New Answers]
WaitPeer --> AuthorRates[Query Author Reviews & Rates]
AuthorRates --> RatingValue{Rating / Flags}
%% Rating Logic
RatingValue -- "5 Stars" --> Lock5[Lock Query Instantly]
Lock5 --> HubHigh[Resolve Hub: Pending Resolution]
RatingValue -- "4 Stars" --> HubHigh
RatingValue -- "1-3 Stars" --> Check5[Has 5 Low Responses?]
Check5 -- Yes --> LockLow[Lock Query]
LockLow --> HubLow[Resolve Hub: Low-Rated Queue]
Check5 -- No --> TimeCheck[24 hours passed?]
TimeCheck -- Yes --> HubStagnant[Resolve Hub: Stagnant Queue]
%% Ambiguous Logic
RatingValue -- "Mark Ambiguous" --> StrikeCheck{3 Peers Marked?}
StrikeCheck -- Yes --> LockAmb[Lock Query: 3-Strike]
LockAmb --> NotifyAuthor[Notify Intern to Rephrase]
LockAmb --> HubAmb[Resolve Hub: Ambiguous Queue]
%% ========================================
%% 7. ADMIN / MODERATOR RESOLVE HUB
%% ========================================
ModDash --> ResolveHub[Admin & Moderator Resolve Hub]
AdminDash --> ResolveHub
HubHigh --> ResolveHub
HubLow --> ResolveHub
HubStagnant --> ResolveHub
HubAmb --> ResolveHub
ResolveHub --> HubAction{Action Taken}
HubAction -- "Warn Intern" --> IssueWarning[Add Strike to Warning System]
IssueWarning --> DisableCheck{5 Warnings?}
DisableCheck -- Yes --> BanUser[Disable User Account]
HubAction -- "Delete" --> Trash[Delete Query Permanently]
HubAction -- "Approve / Override" --> Terminal[Status: Resolved]
%% ========================================
%% 8. TERMINAL STATE & FAQ CREATION
%% ========================================
Terminal --> CheckRole{Resolver Role?}
CheckRole -- "Admin" --> AdminAddFAQ{Click 'Add to FAQ'?}
AdminAddFAQ -- "Yes" --> CreateFAQ[New Knowledge Base Entry Created]
AdminAddFAQ -- "No" --> End[Flow Complete]
CheckRole -- "Moderator" --> ModSuggestFAQ{Click 'Suggest FAQ'?}
ModSuggestFAQ -- "Yes" --> ModSuggestQ[Admin: Moderator Suggested Queue]
ModSuggestFAQ -- "No" --> End
ModSuggestQ --> AdminFinalReview{Admin Final Review}
AdminFinalReview -- "Approve" --> CreateFAQ
AdminFinalReview -- "Dismiss" --> End
Gemini Models (in order):
| Model | Use Case |
|---|---|
gemini-3.5-flash |
Default - text, multimodal, agentic tasks |
gemini-3.1-pro-preview |
Complex reasoning, advanced coding |
gemini-3.1-flash-lite |
Cost-efficient, high-frequency, simple tasks |
gemini-2.5-flash |
Legacy stable |
gemini-2.5-pro |
Legacy heavy-lifter |
Groq Models (free tier, in order):
| Model | Use Case |
|---|---|
llama-3.3-70b-versatile |
Summarization, complex logic, deep reasoning |
llama-3.1-8b-instant |
High-volume, quick chat, basic tasks |
llama-4-scout-17b |
Multimodal (images!), 128k context |
qwen3-32b |
Coding, multilingual reasoning |
gpt-oss-120b |
Heavy-duty step-by-step reasoning |
gpt-oss-20b |
Lighter reasoning tasks |
LLM Response Rules:
- No emojis
- No special formatting (bold, italics, #, *)
- Plain text only
- Concise, short answers
- Max 2000 output tokens
| Document | Description |
|---|---|
| Query App.pdf | Minimum Viable Product (MVP) specifications and initial requirements |
| transcript.pdf | Team discussion and brainstorming transcript |
| product.md | Complete product file that combines all the markdown files |
| context.md | Complete project context, resolved issues, and development logs |
| ./docs/workflow_chart.md | End-to-end user journey and system workflow Mermaid flowchart |
| ./docs/FEATURES.md | Complete feature breakdown with flagship highlights |
| ./docs/setup_guide.md | Installation, configuration, and startup instructions |
| ./docs/architecture.md | System architecture, React/Vite, Express routing, Socket.IO |
| ./docs/representation.md | System flow charts and state machine visual representations |
| ./docs/api_docs.md | REST API endpoint reference with request/response formats |
| ./docs/database_schema.md | Mongoose model reference with ObjectId relationships |
# Backend
cd backend
npm install
npm run dev
# Frontend (new terminal)
cd frontend
npm install
npm run devFor instructions on how to share your local environment for internet testing using Ngrok, see the Setup Guide.
PORT=5000
MONGO_URI=mongodb+srv://<user>:<pass>@<cluster>/faq_escalation
JWT_SECRET=your-secret-key
GEMINI_API_KEY=your-gemini-api-key
GROQ_API_KEY=your-groq-api-key
CLIENT_URL=http://localhost:5173
NODE_ENV=developmentVITE_API_URL=http://localhost:5000/apiPattern: {role}{number}@query.in / {Role}{number}@123
| Role | Password | |
|---|---|---|
| Admin | admin@query.in | Admin1@123 |
| Moderator | mod1@query.in | Mod1@123 |
| Moderator | mod2@query.in | Mod2@123 |
| Intern | intern1@query.in | Intern1@123 |
| Intern | intern2@query.in | Intern2@123 |
| Intern | intern3@query.in | Intern3@123 |
| Intern | intern4@query.in | Intern4@123 |
| Intern | intern5@query.in | Intern5@123 |
| Intern | intern6@query.in | Intern6@123 |
| Intern | intern7@query.in | Intern7@123 |
| Intern | intern8@query.in | Intern8@123 |
| Intern | intern9@query.in | Intern9@123 |
| Intern | intern10@query.in | Intern10@123 |
To quickly populate the database with realistic demo data (users, queries, responses, announcements, etc.) based on the VINS internship workflow, run the seed script:
cd backend
npm run seedWarning: This will delete all existing data in your database except for the faqs collection.
All query resolutions are tracked with ResolutionType:
| Type | Description |
|---|---|
AUTO_COMPLETE |
Resolved via auto-complete suggestion |
RAG_RESOLVED |
RAG found answer, user upvoted |
RAG_DOWNVOTED |
RAG answer downvoted, triggers LLM |
LLM_RESOLVED |
LLM answered (Gemini or Groq), user upvoted |
LLM_DOWNVOTED |
LLM answer downvoted, triggers peer escalation |
ESCALATED |
LLM failed, sent to peer queue |
SPAM_BLOCKED |
Similar query already in queue |
CAP_BLOCKED |
5 active queries reached |
PEER_APPROVED |
Peer answer approved by admin/moderator |
ADMIN_OVERRIDE |
Admin resolved with own answer |
MODERATOR_OVERRIDE |
Moderator resolved with own answer |
Announcements support three priority levels with color-coded badges:
| Priority | Badge Color | Description |
|---|---|---|
high |
Red (#DC2626) | Critical announcements requiring immediate attention |
medium |
Yellow (#FFD000) | Standard announcements |
low |
Dark Green (#166534) | Informational announcements |
User Roles:
- Admin: Can create announcements with priority levels at
/admin/announcement - Moderator: Can view announcements with priority at
/moderator/announcements - Intern: Can view announcements at
/intern/announcements
Click to expand all recent bug fixes and updates
| # | Issue | Fix |
|---|---|---|
| 20 | MyEscalations socket connection failed | Added VITE_API_URL fallback before .replace() |
| 21 | Sweeper edge case | Fixed responseCount <= 4 to use MAX_PEER_RESPONSES constant |
| 22 | Ambiguous 3-strike notification | Intern now notified when query marked ambiguous |
| 23 | createFAQFromQuery stub | Now actually creates FAQ from approved response |
| 24 | Missing Stagnant Queue | Added 6th section in Admin Resolution Hub |
| 25 | AskAI generic error message | Now shows actual backend error (e.g., "Escalation blocked: You have 5 unresolved queries.") |
| 26 | No way to clear test escalation data | Added POST /api/admin/clear-all-data endpoint |
| 27 | Race condition in submitAnswer | Atomic findOneAndUpdate with $expr checks responses.length < 5 DURING update |
| 28 | N+1 query in sweeper | Aggregation pipeline + updateMany instead of for-loop with sequential queries |
| 29 | Incorrect telemetry logging | synthesizeWithGemini/Grok now return { answer, model } instead of just answer |
| 30 | ProtectedRoute redirected to /login | Login form embedded on Landing page at /, redirect now to / |
| 31 | ViewFAQs markdown not rendering | Added react-markdown for proper rendering |
| 32 | ViewFAQs missing status badges | Added "AI Generated", "Peer Answered", "Verified by Admin" badges |
| 33 | ViewFAQs auto-expand on load | Removed auto-expand, categories start collapsed |
| 34 | Peer queue empty after first answer | getPeerQueue now queries status: { $in: ['Pending', 'Peer Answered'] } |
| 35 | Intern who answered sees own response in queue | Added exclusion for queries user already answered |
| 36 | Submit answer rejected for Peer Answered status | Atomic update now matches both 'Pending' and 'Peer Answered' status |
| 37 | Notifications not stored before client response | Moved await createNotification before res.json() in all controllers |
| 38 | MyEscalations rating UI - can rate multiple times | "Rate this response" button only shows if rating === null, added rater_note field |
| 39 | 4-star rating locks query immediately | Changed MIN_HIGH_RATING to 5; 4 stars = Highly-Rated Queue (not locked) |
| 40 | Ambiguous marked query still visible in peer queue | Added ambiguous_marked_by filter to exclude queries user marked ambiguous |
| 41 | 3-strike ambiguous query shows "Pending" status on MyEscalations | Added query_resolved socket emit when query becomes Ambiguous |
| 46 | No warning system for intern misuse | Added warning_count and is_disabled to User model, warnIntern endpoint, Spoiled Users page |
| 47 | Failed to send warning (500 error) | Added 'intern_warning' to Notification type enum |
| 48 | MyEscalations shows "Resolved" instead of "Approved" | Both peer_approved and admin_override show "Approved" badge |
| 49 | Sidebar shows only current page nav items | Created centralized navConfig.jsx, DashboardLayout auto-detects nav items by user role |
| 50 | Intern dashboard stats incorrect | Active queries showed all queries not just user's, peer responses included skipped/ambiguous |
| 51 | Ask AI page input limitations | Single-line input couldn't handle multiline questions; "Get Answer" button separate from input |
| 52 | Auto-complete dropdown not closing on Enter | Enter key didn't close suggestions |
| 53 | Thumbs up/down icons improper | Old SVG paths were broken/not proper |
| 54 | Browse FAQs button had no border | Button border-white made it invisible on black card |
| 55 | Question mark icon not centered | Icon was slightly off-center |
| 56 | Ask AI and Browse FAQs buttons lacked hover effect | No visual feedback on hover |
| 57 | Multiple pages lacked hover effects | Cards, buttons, inputs felt static |
| 58 | Read-only stars shown when not rated yet | View-only stars displayed for unrated responses |
| 59 | Suggestions dropdown stays open after submit | Debounced search could fire after submit |
| 60 | Escalated/Resolved cards had yellow checkmark and button | Color scheme inconsistent with success state |
| 61 | Star ratings and status badges had inconsistent colors | text-yellow-600 hardcoded, no color-coded status |
| 62 | Separate User Registration, User Management, and Spoiled Users pages | Three different pages for related functionality |
| 63 | Pending Resolution showed all responses | Low-rated responses (1-3★) were visible in Pending Resolution section |
| 64 | Low-Rated queue showed mixed queries | Queries with some high ratings were shown in Low-Rated queue |
| 65 | "Stagnant" category misleading name and criteria | Named "Stagnant (0 answers)" but new criteria is different |
| 66 | "Unanswered" category redundant | Unanswered and Stagnant were overlapping/confusing |
| 67 | Archive section showed all responses | When viewing resolved queries in Archive, all responses were shown instead of just approved |
| 68 | "Add to FAQ Database" too basic | Simple confirm() dialog didn't allow customization of tags, keywords, priority, category |
| 69 | Category dropdown hardcoded | Category list was hardcoded in frontend instead of using existing database categories |
| 75 | Show password toggle missing | No way to see password while typing |
| 76 | Login page refreshes on wrong password | 401 interceptor redirected to /login on all 401 errors including login attempts |
| 77 | Demo credentials visible on login card | Security risk - credentials shown publicly |
| 78 | Login card missing border | Explore FAQs card had border but Login card didn't |
| 79 | Moderator response shown as "Admin" in intern's MyEscalations | Backend didn't populate resolved_by for admin/moderator approval |
| 80 | Duplicate "Approved" badge on responses | Redundant badge showing for approved responses |
| 82 | peer_note not visible in AdminResolveHub | Response detail panel didn't show internal note |
| 83 | Announcement priority missing | No way to set urgency level for announcements |
| 84 | Admin dropdown included Admin role | Only one admin should exist per application |
| 85 | Moderator suggestion didn't show sender | Admin couldn't see which moderator suggested FAQ |
| 86 | rater_note not visible in admin query views | Admin couldn't see intern's review note when approving responses |
| 87 | Moderator Suggested list missing "From" field | Admin couldn't identify moderator from query list, only in detail panel |
| 88 | Query Monitor still in moderator dashboard | Query Monitor route and card still existed after removal attempt |
| 89 | Stagnant queries with 0 responses not appearing in Stagnant tab | Stagnant filter excluded queries with 0 responses |
| 90 | Similar query blocking doesn't notify interested interns | When intern A's similar query is blocked, they aren't notified when intern B's query is resolved |
| 91 | Announcements page not dynamic | Announcements page only fetched on mount, didn't show new announcements without refresh |
| 92 | Moderator suggested query not removed after FAQ creation | After adding moderator suggestion to FAQ database, it remained in "Moderator Suggested" list |
| 93 | AdminResolveHub onClose ReferenceError | onClose called in onSuggestionDismissed/onSuggestionApproved but wasn't in scope |
| 94 | AdminFaqEditor missing search bar | No way to search through FAQ entries |
| 95 | AdminFaqEditor category hardcoded | Category input was text field, not a dropdown |
| 96 | Own escalation deletion not allowed | Interns could not delete their own pending queries |
| 97 | Cascading deletion incomplete on escalation delete | SimilarQueryInterest and Notification records left orphaned when escalation deleted |
| 98 | Deletion UI missing immediate feedback | UI didn't update across connected clients after deletion |
| 99 | No timestamp display on escalation cards | Date only shown, not time |
| 100 | Cannot remove warnings from user | Admin could not reset warning_count |
| 101 | Disabled/inactive users not logged out immediately | Account disabled but session continued until manual logout |
| 102 | Skipped queries reappear after refresh | skipQuery didn't persist skip state, queries reappeared after page refresh |
| 103 | No Edit User option in User Management | Admin could not edit user email or role |
| 104 | No Remove User option in User Management | Admin could not permanently delete user accounts |
| 105 | Bulk JSON Upload not functional | Clicking Bulk JSON Upload tab did nothing |
| 106 | AI Suggestions card and page still in admin dashboard | Navigation still showed AI Suggestions after removal attempt |
| 107 | Announcements page missing count | No total count displayed on All Announcements card |
| 112 | Announcements page missing timestamp | No creation time displayed on announcement cards |
| 113 | Suggestion chips persist after submit | Auto-complete suggestions stayed visible after response generated |
| 114 | Global search bar cluttering header | Search bar at top of every page added unnecessary space |
| 115 | Notification/user badge aligned left | Elements showed on left side of header instead of right |
| 116 | Archive section didn't show resolver info | Admin/Moderator couldn't identify who resolved a query in Archive |
| 117 | Query text overflowing in Query Management | Long queries overflow and show "..." instead of wrapping |
| 118 | No delete button on query cards | Could only delete from ambiguous section detail panel |
| 119 | Missing timestamps on all query cards | Timestamps only shown for archive/pending/low_rated sections |
| 120 | High-impact actions lacked confirmation | Accidental clicks could deactivate/remove users or escalate queries |
| 121 | Similar questions escalate instead of showing resolved answer | When intern asks similar question to resolved query, system created new escalation instead of showing existing resolution |
| 122 | Sidebar scrolls away on scroll | When scrolling content in dashboard, sidebar scrolls up and disappears |
| 123 | Admin stat cards not clickable | Total Users, Pending Queries, Resolved Today, Announcements stat cards on Admin dashboard didn't navigate anywhere |
| 124 | Moderator dashboard had "New Today" and "Announcements" stat cards | These cards were redundant and of no use |
| 125 | "Resolve Hub" naming inconsistent | Moderator dashboard showed "Resolve Hub" while admin called it "Query Management" |
| 126 | Moderator "View All Notifications" didn't work | Clicking "View All notifications" in bell dropdown redirected to intern page which wasn't accessible for moderator |
| 127 | Notifications in moderator sidebar | Moderator sidebar had a "Notifications" nav item that was unnecessary |
| 128 | Analytics charts missing percentages | Charts showed counts but not percentages in tooltips and labels |
| 129 | Resolution distribution chart labels overflowing | Small percentage slices had labels pointing outside the chart |
| 130 | Bottleneck analysis pie chart labels | Floating labels next to pie slices were hard to read |
| 131 | Analytics charts clipped/cut off | Charts weren't sizing dynamically, edges/labels/legends cut off |
| 132 | AI Helpfulness Rate inaccurate | Downvotes not tracked separately - ragDownvotes counted escalated queries, not actual downvotes |
| 133 | Dashboard stats appear statically | Numbers just pop in without animation on load/refresh |
| 134 | Peer queue skip shows wrong message | When last query is skipped, message says "no more queries" but user can still answer |
Hybrid real-time + MongoDB persistence model for instant and offline alerts.
| Type | Trigger | Recipient |
|---|---|---|
peer_answer |
Peer submits answer | Query author (intern) |
query_resolved |
Admin resolves OR query marked ambiguous | Query author (intern) |
admin_alert |
NoFaq hits 10 occurrences | All admins |
announcement |
Admin creates broadcast | All interns |
faq_added |
Admin adds new FAQ | All interns |
intern_warning |
Admin sends warning to intern for misuse | Targeted intern |
Components:
NotificationBell- Top bar bell icon with unread badge and dropdownToast- Slide-in pop-up from bottom-right (auto-dismiss 5s)NotificationContext- Socket.IO client + state management
Real-time Events:
new_notification- Broadcast to user roomyellow_alert- Broadcast to admin room when NoFaq hits thresholdquery_resolved- Intern notified when their query is resolvednew_peer_answer- Intern notified when peer answers their query
Admins/Moderators can send warnings to interns from any query detail panel.
| Feature | Description |
|---|---|
warning_count |
User field (default: 0, max: 5) |
is_disabled |
Auto-enabled when warning_count >= 5 |
| Login Block | Disabled users cannot log in (403 error) |
| Spoiled Users Page | /admin/spoiled-users lists all users with warnings |
| Warning Badge | Query detail panels show warning count next to intern email |
| Warning Banner | MyEscalations page shows warning count if user has warnings |
Warning Flow:
- Admin clicks "Send Warning" in query detail panel
- Modal appears with optional warning message
- On submit:
warnIntern()incrementswarning_count - If
warning_count >= 5:is_disabled = true, user cannot log in intern_warningnotification sent to intern
The Admin Dashboard now uses a page-based structure with sidebar navigation:
| Page | Route | Purpose |
|---|---|---|
| Dashboard | /admin | Overview with navigation cards (5 cards - User Management, Announcements, FAQ Editor, Query Management, Analytics) |
| User Management | /admin/users | Combined: Registration (Single + Bulk CSV), User list with Edit/Remove/Activate/Remove Warnings options, warnings display |
| Announcements | /admin/announcement | Publish announcements with total count display |
| FAQ Editor | /admin/faqs | FAQ CRUD operations |
| Query Management | /admin/resolve | Resolution queue (includes Pending Resolution, Ambiguous, Stagnant, Low-Rated, Archive, Moderator Suggested) |
| Analytics | /admin/analytics | AI performance comparison, bottleneck analysis, and human intervention metrics with visualizations |
Note: AI Suggestions (FAQ gap suggestions) has been removed from the admin dashboard and navigation.
| Page | Route | Purpose |
|---|---|---|
| Dashboard | /moderator | Overview with navigation cards |
| Announcements | /moderator/announcements | View announcements with priority indicators |
| Resolve Hub | /moderator/resolve | Resolution queue (includes Pending Resolution, Stagnant, Low-Rated, Archive) |
The Admin Dashboard presents 6 sections for managing escalated queries:
| Section | Condition |
|---|---|
| Pending Resolution | High-rated queries (rating >= 4), excludes Ambiguous and Resolved. Only 4-5★ responses shown, sorted 5★ first |
| Ambiguous Queries | Queries marked unclear by 3 peers (3-strike rule), can delete these |
| Stagnant (Locked, 24h+) | Queries with 1-4 low-rated responses (all 1-3★), created 24+ hours ago |
| Low-Rated | Queries with 5+ responses ALL rated < 4 stars. All responses shown (sorted 3★→1★) with Approve button |
| Archive | status = 'Resolved' |
| Moderator Suggested | Pending FAQ suggestions from moderators. Admin can Add to FAQ or Dismiss |
FAQ Creation Bridge: Admin can click "+ Add to FAQ Database" on any resolved query to create a permanent FAQ entry.
