PSYCHOLOGY × AI
AI system that writes legally-binding disability qualification reports for school psychologists. Handles tens of millions of possible output configurations across dozens of school districts.
ROLE
Full-Stack (Solo)
YEAR
2024
STACK
Next.js · Python · OpenAI
STATUS
In Production
School psychologists evaluate students for special education eligibility. Each evaluation requires synthesizing 5-20 standardized assessments into a 40+ page report that must meet district-specific legal requirements.
The old workflow: manually transcribe data from assessment PDFs into Word templates, write interpretations for each test, ensure compliance with district formatting. ~20 hours per report.
The hard part isn't writing text. It's the combinatorial explosion:
COMPLEXITY FACTORS (MULTIPLICATIVE)
Before AI, building a system to handle this would have cost millions. Every combination of district rules × assessment types × disability categories × student demographics produces different report requirements.
AI-powered type detection for 100+ document types. PDFs, screenshots, scanned napkin notes. The system identifies what it's looking at, then applies custom extraction prompts per type to pull structured data.
A queryable prompt database using structured Markdown with dot-notation addressing. Git-controlled, AI-editable. Scales to millions of permutations without hardcoding every combination. This was the architectural breakthrough that made the project possible.
Reports generate in 4-5 batches. Some sections depend on content from previous sections. Dynamic section inclusion and ordering rules handle district-specific requirements automatically.
Output matches the exact Word template formatting each district requires. Tables, headers, legal language, all preserved. Psychologists export directly to their compliance workflow.
If the AI gets something wrong, users can chat with an agent to fix it. "Make this section sound more clinical" or "Add the data from the WISC-V." Eliminates most manual editing. Psychologists rarely need to open Word.
PIPELINE
Type detection
Data parsing
Prompt lookup
Section writing
Doc export
90%
AUTOMATION
Psychologists review, not write
100s
ACTIVE USERS
Across school districts
20→1
HOURS SAVED
Per report cycle
The AI handles 90-95% of the work. Psychologists primarily edit for tone and personal phrasing. The substance is accurate. Output is legally binding and accepted by school districts.
Most AI report systems handle simple templates with a few variables. This project operates at the edge of what's possible: regulated industry, legally binding output, millions of configurations, users with minimal technical ability.
The Markdown Retrieval architecture I built here is now the foundation for PageWright, a generalized system for complex document generation in other domains.