Prompting Best Practices
Prompting Best Practices

Prompt patterns that produce valid IOModel output.

Good prompts get good structure. Because AI generates against the IOModel schema and validates its output, a few patterns make results reliable and easy to review.

Core patterns

PatternWhy it helps
Decompose top-downContainers → subsystems → components/APIs keeps structure clean
Reference the schemaOutput conforms to allowed types and properties
Validate after each stepCatches inconsistencies before they compound
Use dry-run for mutationsPreview changes before they are written
Work in small stepsSmaller diffs are easier to review and accept

A reliable request shape

State the goal

Describe the system and its key inputs/outputs in plain language.

Set constraints

Name the schema, target model, and any required types or tech.

Ask for decomposition

Request a top-down breakdown rather than one flat dump.

Require validation

Ask AI to validate and fix diagnostics before finishing.

Example prompt

Design a service that transcribes a gRPC audio stream to text.
- Use the IOModel schema (objects + links).
- Decompose top-down: system → containers → components/APIs.
- After each step, validate and fix any diagnostics.
- Finish with an overview spec page that embeds the model.

Tell AI to stop and show a plan (dry-run) before applying large changes. Reviewing the plan is faster than untangling a big unwanted change.

Anti-patterns

  • Asking for everything in one giant prompt.
  • Skipping validation and trusting raw output.
  • Letting AI invent types or fields outside the schema.

Keep it grounded

If AI starts producing free-form structure, redirect it to the schema and ask it to validate. Grounding is what makes the output trustworthy.

Last updated on