env.dev

AI Architecture Prompts

Prompts for LLM-assisted software architecture design. System design, API design, and database schema generation.

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

Prompt
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 mitigations

Architecture 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.

Frequently Asked Questions

Can LLMs help with system design?

Yes. LLMs can generate design options, evaluate tradeoffs, produce schemas, and suggest patterns. They work best when you provide clear requirements and constraints.

Should I trust LLM architecture advice?

Use it as a starting point. LLMs are good at generating options and identifying tradeoffs, but final architecture decisions should be validated by experienced engineers.