Ask your questions to AI-powered Supreme Court Justices
The AI Supreme Court is an experimental research platform that uses generative AI to simulate the reasoning of the nine current U.S. Supreme Court Justices. Users can explore how different justices might approach legal or policy questions, based on patterns found in real judicial opinions. The project’s goal is to promote understanding of judicial thinking and encourage thoughtful, informed discussion.
This platform is intended for educational and analytical exploration of judicial reasoning and group decision-making. It does not provide legal advice or reflect the real opinions of any Justice or institution.
| Justice | Opinions | Concurrences | Dissents |
|---|---|---|---|
| Chief Justice Roberts | 52 | 18 | 24 |
| Justice Thomas | 38 | 22 | 48 |
| Justice Alito | 45 | 20 | 42 |
| Justice Sotomayor | 34 | 16 | 58 |
| Justice Kagan | 41 | 19 | 38 |
| Justice Gorsuch | 36 | 24 | 32 |
| Justice Kavanaugh | 39 | 21 | 28 |
| Justice Barrett | 28 | 15 | 22 |
| Justice Jackson | 18 | 12 | 16 |
| Layer | Description |
|---|---|
| AI Engine | OpenAI Responses API with Retrieval-Augmented Generation (RAG). Each Justice has a dedicated vector store containing their written opinions and case syllabi. |
| Vector Stores | 9 OpenAI-managed vector databases (~12 MB total), one per Justice. Retrieval provides contextual grounding before GPT-5-nano or GPT-5-mini generates responses. |
| Sentiment Layer | A lightweight OpenAI GPT-5o-nano model classifies each justice's answer as 🟢 Strongly Support, ⚫ Neutral, or 🔴 Strongly Oppose. |
| Data Source | Judicial opinions and syllabi scraped using a custom Playwright scraper, processed into structured JSON for ingestion. |
| Response Format | Consistent 2–4 paragraph reasoning summary including: Outcome (Uphold / Remand / Dismiss), Certainty, and Scope. |
| Frontend | Flask-based web app with a responsive HTML/CSS/JS interface. Users select justices, enter a question, and view color-coded AI responses. Works seamlessly on desktop and mobile. |
| Backend | Python Flask API handling user requests, rate limiting (5 queries/IP). |
🏛️AI Supreme Court runs as a fully containerized microservice on AWS:
| Component | Function |
|---|---|
| AWS ECS Fargate | Runs the Flask backend in serverless containers with auto-scaling. |
| ECR (Elastic Container Registry) | Stores the Docker images built by deploy_fargate.sh. |
| API Gateway | Provides HTTPS endpoint, throttling, and public access routing. |
| Application Load Balancer (ALB) | Distributes traffic across running Fargate tasks for high availability. |
| CloudWatch Logs | Captures all application logs, API activity, and system metrics. |
| IAM Roles & Policies | Enforces least-privilege access to resources. |
| Secrets Parameter Store | Secures the environment variables. |
| VPC Networking | Private subnets isolate compute tasks; only ALB and API Gateway are internet-facing. |
| Scaling | Horizontal scaling via ECS service updates or CloudWatch triggers (CPU / memory utilization). |
| Region | us-east-1 (default). Typical configuration: 0.5 vCPU / 512 MB RAM per task. |
| DynamoDB | NoSQL database storing logs, IP rate limits, job progress tracking. |
| S3 | Object storage for judicial opinion archives, vector store backups, and static assets with lifecycle policies. |