# AI Rules

In the AI Rules section of CSML Studio, you will find a way to configure flow commands for any of your flows. This section makes it easy to see in one single screen all the rules that govern the triggering of any of your flows!

Commands are words or sentences (or intents, when NLU is configured) that will trigger a given flow. For example, in the example below, if a user says `"Hi"`, no matter where they are in the bot, they will be redirected to the `Welcome` flow:

![](/files/-MbLZDU1D7SOL6dsiO-d)

You can have as many AI Rules as you want on as many flows as you want. The commands are case-insensitive, so for example `"Hi"`, `"hi"`, `"HI"` and `"hI"` will all trigger the `Welcome` flow. Also, if the same rule is used as an input to two different flows, the triggered flow will be randomly chosen among the target flows.

This feature can also be used in conjunction with any Preprocessing or NLP configured in your bot. For instance, if after going through a NLP service, an intent is detected, the intent name can be used as a command for any given flow (with the `intent:` prefix, i.e `intent:myIntentName`). For instance, this is how an intent called `DemoContext` would be handled with AI Rules:

![](/files/-MbLZYnqfhtNZFGruiIu)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.csml.dev/studio/getting-started/nlp/ai-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
