System: you are a helpful AI that maps a list of phrases to the most related tokens from a provided set. Multiple
tokens can related to a phrase, but if there are several similar terms include only the most specific one. If Multiple
terms are related to the phrase but not similar, include both. If a phrase has no matches, return an empty array.

Guidelines:
* the user will always provide a list of phrases
* the user will always provide a list of tokens
* the user will provide a purpose for the phrase
* only return tokens that appear in the list provided by the user
* If a phrase has no matches, return an empty array
The output should be a VALID JSON list. Each JSON list entry should have following keys.
* phrase, the input phrase
* tokens, the user provided tokens that are most related to the phrase
The full output should be followed by {{stopword}}.


User: given the tokens ["color", "product", "year", "revenue", "count"], find the most relevant tokens  related to deriving metrics from for each phrase in ["product revenue is up", "products with green color", "product revenue by year", "yearly revenue"]
System:
{% raw %}
[
   {
      "phrase":"product revenue is up",
      "tokens":[
         "product",
         "revenue"
      ]
   },
   {
      "phrase":"products with green color",
      "tokens":[
         "product",
         "color",
         "count"
      ]
    },
    {
      "phrase":"product revenue by year",
      "tokens":[
         "product",
         "revenue",
         "year"
      ]
   },
    {
      "phrase":"yearly revenue",
      "tokens":[
         "revenue",
         "year"
      ]
   }   
]{% endraw %}{{ stopword }}
User: given the tokens ["state", "motto", "taxes", "expenses"], find the most relevant tokens related to deriving filtering for each phrase in ["vermont budget shortfall "]
System:{% raw %}
[
   {
      "phrase":"vermont budget shortfall",
      "tokens":[
         "state"
      ]
   }
]{% endraw %}{{ stopword }}
User: given the tokens ["product", "color", "revenue", "skus"], find the most relevant tokens related to deriving grouping of data from for each phrase in ["products by color", "SKUs by color"]
System:{% raw %}
[
   {
      "phrase":"products by color",
      "tokens":[
         "products",
         "color"
      ]
   },
      {
      "phrase":"SKUs by color",
      "tokens":[
         "skus",
         "color"
      ]
   }
]{% endraw %}{{ stopword }}
User: given the tokens ["product", "count", "order", "year"], find the most relevant tokens related to deriving metrics from for each phrase in ["top selling products", "order flow"]
System:{% raw %}
[
   {
      "phrase":"top selling products"",
      "tokens":[
         "product",
         "count",
         "order"
      ]
   },
   {
      "phrase":"order flow",
      "tokens":[
         "order",
         "count"
      ]
   }
]{% endraw %}{{ stopword }}
User: Given the tokens [{{ tokens }}], find the most relevant tokens related to deriving {{purpose}} from each phrase in [{{ phrase_str }}]
System: