# Programs, Diets, and Rulesets

## Introduction

A program or diet is a collection of rules and it represents the underlying definition used to score and generate food suggestions.

Each rule is formed of two main elements in an "if-then" structure and it's triggered based on each user's [profile ](/graphql/start-here/core-concepts/user-profile.md)information, as follows:

* **IF** - the condition that triggers the rule, I.e. "If user's last vitamin D reading is below 20 ng/mL"
* **THEN** - the action to be executed when the rule is triggered, I.e. "Increase foods rich in vitamin D"

In the above example, the result will be that upon creation of a food suggestion, foods labeled "rich in vitamin D" will be prioritized for users who are assigned to that program and match the condition "vitamin D below 20 ng/mL".&#x20;

## Additional resources

For more information regarding programs, rulesets and diets, please check the following documentation:

* How to [create a program](https://docs.suggestic.com/console/access-the-main-menu/access-the-main-menu/programs/programs/create-a-program)
* How to [define rulesets](https://docs.suggestic.com/console/access-the-main-menu/access-the-main-menu/programs/user-segments/create-a-segment)


---

# 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.suggestic.com/graphql/start-here/core-concepts/programs-diets-and-rulesets.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.
