There are two comparison contexts in REI. Each of them is used for different purposes. Generally speaking, the fuzzy context denotes that the equivalent stacks should be primarily the same, but doesn’t have to be functionally the same.

ComparisonContext.FUZZY

With this context, type definitions should only compare the type of the object, or the primary functional difference of the object. Equivalent stacks should be primarily the same.

For example, enchantment books with different enchantments should be different under this context, but tools with different enchantments should be considered equal as it is not the primary function.

Similarly, the item damage of the tool items are not considered under this context, while shulker boxes with differing content should be considered different.

ComparisonContext.EXACT

With this context, type definitions should compare the type, and nbt of the object, while still ignoring the amount of the object. Equivalent stacks should be functionally the same.

For example, tools with different damage values, or different enchantments should be considered different under this context.