Ten prompt engineering techniques for beginners, each with a before and after example, plus a frank look at what prompting is not and where it fits among the skills you actually need.
Most people get an underwhelming answer from an AI assistant, decide the tool is overrated, and move on. The problem is usually the question, not the tool. Prompt engineering is the practice of writing instructions that give a large language model enough direction to produce something useful on the first or second try.
This guide covers ten prompt engineering techniques for beginners. Each one has a before and after example so you can see the difference rather than just read about it. At the end we look at what prompt engineering is not, and where it sits among the skills a student actually needs.
Ten prompt engineering techniques, with examples
None of these require technical knowledge. They work in any chat interface, in plain English, and they stack: a prompt that uses three or four of them at once will usually outperform one that uses none.
1. State the role, the task and the format
A vague prompt gets a vague answer. Tell the model who it should act as, what you want done, and what shape the output should take. Three short clauses remove most of the guesswork.
Before: Tell me about machine learning. After: Act as a tutor for first-year computer science students. Explain what machine learning is in under 150 words, then list three everyday examples as bullet points.
2. Give the context the model cannot see
The model knows nothing about your project, your deadline or what you have already tried. Anything you leave out, it will assume, and it will often assume wrong. Paste in the relevant background before you ask.
Before: Why is my code slow? After: I have a Python script that reads a large CSV file with pandas and loops over each row to compute a running total. It takes several minutes. Suggest two ways to speed it up and explain the trade-off of each.
3. Show examples of what you want (few-shot prompting)
Describing a format is hard. Showing two or three examples is easy, and the model will copy the pattern closely. This is called few-shot prompting, and it is the fastest way to get consistent output for repetitive tasks.
Before: Write product descriptions for these three items. After: Write a one-line description for each item, in this style: Item: wireless mouse Description: Quiet, compact and rechargeable, with a scroll wheel that feels precise. Item: desk lamp Description: Warm adjustable light with a slim arm that stays out of the way. Now do the same for: laptop stand, mechanical keyboard, webcam.
4. Constrain the output
Without limits, the model pads. Set a length, a structure or a list of things to leave out. Constraints also make answers easier to compare when you run the same prompt more than once.
Before: Summarise this article. After: Summarise the article below in exactly three bullet points. Each bullet must be one sentence and under 20 words. Do not add an introduction or a conclusion. [paste article]
5. Ask for the steps, not just the answer
For anything involving reasoning, maths or debugging, ask the model to work through the problem before it gives a result. You get a better answer, and you can see where the reasoning goes wrong if it does.
Before: Is this SQL query correct? After: Review the SQL query below. First, explain in plain language what each clause does. Then state whether it returns the customers who placed more than one order last month, and if not, show the corrected query. [paste query]
6. Ask the model to ask you questions first
When you do not know which details matter, let the model tell you. Ask it to list what it needs before it starts. This turns a single guess into a short conversation and is especially useful for planning tasks.
Before: Plan a study schedule for me. After: I want a study schedule for learning Python over the next few months. Before you write it, ask me up to five questions about my available time, current level and goal. Wait for my answers, then produce the schedule.
7. Iterate instead of starting over
The first answer is a draft. Instead of rewriting your whole prompt, reply with a specific correction. Each follow-up narrows the result, and the model keeps the context from the earlier turns.
Before: That is not what I meant. Try again. After: Keep the structure, but make the second section shorter and replace the technical terms with plain English. The audience is non-technical managers.
8. Set the audience
The same topic explained to a child, a hiring manager and a senior engineer should read very differently. Name the reader and the model adjusts vocabulary, depth and examples on its own.
Before: Explain what an API is. After: Explain what an API is to a marketing graduate who has never written code. Use one analogy from everyday life and avoid any programming terminology.
9. Give it a checklist to check its own work
Models make confident mistakes. Adding a short verification list at the end of your prompt makes the model re-read its output against your criteria before it responds. It does not catch everything, but it catches a lot.
Before: Write a cover letter for this job. After: Write a cover letter for the job description below. Before you reply, check that: it is under 250 words, it mentions the two required skills from the posting, it contains no claims not supported by my CV, and it has no spelling errors. Fix anything that fails. [paste job description and CV]
10. Split big tasks into smaller prompts
Asking for a whole project in one prompt produces a shallow result. Break the work into stages and run them in sequence, feeding the output of one into the next. You stay in control of the direction at every step.
Before: Build me a complete data analysis project on customer churn. After (three separate prompts): 1. List the columns a customer churn dataset usually has and what each one means. 2. Using those columns, write the pandas code to load the data and show basic summary statistics. 3. Suggest three charts that would reveal churn patterns, with the matplotlib code for each.
What prompt engineering is not
You will see job titles and courses that present prompt engineering as a career on its own. Treat that with caution. Writing good prompts is a skill in the same way that writing a clear email or a good search query is a skill: valuable, learnable in weeks, and rarely the whole job.
Two things limit it as a standalone role. First, the models change. A trick that works this year may be unnecessary next year because the model handles it by default. Second, most of the value in a prompt comes from knowing the subject. A prompt that asks for a correct SQL query is only useful if you can tell whether the query is correct.
The people who get the most from these tools are the ones who already know the domain: developers, analysts, marketers, teachers. Prompt engineering makes them faster. It does not replace what they know.
Where it fits in the skills a student actually needs
Think of prompt engineering as a layer on top of real skills rather than a substitute for them. For a student heading into AI or data work, the order looks like this:
- Programming fundamentals. A Python programming course gives you the ability to read, run and fix the code a model produces, which is the difference between using an answer and trusting it blindly.
- Data and machine learning basics. Understanding how models learn from data tells you why they fail and when to trust them.
- Working with AI tools daily. Use the techniques above in your own coursework and projects. Our guide to AI tools for students and professionals covers which categories of tool are worth the time.
- Building with models, not just prompting them. Calling a model from code, adding retrieval, and evaluating outputs are the skills that turn prompting into engineering. This is the path described in how to become an AI engineer.
A structured programme, such as the AI course in Chandigarh and Mohali, covers prompting as one module inside a wider curriculum of Python, machine learning and generative AI. That is the right proportion: enough to use the tools well, not so much that it crowds out the fundamentals.
A simple way to practise
Pick one task you do every week: summarising notes, writing an email, debugging a script. Write your usual prompt, then rewrite it using three of the techniques above. Compare the two answers side by side. Do this for two weeks and the habits become automatic.
Keep a file of prompts that worked. Over time it becomes a personal library you can reuse and share, and it is a small but genuine thing to show in an interview.
If you would like to see how prompting is taught alongside the rest of the AI curriculum, book a free demo class and sit in before you decide.
Prompt EngineeringAI ToolsGenerative AIBeginners
Frequently asked questions
What is prompt engineering?
Prompt engineering is the practice of writing instructions for a large language model so that its output matches what you need. It covers the wording, structure, context and examples you include in a request.
Do I need to know how to code to learn prompt engineering?
No. The techniques in this article work in plain English inside any chat interface. Coding becomes necessary when you want to call a model from an application or automate a workflow.
Is prompt engineering a real career?
It is a useful skill rather than a durable standalone job. Most roles that use it are developer, analyst, marketing or content positions where prompting is one part of the work.
What is few-shot prompting?
Few-shot prompting means including two or more worked examples in your prompt so the model copies their pattern. It is the most reliable way to get consistent formatting.
How long does it take to get good at prompting?
The basics take a few hours to learn and a couple of weeks of regular use to make habitual. Progress depends on practising on real tasks and comparing results, not on reading about techniques.
Why does the same prompt give different answers?
Language models sample from a range of likely responses, so identical prompts can produce different wording or structure. Adding constraints and examples narrows the range, and iterating on the first answer usually gets you the rest of the way.
