> ## Documentation Index
> Fetch the complete documentation index at: https://fossabot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Phrase Groups

Phrase groups allow you to define a set of phrases that must be matched in order to trigger a keyword. Every single phrase within a given phrase group **must** match, else Fossabot will continue to match other groups.

You can have multiple phrase groups per keyword, which act as "OR" statements for triggering a keyword. Phrase groups are by default fuzzy-matched and case-insensitive, but there are optional flags that allow you to customize the matching behaviour of a given phrase:

## Adding a phrase to a group

To add a phrase to a phrase group, simply click inside a phrase group:

![First step to adding a phrase](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/adding-phrase-step-1.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=55401f9e3a63e3780ab138a25ef2fc90)

Then type the phrase into the input:

![Second step to adding a phrase](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/adding-phrase-step-2.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=adabdaf78911c3e9d5713dc7dd403391)

Finally, hit the **return key on your keyboard** to add it to the phrase:

![Third step to adding a phrase](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/adding-phrase-step-3.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=87cb8054cf65786ae16e05440d9d56b9)

You should see the phrase in a blue tag, this means it has been added to the keyword phrase group.

## Using phrase groups

Consider the following phrase group:

![First example](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/example-1.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=8f52ec5b6c820717900af4d193a193ef)

This phrase group will trigger if `you`, `are` and `awesome` appear **anywhere** in the message content. So `you are awesome` could match, but so could `awesome are you` or even `you are not awesome`. This also ignores spaces, so `you're aren't awesomest` would also be matched by Fossabot.

However, you could combine these phrases into a single phrase:

![Second example](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/example-2.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=1d2039d89183ad5d978b33f44465867a)

Then Fossabot would match `you are awesome!!`, but **not** `you are not awesome` - as the entire phrase block is not able to be matched **anywhere** in `you are not awesome`.

## Multiple phrase groups

Assuming a use case where you would like to match `you are awesome` or `you are cool`, it may be your first instinct to do something like this:

![Example of an incorrect phrase group](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/incorrect-phrase-group.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=54ac34afe3220a8e5248765e60d380e9)

However, **this is incorrect!** You are asking Fossabot to only match content that contains **both** `you are cool` **AND** `you are awesome`. You will want to create multiple phrase groups to create an `OR` condition, where instead you ask Fossabot to match if **either** phrase exists.

Click the `Add Phrase Group` button, it will add another input, and move `you are cool` into the below phrase group like so:

![Example of a correct phrase group](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/keywords/correct-phrase-group.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=2633fff5be080d1b9ee4fb590f4c4a21)

This will then match if **either** `you are cool` OR `you are awesome` is contained within the message content!


## Related topics

- [Creating a Lookalike](https://fossabot.com/docs/lookalikes/creating-lookalikes.md)
- [Variables](https://fossabot.com/docs/keywords/variables.md)
- [$(autoreason)](https://fossabot.com/docs/keywords/autoreason.md)
- [Keywords](https://fossabot.com/docs/keywords/index.md)
- [Flags](https://fossabot.com/docs/keywords/flags.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.