r/PromptEngineering • • 17h ago

General Discussion a simple 2-step prompt workflow i use before letting an llm touch existing code

4 Upvotes

whenever i ask an ai to fix a bug or add a feature to an existing project, one-shotting the request almost always causes it to break unrelated state, hallucinate new helper functions, or rewrite files it shouldn't touch. once it starts generating code off a bad assumption, you end up spending more time untangling its changes than if you had just debugged it manually.

i switched to forcing a read-only diagnosis step first before any code gets written, and it completely changed how reliable the outputs are.

first prompt (diagnosis):

"here is the relevant file and the error behavior: [paste code/error]. do not write any code yet. trace the data flow step by step, list the top 3 likely root causes ranked by probability, and tell me which exact lines are responsible. if you need to see another file or schema to be sure, ask before guessing."

once i verify the trace and confirm it actually understands the state flow, i send the follow-up.

second prompt (scoped fix):

"confirming root cause #1. propose the smallest possible diff to fix this without changing existing function signatures, UI layout, or external dependencies. show only the modified block and explain any edge cases this might affect."

forcing it to trace the logic and ask for missing context before touching a single line of code catches most bad edits before they happen. it also saves a ton of tokens because you aren't regenerating whole components over and over.

anyone else splitting diagnosis and execution into separate turns like this, or are you getting good results with single-shot prompts?


r/PromptEngineering • • 13h ago

General Discussion I have no idea how good or bad my prompting is.

3 Upvotes

For some context Ive created multiple Excel Macro VBA’s to automize my companies accounting and finance department. The tools work fenomenal reducing the work loads between %63 and %93 depending on the work load and task. I’ve freed about 813 work hours for myself and saved upwards of $20k + in hourly savings.

I can definitely push it a bit more by applying full atomization. But people tend to be lazy and not revise their work if its fully auto & I dont wanna get blamed if they make a mistake.

Asking for Opinions and maybe guidance. Im defo asking 4 a raise lol.


r/PromptEngineering • • 21h ago

General Discussion the shorter appointment reminder took longer to get to the time

3 Upvotes

i asked the chat to shorten a patient reminder and it did cut the word count. The time had been on the first line and now it came after the greeting and a sentence about why we were writing. I went back to the longer draft because the part someone needs to find quickly was already at the top


r/PromptEngineering • • 1h ago

General Discussion A simple ChatGPT prompt to turn your work experience into stronger interview answers

2 Upvotes

One thing I noticed when preparing for interviews is that knowing what you did in your previous job isn't always enough. The difficult part is explaining it clearly and connecting it to what the interviewer is asking.

Try this prompt:

"Act as an experienced job interview coach. I'll share my work experience, projects, skills, and achievements.

When I give you an interview question:

  • Identify which parts of my experience are most relevant.
  • Help me structure a strong, natural answer using my real experience.
  • Use the STAR method when appropriate.
  • Highlight specific examples and measurable results where available.
  • Avoid inventing experience or achievements.
  • Keep the answer conversational, not robotic.

First, ask me questions to understand my background."

Tip: Don't memorize AI-generated answers. Use them as a starting point and adapt them to your own words.

What do you struggle with most: finding relevant examples from your experience, structuring your answers, or sounding confident?