# Rule Language

The *Rule Language* is a powerful feature which we use in the *Recommender Platform* to process event streams, test condition rules, and produce relevant and precise recommendation messages.

Expressions in *Rule Language* look similar to expressions in Excel or other comparable tools or script/program languages.

To give a first impression, have a look at the following examples, which give an idea how the language can be used:

## Examples

Example of a boolean expression which compares multiple values and uses AND/OR operators:

<pre class="language-java" data-full-width="false"><code class="lang-java"><strong>$GridPowerConsumption > 500 AND ($CarChargingMode = 0 OR $CarChargingMode = 4) 
</strong>AND $IsLowTariffHours = 0
</code></pre>

Example of a text expression, which concatenates static text and dynamic data:

```java
"Heat: " + $HeatCelsius::Value + " °C / " + ($HeatCelsius::Value - 273.15) + " K"
```

## Details

Read in the next sub-chapters about the language [syntax](/platform-manual/rules/rule-language/syntax.md), the [data types](/platform-manual/rules/rule-language/data-types.md) and [structures](/platform-manual/rules/rule-language/data-structures.md), and how to process these with the help of [functions](/platform-manual/rules/rule-language/functions.md) and [operations](/platform-manual/rules/rule-language/operations.md).&#x20;


---

# 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://doc.moost.io/platform-manual/rules/rule-language.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.
