The Hustling Engineer

The Hustling Engineer

Share this post

The Hustling Engineer
The Hustling Engineer
🧠 How to Be a Better Prompt Engineer

🧠 How to Be a Better Prompt Engineer

Crafting better prompts to get 10x better results from AI tools

Hemant Pandey's avatar
Hemant Pandey
May 24, 2025
∙ Paid
18

Share this post

The Hustling Engineer
The Hustling Engineer
🧠 How to Be a Better Prompt Engineer
2
Share

Prompt Engineering is the most underrated skill in 2025

Whether you’re debugging a complex bug, writing documentation, or organizing sprint planning notes, your ability to ask clear, structured prompts directly impacts the quality of answers you get from ChatGPT or other LLMs.

I just created a new digital product “60 AI Prompts to make you a Superstar Engineer”

This is free for all Paid Subscribers. Check out the “Paid Subscribers” page for 100% off coupon

In this newsletter, we will discuss

  • The anatomy of a good prompt

  • Use cases and Examples

  • 5 Prompting techniques that work

  • Common Pitfalls to avoid

  • FREE digital product for paid subscribers


🛠️ What Is Prompt Engineering?

Prompt engineering is the skill of communicating with large language models (LLMs) in a structured, contextual way to guide them toward giving precise, actionable, and relevant responses.

Think of it as API design for humans—except the "API" is the AI model, and your prompt is the request body.


⚖️ The Anatomy of a Good Prompt

Let’s break this down with side-by-side comparisons:

🧪 Example 1: Code Refactoring

❌ Bad Prompt

"Fix this code."

  • 🟥 Why it's bad: No context, unclear goal, and no guidance on the expected style or formatting.

✅ Better Prompt

You're a senior Python engineer.  
Refactor the following function to:
- Follow PEP8 standards  
- Improve readability  
- Add meaningful comments

Output only the revised function code.

<insert function>
  • ✅ Why it works:

    • Assigns a role → helps the model frame its response in that mindset

    • Defines clear goals (PEP8 + readability + comments)

    • Specifies the output format


🧪 Example 2: Debugging

❌ Bad Prompt

"Why is my code broken?"

  • 🟥 Why it's bad: No code, no error, no reproduction context.

✅ Better Prompt

I’m getting a `NoneType` error when calling this function.  
Here’s the traceback and function definition.  
Can you help me identify the issue and suggest a fix?

<insert traceback>  
<insert code>
  • ✅ Why it works:

    • Mentions specific error type

    • Shares exact code and traceback

    • Asks for diagnosis and fix explicitly


This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Hemant Pandey
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share