⚠️ This is a SCREENING tool, not a diagnostic instrument.
All outputs require evaluation by qualified clinical specialists.
- Problem Context
- Solution Overview
- Demo
- Architecture
- Quick Start
- Results
- Project Structure
- Clinical Protocols
- Limitations & Ethics
- Citation
Brazil faces a critical gap in early ASD diagnosis:
| Metric | Reality |
|---|---|
| ⏳ Average wait for diagnosis | ~3 years |
| 🧠 Critical intervention window | 18–36 months |
| 👶 Children potentially affected | 1M+ |
| 👩⚕️ Specialist availability | Severely limited, urban-concentrated |
The consequence: children miss the developmental window where early intervention has the highest impact on long-term outcomes.
A clinical decision-support system that enables primary care pediatricians to produce structured, protocol-aligned ASD screening reports — supporting faster specialist referral and triage.
The system:
- Accepts unstructured pediatric clinical case narratives
- Evaluates them against DSM-5, M-CHAT-R/F, and CARS-2 protocols
- Identifies red flags and information gaps
- Generates a full SOAP clinical action plan
- Produces structured output in under 25 seconds
📺 Video demo: [Coming soon — 3-min walkthrough]
Input: Unstructured pediatric clinical case (text)
↓
Gemini 2.5 Flash + Clinical Prompt V2
↓
Output: 6-section structured analysis
├── Diagnostic Hypotheses (ranked)
├── DSM-5 Criteria mapping (A1–A3, B1–B4)
├── Red Flags (urgent)
├── Information Gaps (5 targeted questions)
├── Complementary Assessments (ADOS-2, ADI-R...)
└── SOAP Summary + Action Plan
asd-screening-assistant/
├── src/
│ ├── core/
│ │ └── gemini_client.py # Gemini 2.5 Flash medical client
│ ├── prompts/
│ │ └── tea_screening_v2.py # DSM-5 aligned prompt template
│ └── evaluation/
│ └── quality_evaluator.py # Multi-dimensional quality scoring
├── data/
│ └── synthetic_cases/ # 3 validated test cases (mild/moderate/severe)
├── app/
│ └── streamlit_app.py # Interactive demo interface
├── notebooks/
│ └── asd_screening_full.ipynb # Full Kaggle notebook
├── docs/
│ └── technical_writeup.pdf # 3-page technical write-up
├── requirements.txt
└── README.md
Tech Stack:
google-generativeai— Gemini 2.5 Flash (HAI-DEF)Python 3.12Streamlit— interactive demotransformers,huggingface-hub— MedGemma discovery
git clone https://github.com/fernandosr85/asd-screening-assistant.git
cd asd-screening-assistant
pip install -r requirements.txtGet a free key at aistudio.google.com
export GEMINI_API_KEY="your_key_here"Or create a .env file:
GEMINI_API_KEY=your_key_here
streamlit run app/streamlit_app.pyfrom src.core.gemini_client import GeminiMedicalClient
from src.prompts.tea_screening_v2 import get_tea_screening_prompt_v2
client = GeminiMedicalClient()
case = """
Child, 30 months, male. Language delay (~20 words, no phrases).
Reduced eye contact, does not respond to name (20-30% of the time).
Hand flapping when excited. Lines up toys. Food selectivity.
Hypersensitive to noise. Family history: paternal cousin with ASD.
"""
prompt = get_tea_screening_prompt_v2(case)
analysis = client.generate(prompt, temperature=0.3)
print(analysis)Evaluated on 3 synthetic pediatric cases (mild / moderate / severe ASD):
| Case | Severity | Overall Score | Time |
|---|---|---|---|
| CASE_001 | Moderate | 4.64 / 5.0 | 23.4s |
| CASE_002 | Mild | 4.48 / 5.0 | 15.5s |
| CASE_003 | Severe | 4.32 / 5.0 | 21.0s |
| Average | All levels | 4.48 / 5.0 | 19.9s |
Quality dimensions (all cases achieved 5.0/5.0 on):
- ✅ Completeness — all 6 SOAP sections present
- ✅ Consistency — hypotheses match reported symptoms
- ✅ Clinical Plausibility — correct DSM-5 / M-CHAT / CARS-2 references
Readiness: 5/5 checks passed ✅
src/core/gemini_client.py
└── GeminiMedicalClient
├── __init__(prefer="flash") # auto-selects best model
├── generate(prompt, temp, tokens)
└── _get_system_instruction() # clinical persona
src/prompts/tea_screening_v2.py
└── get_tea_screening_prompt_v2(case_description)
# Returns structured 6-section clinical prompt
# Aligned with: DSM-5 · M-CHAT-R/F · CARS-2
src/evaluation/quality_evaluator.py
├── evaluate_clinical_output(analysis, case)
│ # Returns scores: completeness, consistency,
│ # plausibility, safety, actionability, overall
└── generate_evaluation_report(scores, case_id)
data/synthetic_cases/
├── case_001_moderate.txt # 30mo male, Level 2
├── case_002_mild.txt # 48mo female, Level 1
├── case_003_severe.txt # 36mo male, Level 3 + epilepsy
└── index.json # metadata + expected diagnoses
| Protocol | Role in this system |
|---|---|
| DSM-5 | Criteria A (social) and B (restrictive/repetitive) mapping |
| M-CHAT-R/F | Early childhood screening markers (pointing, name response, joint attention) |
| CARS-2 | Severity rating alignment for output interpretation |
| SOAP | Structured clinical documentation format for the action plan |
| ADOS-2 / ADI-R | Recommended as next-step assessments in every output |
- Not a diagnostic tool — screening and referral support only
- Synthetic validation only — real-world clinical validation with annotated data required before deployment
- Text-based input — cannot replicate direct behavioral observation
- Brazilian Portuguese context — calibrated for Brazilian healthcare terminology and workflows
- Requires clinical supervision — all outputs must be reviewed by qualified professionals
@misc{rodrigues2026asd,
author = {Rodrigues, Fernando},
title = {ASD Screening Assistant: Early Autism Detection with Gemini 2.5 Flash},
year = {2026},
publisher = {Kaggle},
url = {https://www.kaggle.com/competitions/med-gemma-impact-challenge/writeups/new-writeup-1768882898631}
}- American Psychiatric Association. (2013). Diagnostic and Statistical Manual of Mental Disorders (DSM-5). APA Publishing.
- Robins, D. L., et al. (2009). The Modified Checklist for Autism in Toddlers (M-CHAT-R/F). Journal of Autism and Developmental Disorders.
- Schopler, E., et al. (2010). Childhood Autism Rating Scale, Second Edition (CARS-2). Western Psychological Services.
- Google DeepMind. (2026). Gemini 2.5 Flash — HAI-DEF Model Documentation. https://ai.google.dev
MedGemma Impact Challenge · Google Health AI · January 2026