STAR method for behavioural questions
40 min · Intermediate
Need help? Ask a tutor on WhatsApp (opens in a new tab)A question starts with "Tell me about a time when..." and the room goes quiet. The interviewer is not after a theory of what you would do: they want one real story, told in order, that shows how you act.
Situation, Task, Action, Result
STAR is a four-part structure for behavioural answers: Situation (the context), Task (your responsibility), Action (what you did) and Result (what happened). It keeps a story clear, short and easy to follow.
Here is one question answered in four lines, one line per STAR part, with the share of the answer each part takes.
Example 1 · STAR in four lines
Question: "Tell me about a time you solved a difficult problem."S: Final-year project, our Python app slowed to 4 seconds per page with 5,000 test orders.T: I owned the orders module, so I had to find and fix the slowdown before our review in 3 days.A: Logged the SQL, found one query per order item (N+1), replaced it with a fetch join, added an index.R: Page time fell to 0.3 s on the same data; reviewers asked me to explain it to the class.S + T about 20% of the answer: context and my responsibility A about 60%: the steps I took, in order, in the first person R about 20%: a measured outcome and what I learned
What this code does
- Each line maps to one STAR part; the full spoken answer expands the Action line most.
- The result has a number measured on the same data, so it is believable and easy to discuss.
A rough split for a two-minute answer is Situation and Task 20%, Action 60%, Result 20%. The common mistake is a long situation and a one-line action: interviewers hire your actions, not your context.
Three habits:
- Say "I" for your actions; mention the team only for context.
- Give the result as a number if you can, plus one line of learning.
- Expect prompts such as "Tell me about a time...", "Give an example of..." and "Describe a situation where...".
Order of execution
Order the STAR parts
Put the four parts of a STAR answer in the order you say them.
Building a story bank
A story bank is a list of 5 to 8 true experiences, each prepared in STAR form and mapped to the question types it can answer. One good story can answer several questions.
This program tags each story with the question types it can answer, then lists the types that still have no story.
Example 2 · A story bank mapped to question types
stories = { "Hackathon backend in 24 h": ["teamwork", "deadline", "conflict"], "N+1 query fix in final project": ["problem solving", "learning fast"], "Missed bug in internship release": ["failure", "feedback"], "Organised fest registrations": ["leadership", "deadline"], "Coding club workshops": ["leadership", "communication"],}
by_type = {}for story, types in stories.items(): for t in types: by_type.setdefault(t, []).append(story)
for t in sorted(by_type): print(f"{t}: {sorted(by_type[t])}")
needed = ["teamwork", "conflict", "failure", "deadline", "leadership", "learning fast", "feedback", "going beyond"]for t in needed: if t not in by_type: print("GAP: no story for", t)communication: ['Coding club workshops'] conflict: ['Hackathon backend in 24 h'] deadline: ['Hackathon backend in 24 h', 'Organised fest registrations'] failure: ['Missed bug in internship release'] feedback: ['Missed bug in internship release'] leadership: ['Coding club workshops', 'Organised fest registrations'] learning fast: ['N+1 query fix in final project'] problem solving: ['N+1 query fix in final project'] teamwork: ['Hackathon backend in 24 h'] GAP: no story for going beyond
What this code does
- Each story is tagged with the question types it can answer; the program inverts that into "type → stories" so you can pick one quickly in an interview.
- It also lists gaps: here no story covers "going beyond the task", so that is the next story to find and write.
A hackathon story can show teamwork, working under pressure and conflict. Collect stories from projects (a bug you fixed, a design choice you defended), college events, internships and personal life such as a part-time job. Your Online Store API project is a ready source.
Aim for:
- At least one story for each type: teamwork, conflict, failure, tight deadline, leadership, learning fast, handling feedback, going beyond the task.
- Each story covering two or three types.
- Small stories: freshers are not expected to have saved a company.
Model STAR answers: conflict, failure, deadline, leadership
A behavioural question asks you to describe something you really did in the past, usually starting "Tell me about a time when...". Interviewers use it because past behaviour is a good guide to future behaviour.
Below are four full STAR answers in two examples: conflict and failure first, then tight deadline and leadership. Read them for structure, then write your own.
Example 3 · Team conflict and failure
Q1: "Tell me about a time you disagreed with a teammate."Q2: "Tell me about a time you failed or made a mistake."Q1 (conflict) S: In our final-year project, a teammate wanted to store order prices only in the product table. T: I was responsible for the order module, so the decision affected my part directly. A: I did not argue in the group chat. I asked him for ten minutes, showed him that if a product price changed, every old order total would change too, and wrote a two-row example on paper. I also listened to his concern: he worried about duplicate data. We agreed to copy the price into each order item at the time of purchase, and to keep the product table as the current price. R: Old orders kept their real totals, and in the demo the examiner specifically asked about this and liked it. I learned to argue with an example, not opinions, and to understand the other person's worry first. Q2 (failure) S: In my internship I fixed a date bug in an attendance report and it went to production on Friday. T: My fix was meant to correct half-day leaves. A: On Monday HR reported that full-day leaves were now wrong. I told my mentor at once that it was my change, rolled it back with him, and found I had tested only half-day cases. I wrote tests for full-day, half-day and holiday cases first, then fixed the logic so all passed. R: The corrected fix shipped on Tuesday with 9 new tests, and no leave bug came back during my internship. Since then I write the test cases for every type of input before changing code.
What this code does
- The conflict story shows respect (private talk, listening), an evidence-based argument and a fair outcome that addressed both concerns.
- The failure story is a real mistake, owned immediately, with a concrete fix and a lasting habit. No blame on others, no disguised success.
Example 4 · Tight deadline and leadership
Q3: "Tell me about a time you worked under a tight deadline."Q4: "Tell me about a time you showed leadership."Q3 (deadline) S: At a 24-hour college hackathon, our team of four had 6 hours left and the backend was half done. T: I was building the backend, and the demo needed login, a list of events and registrations working. A: I listed every remaining feature and marked what the demo truly needed. I dropped password reset and admin reports, told the team clearly, and built the three needed APIs first, testing each with Postman before moving on. Every hour I updated the front-end teammate so she could connect screens as soon as an API was ready. R: All three flows worked in the demo and we placed in the top 10 of 120 teams. I learned that cutting scope early and saying it out loud beats trying to finish everything. Q4 (leadership) S: As coding club lead, I noticed only 15 juniors came to our first Python session out of 120 who signed up. T: I wanted more juniors to attend and actually learn, not just register. A: I asked five juniors why they left; they said the session was too fast and too theoretical. I changed the format to 45-minute hands-on sessions, each ending with a small problem, and asked two second-year students to help at the tables. I also shared the code after each session on GitHub. R: Attendance grew to about 70 by the fourth session, and two of the helpers ran sessions themselves the next term. I learned that leading starts with listening to the people you lead.
What this code does
- The deadline story shows prioritising and communication under pressure, with a clear, true result.
- The leadership story has no formal authority over anyone; leadership here means noticing a problem, asking, changing the plan and growing other people.
Each topic has a different focus. Conflict shows respect and a fair outcome; failure shows ownership and learning; a deadline shows prioritising; leadership shows influencing people, not just holding a title.
Each model is about 150-220 words. Copy the structure, never the sentences, and use your own true stories.
Find the bug
Find the weak line
Each round shows a STAR answer. Click the line that is weak.
Which line is too vague for the Action part?
Round 1 of 3Honest and under two minutes
This program measures what share of an answer goes to Situation plus Task, Action and Result. The weak answer below spends nearly all its words on the situation.
Example 5 · Checking the balance of a STAR answer
def words(text): return len(text.split())
situation = ("In our final-year project our Online Store API slowed to four seconds per page with five thousand test orders, " "and the review was in three days, and the whole team was worried, and our guide asked us to fix it quickly.")task = "I owned the orders module, so I had to find the cause."action = "I fixed it."result = "It became fast."
s, t, a, r = words(situation), words(task), words(action), words(result)total = s + t + a + rprint(f"S+T {100 * (s + t) // total}%, A {100 * a // total}%, R {100 * r // total}% of {total} words")if 100 * a // total < 40: print("Action is too short: say what you did, step by step.")if r < 8: print("Result is vague: add a number and what you learned.")S+T 89%, A 5%, R 5% of 59 words Action is too short: say what you did, step by step. Result is vague: add a number and what you learned.
What this code does
- This weak answer spends most words on the situation and three words on the action. The program measures each part's share of the answer.
- Aim for the action to be the biggest part, around half or more, and a result with a number. Rewrite, then check again.
Behavioural answers must be true. Follow-up questions such as "What did your teammate say?" expose an invented story within three questions, so a smaller true story beats a bigger made-up one.
Keep the answer to about 90 seconds to 2 minutes, roughly 180-250 words. Cut background, keep the actions; if the interviewer wants more, they will ask.
Predict the output
Check the balance
Read the code and pick what it prints.
A well-balanced answer: what does this print?
Handling follow-up questions
A follow-up question is the interviewer's next question that digs into your story, such as "What exactly did you say?". It tests whether the story is real and whether you reflect on it.
Here are the likely follow-ups for the hackathon story, each answered in one or two true sentences.
Example 6 · Follow-up questions for one story
Story: hackathon deadline (Q3 above)Likely follow-ups:1. What did your teammates say when you dropped features?2. What would you do differently?3. How did you decide what the demo "truly needed"?4. What was the hardest bug in those 6 hours?1. One teammate wanted to keep admin reports; I showed him the 6-hour list and he agreed to add them only if we finished early. We did not, and he said later it was the right call. 2. I would cut scope at the 12-hour mark, not at 18 hours, and write the API list on the first day. 3. I asked "what will the judges click in a 3-minute demo?" Anything not on that path waited. 4. The registration API returned 500 for duplicate sign-ups; I added a unique key and returned 409 with a clear message instead.
What this code does
- Each follow-up is answered in one or two true sentences. Preparing these makes the main story much more convincing.
- "What would you do differently?" is asked so often that every story in your bank should have an answer ready.
Common follow-ups: "What exactly did you say?", "What was the other person's view?", "What would you do differently?", "What did you learn?" and "How do you know it worked?"
Prepare one line for each of these for every story in your bank. If you do not remember a detail, say so honestly and give what you do remember.
Next step
Check your understanding
12 quick questions