Given a dataset of prompts where each prompt is paired with a list of intention tags (strings), compute the complexity score of each prompt as the number of unique intention tags it carries. Return the prompts sorted by complexity in descending order. Ties are broken by the original input order (stable sort).
prompts: a list of dicts, each with keys:
'text': the prompt string.'tags': a list of intention tag strings (may contain duplicates).Return a list of dicts, each of the form {'text': <prompt text>, 'complexity': <int>}, sorted by complexity descending, with ties broken by original order.