When Shopify identifies tags set for products or blogs, the method of determination differs depending on whether the specified tag is included (exact match) or whether a tag with specified characters is included (partial match). Here is an example of the Liquid code for this.
Example code for determining whether a tag matches exactly or partially on a product or blog

