Direct-Inverse Prompting: Analyzing LLMs' Discriminative Capacity in Self-Improving Generation