Mastering Regular expression writing
on Groq Llama 3.1 70B
Stop guessing. See how professional prompt engineering transforms Groq Llama 3.1 70B's output for specific technical tasks.
The "Vibe" Prompt
Optimized Version
Engineering Rationale
The optimized prompt works by providing a clear persona ('Regex engineer'), detailed step-by-step instructions for the task (analyze, break down, construct, edge cases, optimize, format), and specific output expectations ('ONLY the regex pattern'). The zero-shot example demonstrates the desired input-output format and implicitly teaches the model to consider common regex components and typical email pattern complexities without explicit instructions. This structure reduces ambiguity, guides the model's thought process towards a precise solution, and aims to minimize extraneous conversational output, leading to more focused and accurate regex generation.
Ready to stop burning tokens?
Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.
Optimize My Prompts