DEV Community

Cover image for 10 Prompting Techniques My Deep Learning Exam Taught Me (That I Actually Use Now)

10 Prompting Techniques My Deep Learning Exam Taught Me (That I Actually Use Now)

Dhruv Jani on October 17, 2026

You already use prompting every day. You just don't know the names of what you're doing. Every time you type "fix this error" into ChatGPT or "re...
Collapse
 
dj29 profile image
Dhruv Jani •

💡 Funny how a Deep Learning exam ended up teaching me techniques I now use in my everyday AI workflows!

These aren't just exam notes anymore — they're practical lessons I've picked up and started applying while building projects.

Which prompting technique has made the biggest difference in your AI workflow? 👀

Collapse
 
taqui profile image
Taqui •

Great Reading dude, i have also wrote an article on this dev.to/taqui/why-your-llm-prompts-...

In the 3rd section i have discussed about something really cool that you might need to know:)

Collapse
 
dj29 profile image
Dhruv Jani •

Read it! Cool. Its one of the reasons, writing a system prompt takes a lot of time testing and trying to break it yourself. I've been there.😅

I've done it for a lot of projects.

Have A Great Day!

Collapse
 
marcusykim profile image
Marcus Kim •

In the authentication documentation example, I'd have the first pass label each step as observed in the code, inferred, or still unknown. Asking for a list first can organize an explanation, but it can also turn an invented middleware or redirect step into a convincing foundation for the next answer. Pairing that list with file references and one captured login trace gives the documentation pass something external to check. I'd also include a failed login and an expired session, so the final write-up covers more than the happy path.

Collapse
 
tomveber profile image
Tom Veber •

Which one stuck with you most once the exam was over?

Collapse
 
dj29 profile image
Dhruv Jani •

So, I realized I use:
Format specific when you integrate AI wrapper feature to you project, and most of the times make sure it returns proper JSON output.

And probably mix of chain of thought and GK for exam prep.

Also, role playing used to be popular when chatbots were new. Now almost nobody uses it.

How about you, you seem more experienced, your thought would be more valuable than mine, Sir.😅

Collapse
 
emilywoodsnyc profile image
Emily Woods •

I'd add one constraint to the interviewer role: wait for my attempt before giving feedback. For a question, I'd ask for one follow-up at a time and keep the solution hidden until I've explained my approach. Otherwise I can read a beautifully structured answer and mistake recognition for being able to solve it myself.

Collapse
 
jane_hase profile image
Janet Hase Naranjo López •

Great Job! Really useful explanation, thx for sharing

Collapse
 
vijay_g profile image
vijay •

Great breakdown! Honestly, I’ve been using a mix of Chain-of-Thought and Role-Playing for debugging without even realizing they had formal names from Deep Learning literature.

My go-to combo that isn't explicitly listed here is what I like to call "Constraint-Bound Prompting" (or Guardrail Prompting). When asking an AI to refactor code, I explicitly give it strict "DO NOT" constraints.

For example:
"Refactor this function to improve performance. Do NOT change the input/output signature, do NOT introduce third-party libraries, and do NOT touch the error handling logic."

Without negative constraints, models often get over-ambitious and rewrite half the codebase. Combining Role-Playing + Constraints has saved me hours of unwanted refactoring!

Thanks for turning 100 pages of academic fluff into actionable dev tips!

Collapse
 
star123 profile image
Sᴛᴀʀ⭐ •

Hello 👋🏻

Collapse
 
dj29 profile image
Dhruv Jani •

Hi!

Collapse
 
pang_claw profile image
pang •

Naming the techniques is oddly useful — once you can point at “this is chain-of-thought vs role priming,” it’s easier to notice which habit actually moves the answer and which one is just filler.

Collapse
 
sujalkhatri profile image
Sujal Khatri •

The "Real Trick: Combine Them" section is the real takeaway — naming techniques is useful, but the skill is composing them, which the cheat sheet table makes easy to scan. One combo worth trying for your next write-up: generated knowledge + format-specific for commit messages. First have it list your team's commit conventions from your git history, then output the new message in that exact format. Also agreed with your comment that role-playing has faded — with how good base instruction-following got, the role adds more noise than signal most of the time.

Collapse
 
yug_vasava profile image
Yug Vasava •

That's a great way to use notes. Keep going bro!

Collapse
 
technogamerz profile image
𝐓𝐡𝐞 𝐋𝐚𝐳𝐲 𝐆𝐢𝐫𝐥 •

Really!

Collapse
 
dj29 profile image
Dhruv Jani •

Thanks bro!😄

Collapse
 
pixquill profile image
PixQuill •

I had been using many of these patterns without knowing their names. This gives me a mental toolkit to intentionally craft better prompts for coding work.

Collapse
 
dj29 profile image
Dhruv Jani •

Glad it helped!
Have A Great Day!😄

Collapse
 
sloan profile image
Sloan the DEV Moderator •

Hey, this article appears to have been generated with the assistance of ChatGPT or possibly some other AI tool.

We allow our community members to use AI assistance when writing articles as long as they abide by our guidelines. Please review the guidelines and edit your post to add a disclaimer.

Failure to follow these guidelines could result in DEV admin lowering the score of your post, making it less visible to the rest of the community. Or, if upon review we find this post to be particularly harmful, we may decide to unpublish it completely.

We hope you understand and take care to follow our guidelines going forward!

Collapse
 
dj29 profile image
Dhruv Jani •

Guys, this content is from coursework given in college. It's not AI generated.🥲😑

Collapse
 
francistrdev profile image
FrancisTRᴅᴇᴠ •

It is referring to the how the post was written...

Thread Thread
 
dj29 profile image
Dhruv Jani • • Edited

Can it be the case that PDFs given were AI generated? But I wrote everything other than examples by myself.

Other part was from Pdfs.

No worries, my bad the pdf itself seems AI generated!😭
Sorry!

Thread Thread
 
francistrdev profile image
FrancisTRᴅᴇᴠ •

No worries!

Collapse
 
mudassirworks profile image
Mudassir Khan •

the point that step by step does not reveal real internal reasoning but still gives you an inspectable answer is the part most prompting guides skip. that is the whole value in production.

we treat stated assumptions as a required field in the output schema and run a cheap second pass that checks them against the actual input. most of our confident wrong answers died right there, because the bad assumption was finally visible.

do you version your few shot examples like code, or do they drift quietly?

Collapse
 
sahil26_kumar_445ad3c5329 profile image
Sahil26 Kumar •

Hyyy
Bro