EsotericWork

PSYCHOLOGY × AI

Psych Assessment AI Agent

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

THE PROBLEM

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)

School Districts
Dozenseach with unique rules
Assessment Types
200+different test formats
Document Types
100+PDFs, scans, screenshots
Report Sections
15-30per student
Disability Categories
15+each with specific requirements
Demographic Factors
Dozensmodifies section wording
Possible PermutationsTens of millions

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.

THE SOLUTION

Document Intelligence Pipeline

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.

Markdown Retrieval System

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.

Multi-Stage Generation

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.

Pixel-Perfect Export

Output matches the exact Word template formatting each district requires. Tables, headers, legal language, all preserved. Psychologists export directly to their compliance workflow.

Chat Agent for Corrections

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

INGEST

Type detection

EXTRACT

Data parsing

QUERY

Prompt lookup

GENERATE

Section writing

COMPILE

Doc export

THE RESULT

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.

WHY THIS MATTERS

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.