Writing a system prompt for TagoRUN AI
The system prompt gives the TagoRUN assistant application knowledge and instructions for responding to users.
Use it to explain your application's terminology, describe supported workflows, and provide documentation the assistant can use in its answers.
Configure it under TagoRUN → AI → System Prompt, then click Save. The field accepts up to 30,000 characters, and users never see it.
TagoIO adds its own instructions before yours. The assistant already knows it is the assistant of a portal, treats the session as read-only, never names the platform or shows internal identifiers, and reports data it was not granted as unavailable. Your prompt can set its name, tone, and domain and add any knowledge you want; it cannot override those rules.
What to include
Write instructions that help the assistant answer the questions your users actually ask.
Application context
Describe:
- What the application monitors or manages.
- Who uses it and what they need to accomplish.
- How users refer to devices, equipment, locations, and other resources.
- What important variables and statuses mean.
Be specific about names that can be misunderstood. For example, explain whether a "device" represents a sensor, a gateway, or an entire machine.
Response guidelines
Specify how the assistant should communicate:
- The language and level of technical detail appropriate for your users.
- When to ask a clarifying question.
- When to include units, timestamps, or the requested time range.
- How to explain missing data or unavailable operations.
- Whether to summarize first and provide details afterward.
Prefer concrete instructions such as "include the measurement timestamp" over broad instructions such as "always be accurate."
Application documentation
Paste relevant excerpts from your documentation, such as:
- Definitions of measurements and statuses.
- Instructions for common tasks.
- Explanations of application-specific calculations.
- Approved troubleshooting procedures.
- Guidance on when to contact an application administrator.
Give each excerpt a descriptive heading. Include the information needed to answer the question directly rather than assuming that a documentation URL makes its contents available to the assistant.
Only include procedures and capabilities that your application actually supports.
Do not put passwords, tokens, provider credentials, or customer-confidential records in the system prompt. Include only reference material appropriate for the assistant's audience.
Use Access Management and restricted queries to enforce data access. Instructions in the system prompt are not a substitute for authorization.
Example: a fleet-monitoring assistant
The following example describes a sample application. Replace its terminology and procedures with your own before using it.
You assist users of Fleet Monitor, an application for monitoring tracking
devices installed in vehicles.
Application context
- Users may refer to a tracking device as a tracker or a device.
- battery_level describes the tracker's battery, not the vehicle's battery.
- A stored reading describes a measurement at its recorded time. It does
not necessarily describe the device's condition right now.
How to respond
- Use clear, concise language suitable for fleet operators.
- Answer the user's question first, then add supporting details.
- For data-based answers, include the device name, measurement unit when
available, and measurement timestamp.
- Ask for clarification when the requested device or time period is
ambiguous and that information is needed to answer.
- Do not invent readings, units, thresholds, device names, or completed
actions.
- If a request cannot be completed, explain what information or access is
missing when that is known.
- Do not describe missing data as a zero reading.
- Do not claim that an operation succeeded without a successful result.
Application reference: battery readings
battery_level reports the battery measurement received from the tracker.
Use the unit returned with the reading. Do not assume a percentage when
the unit is unavailable.
Application reference: checking a battery reading
Check the timestamp before interpreting a battery measurement. If no
recent measurement is available, explain that the current battery
condition cannot be determined from the available data.
Application reference: questions outside this documentation
If the application reference does not explain a procedure, say that the
procedure is not documented here. Ask the user to contact their
application administrator rather than inventing navigation steps.
These instructions guide the assistant's behavior. Test the resulting answers rather than treating the prompt as a guarantee.
Keep instructions separate from permissions
Describe how the assistant should handle information it is allowed to retrieve.
Do not rely on instructions such as "only show the current customer's data" to implement customer isolation. Enforce that restriction through resource permissions or the SQL of an authorized saved query.
Similarly, a prompt that mentions a device or dashboard does not make that resource available to the assistant.
Test the prompt
Start with a user who has chat access but no data-reading permissions.
Ask questions that the application reference should answer, such as:
- "What does battery_level mean?"
- "Does a missing reading mean the battery is empty?"
- "How do I know whether a reading is recent?"
Then test with a user who has the intended data permissions:
- Compare a data-based answer with the actual stored values.
- Ask an ambiguous question and check whether clarification is useful.
- Ask about an unsupported procedure and check that the assistant does not invent steps.
- Ask for an unauthorized resource and verify that the request does not retrieve its data.
Revise the prompt when the assistant lacks application context, uses the wrong terminology, or gives more detail than the audience needs. Changes apply to the next message sent.
Maintain the application reference
Keep a copy of the system prompt with your application documentation.
Review it when variable meanings, workflows, business rules, or support procedures change. Remove obsolete instructions instead of adding conflicting corrections at the end.
Include enough context to answer common questions, and remove material that does not help users complete a supported task.