Mastering Regular expression writing
on Phi-3.5 MoE
Stop guessing. See how professional prompt engineering transforms Phi-3.5 MoE's output for specific technical tasks.
The "Vibe" Prompt
Optimized Version
Engineering Rationale
The optimized prompt uses Chain-of-Thought (CoT) by breaking down the complex task of writing a robust email regex into smaller, manageable sub-problems (local part, separator, domain part, TLD) with specific constraints. It sets a clear persona ('expert in regular expressions') and explicitly asks for a step-by-step thinking process. This structured approach guides the model to comprehensive considerations, reducing the likelihood of common regex pitfalls and improving accuracy. It also specifies output format, which aids parsing subsequent steps.
Ready to stop burning tokens?
Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.
Optimize My Prompts