Mastering Regular expression writing
on Perplexity Online 70B
Stop guessing. See how professional prompt engineering transforms Perplexity Online 70B's output for specific technical tasks.
The "Vibe" Prompt
Optimized Version
Engineering Rationale
The optimized prompt leverages a chain-of-thought approach, guiding the model through the methodical construction of a regular expression. It establishes an 'expert persona' to encourage a high-quality output. By explicitly breaking down the problem into sub-steps (local part, @, domain part, TLD validation, edge cases), it primes the model to consider all critical components. The prompt also sets clear expectations for the output format (regex string only) and provides an internal example to help the model's 'thought process' without requiring it to generate output for it. This structured approach reduces ambiguity and directs the model towards a more accurate and comprehensive solution compared to the vague 'vibe prompt'.
Ready to stop burning tokens?
Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.
Optimize My Prompts