Prompting guidelines
The quality of Naia Build’s output is directly dependent on the quality of the instructions it receives. This page covers the principles and practices that produce reliable, accurate generation, and the common patterns that lead to corrective iterations.
Preparation before prompting
The most effective prompting decisions are made before you open the Chat tab. Defining the following upfront reduces misaligned output and preserves the session iteration budget for building rather than correcting:
-
The business process the application supports
-
The user types who will interact with the application
-
The key data entities involved and their core fields
-
Any specific constraints — offline support, device type, SAP integration, specific component types, or branding requirements
Constraints in particular should be stated explicitly. Naia does not infer requirements that are not present in the prompt or the application context. An offline requirement added after an application has been scaffolded requires more corrective work than one stated at the outset.
Prompt structure
Prompts that produce reliable output consistently address the following:
| Element | Description | Example |
|---|---|---|
What |
The component, feature, or change being requested |
|
Where |
The location within the application |
|
Data |
The data source or entity to reference |
|
Behavior |
Interaction, validation, or logic required |
|
Constraints |
Platform, device, or design requirements |
|
Not every prompt requires all five elements. A styling change requires different inputs than a data-bound component. The principle is that each element present in a prompt reduces the amount Naia must infer, and reduces the likelihood of misaligned output.
Well-structured prompt example:
On the Work Orders page, create a list view displaying work order ID, status, and assigned technician from the GET /workorders API operation. The list should be sortable by status and function in offline mode.
Prompt example likely to require corrective iterations:
Make a work orders list.
Component context
When a prompt targets a specific UI element, select the component using Smart Inspect before submitting the prompt. The selected component becomes the active context for the Chat tab request. This eliminates the need to describe which element is being addressed and reduces the risk of changes being applied to the wrong component.
For visual changes that are difficult to describe precisely in text, Smart Inspect also supports drag-selection to add to chat. An annotated drag-selection attached to a prompt gives Naia Build explicit visual context alongside the text instruction.
Scope per prompt
Prompts addressing multiple unrelated changes in a single instruction produce less consistent results than sequential, focused prompts. Each prompt should address one concern. The result should be reviewed before the next prompt is submitted. This also means that if a generation step produces an unexpected result, the revert point in the History tab is clean and specific.
Styling and branding prompts
Visual changes applied through prompting are most reliable when specific values are provided rather than relative or subjective descriptions.
| Less reliable | More reliable |
|---|---|
|
|
|
|
|
|
|
|
Where a consistent style needs to be applied across multiple components, establish the style on one component first, verify it, then use the right-click copy and paste style actions to propagate it, rather than prompting for broad styling changes across the entire application in a single step.
Offline support
Applications intended to function in offline or low-connectivity environments should have this requirement stated in the initial prompt. Offline support involves IndexedDB storage and synchronization logic that is more straightforward to generate from the outset than to retrofit onto an existing application structure.