5.2 Prompting Strategy

Overview

Prompting Maestro AI effectively is the difference between a script that works immediately and one that requires heavy editing. This section provides a detailed guide on how to craft prompts that consistently produce predictable, Revit‑ready Python scripts.

The fundamentals:

  • Be explicit
  • Define scope
  • Describe actions in sequence
  • Name elements, parameters, and rules clearly
  • Avoid ambiguity

5.2.1 Anatomy of a Good Prompt

A high‑quality prompt typically contains five parts:

  1. Goal Statement
    A single, clear sentence describing the outcome.
    Example:
    “I want a script that updates a parameter for all selected doors.”

  2. Scope Definition
    What elements, categories, or views are included?
    Example:
    “Only modify elements in the Doors category.”

  3. Action Steps
    Write actions sequentially.
    Example:
    “Read parameter A, then write value B.”

  4. Constraints & Conditions
    Establish rules or exceptions.
    Example:
    “Skip doors with a fire rating value greater than 2.”

  5. Naming Rules or Output Requirements
    If the script creates or names anything, specify the format.
    Example:
    “Append ‘‑FLS’ to each modified view name.”


5.2.2 Prompting Patterns to Avoid

Bad prompts don’t fail because they’re wrong — they fail because they’re vague.

Avoid These Patterns:

  • Vague nouns: “Fix my views,” “clean up the model,” “organize sheets”
  • Missing specifics: Which parameter? Which category? Which naming rule?
  • Impossible tasks: “Generate a Dynamo graph,” “design geometry for me”
  • Non‑Revit jargon: “Fix broken stuff,” “optimize layouts,” etc.
  • Multi‑task overloading:
    Bad: “Rename views, export PDFs, and create sheets in one script.”

One objective per prompt yields far better results.


5.2.3 Single‑Task vs Multi‑Task Prompts

Single‑Task Prompts (Recommended)

  • Tighter scripts
  • Higher accuracy
  • Easier to debug
  • Easier to reuse
  • Less ambiguity

Example:
“Rename all selected sheets by appending ‘‑REV1’ to the sheet name.”

Multi‑Task Prompts

Use only if the tasks are sequential and closely related.

Good multi‑task example:
“Duplicate all floor plan views and apply the ‘Coordination’ view template to each duplicate.”

Bad multi‑task example:
“Duplicate views, place them on sheets, export PDFs, and clean unused line styles.”


5.2.4 Iterative Prompting Workflow

Maestro AI excels when guided iteratively. Use this workflow:

Step 1 — First Draft Prompt

Describe the task in plain English. Don’t overthink it.

Step 2 — Inspect the Code

Look for:

  • Parameters spelled incorrectly
  • Category filters
  • Missing transactions
  • Missing try/except blocks

Step 3 — Regenerate with Clarifications

Add corrections or constraints.

Step 4 — Add Manual Adjustments in the IDE

Typical edits:

  • Error handling
  • Naming standard updates
  • Changing filters
  • Adding MVARs for user control

Step 5 — Test in Revit

Use a small selection or a safe file.

Step 6 — Finalize & Save

Store to Script Library.
Enterprise users may convert into a Deployment when ready.


5.2.5 Prompting Examples (Good vs Bad)

Good Prompt

“Select all walls on Level 2 whose type name contains ‘Exterior’. Set the parameter ‘Comments’ to ‘Check fire rating’. Skip walls shorter than 8 feet.”

Bad Prompt

“Fix the wall comments.”

Good Prompt

“Duplicate each selected floor plan with detailing and append ‘‑FLS’ to the end of each view name.”

Bad Prompt

“Make fire plans.”

Good Prompt

“Find all sheets with names containing ‘MEP’, then export those sheets as PDFs using the sheet number as the filename.”

Bad Prompt

“Export all my MEP stuff.”


5.2.6 Common Prompting Mistakes

Mistake: Forgetting to specify element categories

Fix: Always state the category (Walls, Doors, Sheets, etc.)

Mistake: Combining unrelated tasks

Fix: Break tasks into separate prompts or scripts.

Mistake: Leaving parameters unnamed

Fix: Always provide the exact parameter name.

Mistake: Undefined naming rules

Fix: Provide explicit prefixes/suffixes or patterns.

Mistake: Being too verbose

Fix: Use short, direct sentences.


Summary

Effective prompting follows a predictable structure:

  • State the goal
  • Define the scope
  • Describe steps clearly
  • Provide rules or exceptions
  • Avoid multi‑task overload

Mastering prompt strategy results in dramatically better automation, more reliable AI outputs, and faster script development.