Overview
LLMs can accelerate architecture decisions by generating design options, evaluating tradeoffs, and producing initial schemas and API contracts. The key is providing enough context about requirements and constraints.
System Design Prompt Template
Design a system for [feature/product].
REQUIREMENTS:
- [user-facing requirement 1]
- [user-facing requirement 2]
CONSTRAINTS:
- Expected users: [number]
- Budget: [budget or "startup" / "enterprise"]
- Team size: [number] developers
- Timeline: [weeks/months]
- Existing stack: [current technologies]
Provide:
1. Two architectural options with tradeoffs
2. Component diagram for the recommended option
3. Data model / schema
4. API contract for core endpoints
5. Key technical risks and mitigationsArchitecture Prompt Types
System Design
Describe requirements, constraints, and scale. Ask for multiple options with tradeoffs.
API Design
Specify operations and consumers. Ask for RESTful or GraphQL schemas with error handling.
Database Schema
List entities and relationships. Ask for normalized schemas with indexes and migrations.
Database Schema Prompts
List entities and relationships, specify the query patterns your application needs, note the expected data volumes, and ask for normalized schemas with indexes and migration strategies. LLMs can also suggest when to denormalize for performance.