> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/start-here/core-concepts/programs-diets-and-rulesets.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/start-here/core-concepts/programs-diets-and-rulesets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
