Back to Projects
ScanMind
- TypeScript
- CSS
- JavaScript
Overview
A stateless AI reasoning engine that processes questions against PDF documents using Google Gemini 1.5 Flash. Leverages the massive 1-million-token context window for the “Combined Mind” approach, enforcing a strict retrieval-only policy with zero external knowledge.
Features
- Strict Mode: Zero-knowledge policy - answers ONLY from provided PDF context
- Multimodal Input: Supports both text questions and image-based questions
- Source Citations: Every answer includes file name and page number
- Question Type Detection: Specialized reasoning for Multiple Choice, True/False, Identification, and Long Answer
- Structured Responses: Clean JSON output with reasoning steps and confidence scores
- High Performance: Optimized for low latency with transient logging
Key Components
| File | Purpose |
|---|---|
| app/api/brain/route.ts | Main API endpoint handler |
| lib/brain-types.ts | TypeScript type definitions |
| lib/brain-prompts.ts | System prompts & context formatting |
| lib/brain-client.ts | Frontend client utilities |