What are Rules?

A Rule is a named set of plain-text instructions for Luzmo's AI agents. Rules apply across your whole organization, not to one dataset, so they're the right place for conventions that hold everywhere:

  • Calendars: "Our fiscal year starts on 1 April." / "Weeks start on Monday."
  • Definitions: "Revenue means net revenue, after discounts and refunds, excluding tax."
  • Terminology: "'Customers' means accounts with at least one active subscription."
  • Default exclusions: "Exclude test and internal accounts unless the user asks for them."
  • Answer style: "Answer in the user's language and keep text answers to three sentences or fewer."

Rules and AI Context together make up the Knowledge Layer: the business knowledge Luzmo's agents use on top of your data.

Benefits

  • Change how the AI answers without a release: until now, changing Luzmo IQ's behavior meant editing the custom prompt in your embed token, which needs a developer and a deployment. With Rules, you edit and publish in the Luzmo app.
  • Write your conventions once: fiscal calendars, metric definitions and terminology live in one place, and every linked Agent uses them.
  • Keep instructions focused and maintainable: several small Rules are easier to read, update and hand over to a product or customer success team than one long prompt.
  • Control what goes live: drafts never affect your Agents, so you can prepare changes and publish them when you're ready.

Rules, AI Context and custom prompts

Luzmo offers several ways to give its AI agents context. They're additive: each one adds to the others.

Rules AI Context Custom prompt
What it describes Organization-wide conventions and instructions The meaning of a specific dataset, column, formula or dashboard Instructions for one embedded experience
Where you manage it Luzmo app → Agents → Knowledge Dataset details and dashboard settings The embed token (developer)
When it applies When a linked Agent handles a request Whenever that dataset, column or dashboard is used For users of that embed token

A few things to keep in mind:

  • Rules and a custom prompt have equal priority. If they contradict each other, the model decides which instruction to follow. Keep each instruction in one place: when you move an instruction into a Rule, remove it from the custom prompt.
  • Your existing custom prompt keeps working. You can move instructions into Rules at your own pace.
  • Describe a single column or formula with AI Context, not a Rule. See Using AI Context to guide Luzmo's AI feature.

Before you start

  • Who can manage Rules: Owners and designers in your organization can create, edit, publish, unpublish and delete Rules. Other members of the organization can view them.
  • Who can link Rules to an Agent: anyone with edit rights on that Agent.
  • An Agent: Rules are applied through Agents. If you don't have one yet, create an Agent first.
  • Your end users don't see Rules: your team configures Rules in the Luzmo app. End users simply get answers from the Agent in your product.

How to create a Rule

  1. In Luzmo, go to Agents → Knowledge. This opens the Rules overview.
  2. Click New Rule.
  3. Give your Rule a Name (up to 120 characters) that says what it covers, for example "Fiscal calendar".
  4. Write the instructions in Content (plain text, up to 20,000 characters).
  5. Click Save draft to keep working on it, or Save & publish to make it available to linked Agents right away.

Draft, published and saved changes

Every Rule is either Draft or Published.

Status What it means
Draft The Rule is not available to Agents, even when it's linked to one.
Published The Rule is available to the Agents it's linked to.

You can keep editing a Published Rule. When you Save draft on a Published Rule, your changes are saved but not yet live: the Rule shows Saved changes not published, and linked Agents keep using the published version. Click Publish changes when you're ready to make them live.

On the Rule's page, Edit shows your latest saved content, and Published version shows the read-only version your Agents currently use.

How to link a Rule to an Agent

  1. In Luzmo, go to Agents and open the Agent you want to use.
  2. In the Context section, open Rules and select one or more Rules. Only published Rules appear in this list.
  3. Click Save.

A Rule can be linked to several Agents, and an Agent can use several Rules. On each Rule, Linked Agents shows which Agents use it.

Every published Rule linked to an Agent is included in every request that Agent handles, whatever the question.

Use the Agent in your product

Once your Rules are linked, use the Agent wherever your users ask questions:

  • In the Luzmo app: open the Agent and click Open in Chat to try a few questions before rolling it out.
  • In your product: pass the Agent's ID to IQ Chat, to the API or to the MCP server. On the Agent's page, you'll find its Agent ID, and options to generate embed code or an MCP server URL.

For the technical details, see the developer documentation.

Unpublish or delete a Rule

  • Unpublish makes a Rule unavailable to all linked Agents straight away. Its latest content and its Agent links are kept, so you can publish it again later.
  • Delete removes a Rule permanently, together with its Agent links. Only Draft Rules can be deleted: unpublish a Published Rule first. This can't be undone.

What should you write?

Write what a new colleague would need to know to answer questions about your business correctly. Keep each Rule to one topic and a few clear sentences.

A few examples you can adapt:

Fiscal calendar
Our fiscal year starts on 1 April and ends on 31 March. "This year" means the current fiscal year. Fiscal quarters: Q1 = April to June, Q2 = July to September, Q3 = October to December, Q4 = January to March.
Revenue definition
"Revenue" means net revenue: after discounts and refunds, excluding tax. Use the Net revenue formula when it exists. Only show gross revenue when the user asks for it.
Customer terminology
"Customers" and "active customers" mean accounts with at least one active subscription at the end of the period. "Churned" means the last subscription ended during the period.
Default exclusions
Unless the user asks for them, exclude test and internal accounts (account type = Test or Internal).
Answer format
Answer in the user's language. Show amounts in EUR without decimals. Keep text answers to three sentences or fewer.

What not to write

  • Secrets, credentials or personal data. Rules are sent to the AI with every request of the linked Agents.
  • Access rules such as "never show salaries". Rules are not a permission system: use embed token filters and dataset access instead.
  • Long documents or full data dictionaries. Every linked Rule is sent with every request, so long Rules add cost and latency and can make answers less focused. Keep only what changes answers.
  • Vague instructions such as "be accurate" or "never make mistakes". They add text without changing answers.
  • The meaning of one column or formula. That belongs in the AI Context of that column or formula.

Before and after example

Question: "What was our revenue this fiscal year?"

  • Before: the Agent uses the calendar year (January to December) and sums the gross amount.
  • After publishing and linking the "Fiscal calendar" and "Revenue definition" Rules above: the Agent uses April to March and net revenue.

Best practices checklist

  • One topic per Rule, with a name that says what it covers.
  • Short, specific instructions, with examples when a term is ambiguous.
  • No duplicates or contradictions between Rules, AI Context and your custom prompt.
  • Start with one or two Rules for the questions your users get wrong most often.
  • Test a few representative questions before and after publishing.
  • Review your Rules when your business definitions change.

How to check whether a Rule helps

  1. Pick a few representative questions that your users ask, including ones that are answered incorrectly today.
  2. Ask them to the Agent (for example with Open in Chat) and note the answers.
  3. Publish the Rule and link it to the Agent.
  4. Ask the same questions again and compare.

If an answer doesn't change, make the Rule more specific, or check whether the issue comes from elsewhere: a missing AI Context on a column, or the Agent picking the wrong dataset. More context isn't always better.

Current limitations

  • Every published Rule linked to an Agent is included in every request that Agent handles. Rules can't yet be loaded only when they're relevant to the question.
  • A draft can't be tested with an Agent before it's published.
  • There's no version history or rollback beyond the current published version and your latest saved changes.
  • Rules are plain text. There's no Markdown editing and no document import.
  • Agent Logs don't show yet which Rules were applied to an answer.

FAQ

Do Rules replace the custom prompt in my embed token? No. Both apply side by side, with equal priority. You can move instructions into Rules at your own pace.

Do I need an Agent to use Rules? Yes. A Rule only takes effect once it's published and linked to an Agent, and that Agent is used in IQ Chat, the API or the MCP server.

Does a Rule give users access to more data? No. Rules only guide how the AI answers. The embed token and dataset access still decide what each user can see.

What happens to linked Agents when I unpublish a Rule? They stop using it immediately. The Rule keeps its content and its Agent links, so publishing it again makes it available to the same Agents.

I edited a Published Rule. Why don't my Agents use the new version? Saved changes on a Published Rule aren't live until you click Publish changes. Until then, linked Agents keep using the published version.

Why can't I find my Rule when linking it to an Agent? Only published Rules can be linked. Publish the Rule first, then select it in the Agent's Context section.

Will Rules make every answer correct? Rules give the AI your conventions and definitions, so answers follow them. They don't fix every issue: if the Agent picks the wrong dataset or a column is misunderstood, look at the Agent's dataset selection and the AI Context of that dataset or column too.

Who in my organization can see and edit Rules? Owners and designers can create, edit, publish and delete Rules. Other members of the organization can view them.

Related articles

Need more information?

Do you still have questions? Let us know how we can help.
Send us feedback!