How to Write Effective Prompts for AI: A Practical Guide for Engineers
Today, an engineer’s work speed depends not only on how well they know Revit, AutoCAD, or Civil 3D. It’s also important to be able to use modern technologies that reduce hours of routine work to just a few minutes.
AI plugins and AI agents can already help engineers automate repetitive operations, create and check code, find errors, analyze technical information, and complete everyday tasks faster. However, even the most powerful tool won’t give a quality result if it’s given an unclear task.
Between an answer that can be used immediately in work and a result that will have to be completely redone, there is often only one difference — the quality of the formulated prompt.
For a technical specialist, a prompt is not just a question to artificial intelligence. It is a short technical assignment in which you need to clearly define what exactly needs to be done, what data or objects to work with, what requirements to take into account, and in what format to provide the result.
In this article, we will first look at typical mistakes in formulating prompts, and then show an approach that helps get more accurate, professional, and genuinely useful answers from AI for engineering work.
Part 1. How Not to Write a Prompt
Mistake #1. Giving an overly general command
The most common mistake is using short queries without context:
- “Optimize the model”
- “Fix the drawing”
- “Change the pipes”
- “Place the labels”
- “Write a plugin for AutoCAD”
For a person working on a project, such phrasings may seem clear. But AI doesn’t see the full picture.
It doesn’t know:
- which specific elements need to be changed;
- which system they are in;
- which parameters are important;
- which objects should not be touched;
- what you consider to be the correct result.
Therefore the query:
Change sewage pipes
can be interpreted in dozens of different ways.
AI may suggest changing the diameter, material, system type, location, or even creating new elements. If this is not specified in the prompt, the model is forced to guess.
Better ✅
In System Type PL_Sewage, find pipes where System Name begins with SW.
Change Diameter from 160 mm to 110 mm.
Modify only elements that meet these conditions.
Now it’s clear:
- which system to work with;
- how to find the needed pipes;
- which parameter to change;
- what value to set;
- which elements not to process.
Mistake #2. Not specifying specific objects
Queries like:
- “Change the elements”
- “Process the text”
- “Place the blocks”
don’t explain which specific objects are meant.
For example, in AutoCAD, text can be represented as:
- MText;
- DBText;
- a block attribute;
- dimension text;
- text in a table.
If the object type is not defined, AI may create a solution that works with the wrong elements.
Better ✅
Process only MText entities.
Do not process DBText, block attributes, dimensions or tables.
Or for Revit:
Process only Pipes from System Type PL_Sewage.
Ignore all pipes from other systems.
If objects should be selected manually, this also needs to be specified:
Apply the operation only to elements selected by the user.
Mistake #3. Using approximate parameter names
In technical assignments, the accuracy of names matters.
For example, if a parameter in Revit is called System Type, you shouldn’t replace it with a general phrasing. If an attribute in AutoCAD is named VG-1, you need to use exactly that name.
Unsuccessful query ❌
Change the system parameter and comment.
Better version ✅
Set the Mark parameter to SW-1.
Set the Comments parameter to Sewage Pipe.
It’s advisable to copy the names of parameters, families, types, layers, and properties directly from the program or working file.
Mistake #4. Not specifying units of measurement
The phrasing:
Change Diameter to 110
is incomplete. The value 110 could mean millimeters, centimeters, meters, or even the program’s internal units.
In a technical prompt, a number without a unit of measurement can lead to incorrect logic or an error in the code.
Better ✅
Change Diameter from 160 mm to 110 mm.
Move the blocks 500 mm to the right.
Rotate the elements by 90 degrees.
Align the labels with a 2 mm offset.
For the Revit API, it’s also worth adding:
Convert all millimeter values correctly to Revit internal units.
Mistake #5. Not setting restrictions
Even a correctly described action can give an undesired result if you don’t specify what AI should not do.
For example, the query:
Change the diameter of sewage pipes
doesn’t explain whether it’s allowed to:
- change all systems;
- create new types;
- delete elements;
- change fittings;
- process locked parameters.
Better ✅
Modify only pipes that match the specified conditions.
Do not create or delete elements.
Do not change element types.
Ignore all other systems.
Skip elements with missing or read-only parameters.
Such restrictions protect the model or drawing from unnecessary changes.
Mistake #6. Not explaining the expected result
The query:
Add text to MText
doesn’t answer several important questions:
- should the text be added at the beginning or the end;
- should formatting be preserved;
- what should the result look like;
- can other properties be changed.
The best way to avoid misunderstanding is to show a “before” and “after” example.
Text entered by the user: (test)
Before execution:
MText.Contents = "12321qqq"
After execution:
MText.Contents = "12321qqq(test)"
Such an example often explains the task more precisely than several paragraphs of text.
Mistake #7. Combining many actions into one sentence
A complex query written as continuous text is hard to understand correctly even for a human.
For example:
Ask for text, then let the user select MText, add the text, don’t change anything else, stop the command with Enter, and show the number of changed objects
In such a phrasing, it’s easy to miss part of the logic.
Better ✅
Workflow:
1. Ask the user to enter a text string.
2. Allow the user to select MText entities.
3. For each selected MText object:
- Read the current Contents value.
- Append the entered text.
- Save the updated value.
4. Stop when the user presses Enter or Esc.
5. Show the number of modified objects.
When each action is written as a separate step, it’s much easier for AI to reproduce the correct process.
Mistake #8. Writing only “it doesn’t work”
When generated code contains an error, a message like:
- “It doesn’t work”
- “Fix the code”
gives AI almost no information for analysis.
The cause could be:
- an incorrect API version;
- a missing library;
- the object type;
- units of measurement;
- a read-only parameter;
- a syntax error;
- a program version mismatch.
Better ✅
The generated AutoCAD .NET code does not compile.
AutoCAD version: 2026
Programming language: C#
Compiler error:
[insert the complete error message]
Expected result: The command should append user-defined text only to selected MText entities. Actual result:
[describe what happens]
Please fix the error without changing the existing workflow. Do not add new features. Return the corrected complete code.
The more relevant context AI receives, the faster it can find the cause of the problem.
Part 2. What Works Effectively
1. Start with context
At the beginning of the query, briefly explain:
- which program you are working in;
- which version is being used;
- which model or drawing you are working with;
- what task needs to be solved.
For example:
I am working in Revit 2026 with a plumbing model.
The project contains several pipe systems.
The operation must apply only to the PL_Sewage system.
Context helps AI choose the right approach even before starting the task.
2. Formulate the final goal
Don’t start right away with a list of technical actions. First explain what result needs to be obtained.
For example:
Create a Revit tool that updates the diameter and selected parameters of sewage pipes.
Or:
Create an AutoCAD command that appends user-defined text to selected MText objects.
The final goal helps AI understand the overall logic of the task, not just execute individual commands.
3. Define selection criteria
Describe exactly how to find the needed elements.
For example:
Process only Pipes where:
- System Type equals "PL_Sewage";
- System Name begins with "SW";
- Diameter equals 160 mm.
For AutoCAD, this might look like:
Process only blocks where:
- Block Name equals "Zinor koltan";
- attribute VG-1 equals "Glass";
- the block is located in the current drawing space.
The more precisely the criteria are defined, the lower the risk of changing the wrong objects.
4. Describe the required changes in separate points
Instead of one long sentence, it’s better to create a separate block:
Required changes:
1. Change Pipe Diameter from 160 mm to 110 mm.
2. Change the Radius of R1 Connector fittings to 55 mm.
3. Set Mark to "SW-1".
4. Set Comments to "Sewage Pipe".
Such a format is easy to check before sending and convenient to use when testing the result.
5. Add rules and exceptions
AI should know not only the main scenario, but also how to act in non-standard situations.
For example:
Rules:
- Modify only elements that match all selection criteria.
- Skip elements with missing parameters.
- Skip read-only parameters.
- Continue processing if one element cannot be updated.
- Record every skipped element and the reason.
This is especially important for large models where different elements may have different parameter structures.
6. Define the result format
Explain exactly what you want to receive from AI.
For example:
Provide complete compilable C# code.
Do not include unrelated helper methods.
Or:
First explain the proposed workflow.
Then provide the code.
At the end, add a short testing checklist.
For non-programming tasks:
Present the result as a step-by-step instruction.
Use a table with the columns: Step, Action, Expected Result.
7. Ask for a report after execution
After automatically making changes, it’s useful to get a short summary.
For example:
After completion, show:
- number of updated pipes;
- number of updated fittings;
- number of skipped elements;
- list of errors.
Such a report helps quickly verify whether the result meets expectations.
Universal Formula for an Effective Prompt
For most engineering tasks, you can use the following sequence:
- Role — Who AI should act as: Act as an experienced Revit API developer and BIM automation specialist.
- Context — Which program, version, and environment the task is being performed in.
- Goal — What final result needs to be obtained.
- Objects — Which objects need to be processed.
- Selection criteria — Under what conditions these objects need to be found.
- Required changes — Which parameters or properties need to be changed.
- Units — In what units the values are given.
- Restrictions — What should not be changed, created, or deleted.
- Error handling — How to act in case of an error or a missing parameter.
- Output format — In what form the answer should be provided.
Example: Weak and Strong Prompt
How not to do it ❌
Change sewage pipes and fittings, add marks and comments and write code for Revit.
In this query, it’s not clear:
- which pipes to process;
- which fittings to change;
- which parameters to set;
- which units to use;
- which Revit version to account for;
- what the code should do in case of an error.
How to do it effectively ✅
Role:
Act as an experienced Revit API developer and BIM automation specialist.
Context:
I am working in Revit 2026 with a plumbing model.
The project contains several pipe systems.
The operation must apply only to the PL_Sewage system.
Goal:
Create a Revit tool that updates the diameter and selected parameters of sewage pipes and fittings.
Selection criteria:
1. Process only Pipes where:
- System Type equals "PL_Sewage";
- System Name begins with "SW";
- current Diameter equals 160 mm.
2. Process only Pipe Fittings where:
- Type Name equals "R1 Connector".
Required changes:
1. Change Pipe Diameter from 160 mm to 110 mm.
2. Change the Radius of matching Pipe Fittings to 55 mm.
3. Set Mark to "SW-1".
4. Set Comments to "Sewage Pipe".
Units:
All values are specified in millimeters.
Convert them correctly to Revit internal units.
Restrictions:
- Do not modify elements from other systems.
- Do not create or delete elements.
- Do not change element types.
- Skip missing or read-only parameters.
- Do not add unrelated functionality.
Error handling:
- Continue processing if one element cannot be updated.
- Record skipped elements and the reason for each failure.
Result:
After completion, show:
- number of updated pipes;
- number of updated fittings;
- number of skipped elements;
- list of errors.
Output format:
1. Briefly explain the proposed logic.
2. Provide complete C# code for Revit 2026.
3. Add a short testing checklist.
In the second case, AI receives not an abstract request, but a structured technical assignment.
Ready-Made Prompt Template for Daily Work
This template can be adapted for Revit, AutoCAD, Civil 3D, and other engineering programs.
Role:
Act as an experienced [specialist role].
Context:
I am working in [software and version].
The current project contains [brief project description].
Goal:
I need to [describe the final result].
Objects:
Process only [specific objects, categories, families, types or entities].
Selection criteria:
- [criterion 1]
- [criterion 2]
- [criterion 3]
Required actions:
1. [action 1]
2. [action 2]
3. [action 3]
Parameters and values:
- [parameter name]: [value]
- [parameter name]: [value]
Units:
Use [millimeters, meters, degrees or other units].
Restrictions:
- Do not modify [objects or parameters].
- Do not create or delete [elements].
- Process only [selected or matching elements].
- Do not add unrelated functionality.
Error handling:
- Skip elements with missing or read-only parameters.
- Continue processing after individual errors.
- Record all skipped elements.
Expected result:
[Describe what should happen after successful completion.]
Output format:
Provide [code, instructions, table or workflow].
Add [explanation, report or testing checklist].
Quality Prompt Checklist
Before sending your query, check:
- Is the program and its version specified?
- Is the final goal clear?
- Are specific objects defined?
- Are the names of parameters, families, and types written correctly?
- Are units of measurement specified?
- Is the sequence of actions described?
- Are restrictions established?
- Is an example of the expected result provided?
- Is it explained how to handle errors?
- Is the required response format specified?
- Is a report needed after execution?
The less AI has to guess, the greater the chances of getting a solution that can truly be used in work.
AI does not replace an engineer’s professional knowledge, but it can significantly strengthen a specialist who knows how to correctly set a task. A well-formulated prompt helps reduce routine work, test ideas faster, and use automation more effectively in daily projects.
