Careers

Prompt engineering for students: 6 simple habits

Six easy prompt engineering habits that get clearer, more useful answers from any AI tool, with before-and-after examples you can copy.

On this page

Prompt engineering sounds technical, but it mostly means one thing: asking clearly. The same AI model can give a vague answer or a brilliant one depending on how you ask. Here are six habits that make the difference, each with a before and after.

1. Say who it is for

The model does not know if you are a school student, a fresher or a senior engineer. Tell it.

  • Before: "Explain recursion."
  • After: "Explain recursion to a first-year B.Tech student who knows basic loops in Python."

Naming the audience changes the words, the depth and the examples you get back.

2. Give the context

The model only knows what is in the conversation. If your question depends on your syllabus, your code or your project, include it.

  • Before: "Why is my code wrong?"
  • After: "This Python function should return the largest number in a list, but it returns the first one. Here is the code: ... What is the bug?"

3. Ask for a format

Tell it what shape the answer should take: a table, five bullet points, a 100-word summary, a step-by-step list.

  • Before: "Compare SQL and NoSQL."
  • After: "Compare SQL and NoSQL databases in a table with three rows: data shape, scaling, and one example product each."
Tip

A clear format also makes answers easier to check. A table with three rows is much easier to verify than five paragraphs.

4. Show an example

If you want a particular style, show one example. This is called few-shot prompting, and it works surprisingly well.

prompttext
Turn each topic into a one-line exam question.

Topic: photosynthesis
Question: What two things does a plant need, besides sunlight, for photosynthesis?

Topic: binary search
Question:

The model copies the pattern from your example.

5. Ask it to think step by step

For maths, logic and debugging, ask the model to work through the problem before giving the final answer. Writing out the steps gives it space to reason and gives you something to check.

  • After: "Solve this step by step, then give the final answer on its own line."

6. Iterate instead of starting over

Your first prompt rarely gives the perfect answer. Treat it like a conversation:

  1. Ask.
  2. Read the answer and spot what is missing.
  3. Reply with a specific fix: "Shorter", "Use a real-world example", "Leave out the history part".

Small follow-ups are faster than rewriting the whole prompt.

A template you can reuse

Put the habits together and you get a simple template:

prompt templatetext
You are helping a [who I am].
Context: [what I am working on, any notes or code].
Task: [exactly what I want].
Format: [table / bullets / steps / word limit].
Example of the style I want: [optional].

One warning for students

A good prompt gets you a good answer quickly, which is great for understanding, but it can also do your thinking for you. Use AI to explain and check, not to replace your own practice. Our guide on learning to code with AI without fooling yourself has habits that keep you learning.

And remember that even a perfect prompt cannot stop a model from making things up sometimes. Check anything important.

Rahul Agarwal

Instructor, SkillByAI

Web developer for 15 years. Teaches developers and founders to build real products with open-source AI tools.

Get the next tutorial by email

One email when a new post lands, with the code ready to run. No spam.

By subscribing you agree to receive emails from SkillByAI. Unsubscribe anytime.