{"id":31550,"date":"2023-03-08T07:34:26","date_gmt":"2023-03-08T15:34:26","guid":{"rendered":"https:\/\/coderpad.io\/?p=31550"},"modified":"2024-08-05T10:03:49","modified_gmt":"2024-08-05T17:03:49","slug":"how-to-design-your-coding-interviews-to-outsmart-chatgpt","status":"publish","type":"post","link":"https:\/\/coderpad.io\/blog\/interviewing\/how-to-design-your-coding-interviews-to-outsmart-chatgpt\/","title":{"rendered":"Worried About ChatGPT in Coding Interviews? Here&#8217;s 3 Ways to Continue Running Great Interviews"},"content":{"rendered":"\n<p>Remember when you only had to worry about candidates copying and pasting code from StackOverflow?<\/p>\n\n\n\n<p>Now there\u2019s a new robot kid on the block, and boy, is it making interviewers and technical recruiters nervous.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/d2h1bfu6zrdxog.cloudfront.net\/wp-content\/uploads\/2023\/03\/img_64089b1349add.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/d2h1bfu6zrdxog.cloudfront.net\/wp-content\/uploads\/2023\/03\/img_64089b1349add.png\" alt=\"Three panel comic. First a bartender is throwing a patron out of the bar, the patron is labelled &quot;candidates using stackoverflow&quot;. in the second panel the bartender is labelled &quot;interviewers&quot;. in the third panel, the patron is shown sneaking behind the bartender, and the patron is labelled &quot;candidates using chatgpt&quot;.\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>And rightfully so \u2013 it opens a whole new way for candidates to pull the wool over your eyes and fake skills they don\u2019t have, meaning you\u2019ll have a bunch of useless new hires that will cost you hundreds of thousands of dollars.<\/p>\n\n\n\n<p>Or not.<\/p>\n\n\n\n<p>Let me remind you of <a href=\"https:\/\/coderpad.io\/blog\/interviewing\/the-1-best-anti-cheat-interview-question-ever\/\">this piece of wisdom I doled out in April of 2022<\/a>:<\/p>\n\n\n\n<p><em><strong>We at CoderPad do not philosophically believe in \u201canti-cheat\u201d tactics. That\u2019s an arms race that only produces temporary winners \u2013 and it\u2019s never good to start an interview coming from a place of distrust.<\/strong><\/em><\/p>\n\n\n\n<p>\u201cBut unknown CoderPad blogger,\u201d you say (my coworkers call me Ken, by the way), \u201cThat\u2019s all well and good for you to say, but I\u2019m the one staking my company\u2019s reputation on the line with these phony candidates. Do you just expect me to ignore ChatGPT?\u201d<\/p>\n\n\n\n<p>Of course not. First and foremost one of the best things you can do is to be clear with candidates of expectations and the consequences of using ChatGPT in an interview.<\/p>\n\n\n\n<p>There\u2019s also a spectrum of interview designs to help you mitigate ChatGPT\u2019s influence. On one end, you can embrace it and <a href=\"https:\/\/coderpad.io\/blog\/interviewing\/how-to-embrace-chatgpt-in-technical-interviews\/\">create interview questions around its use<\/a> to<a href=\"https:\/\/coderpad.io\/blog\/hiring-developers\/chatgpt-and-the-future-of-technical-interviews-addressing-concerns-of-increased-cheating\/\"> letting candidates know it\u2019s okay to use it<\/a> (like an open-book test). On the other end, you can work on creating questions that are ChatGPT-resistant. This blog post will focus on the latter \u2013 though I\u2019d encourage you to consider the other two options.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get \u2018em talkin<\/h2>\n\n\n\n<p>Nothing puts a stop to using someone else\u2019s solution than being asked to explain the logic behind it.<\/p>\n\n\n\n<p>It\u2019s unusual for a candidate to skip straight to the most ideal answer. Humans think through complex problems on an evolutionary path, starting simple then abandoning all but the most ideal branch. Eventually the best candidates do arrive at the right answer, but you can see their methodical thought process.<\/p>\n\n\n\n<p>We\u2019ve talked extensively about <a href=\"https:\/\/coderpad.io\/blog\/interviewing\/3-interview-tips-for-software-engineer-hiring-managers\/\">the benefits of making your interviews a collaborative discussion<\/a>, but one of the lesser-known benefits these days is encouraging your candidates to explain the large chunk of pasted code you just saw pop up in your interview screen:<\/p>\n\n\n\n<figure class=\"wp-block-video aligncenter\"><video height=\"688\" style=\"aspect-ratio: 1356 \/ 688;\" width=\"1356\" autoplay controls loop muted src=\"https:\/\/d2h1bfu6zrdxog.cloudfront.net\/wp-content\/uploads\/2023\/03\/cheatervid.mp4\"><\/video><figcaption class=\"wp-element-caption\">Nothing fishy here&#8230;.<\/figcaption><\/figure>\n\n\n\n<p>Instead of waiting for the interview playback to notice their massive copypasta and terminating their candidacy because of perceived cheating, ask them about the code they copied and pasted.<\/p>\n\n\n\n<p>They may have a good reason \u2013 maybe they know it would be more efficient to use their time to outsource the trivial code to ChatGPT and focus instead on the lines that take more critical thinking. Or perhaps they knew the basic idea of what they wanted to code but needed a little help verifying the implementation \u2013 help like what they\u2019d usually receive from a coworker.&nbsp;<\/p>\n\n\n\n<p>Or maybe they don\u2019t have a good reason and lied about their coding skills. Whether or not their reasons (or lack thereof) are red flags is ultimately up to you. But you won\u2019t know if the copy-paste you just witnessed is in good or bad faith until you get the candidate to open up about it.<\/p>\n\n\n\n<p>The more you talk with them and make the interview experience collaborative, the more comfortable the candidate will be and the more likely they\u2019ll explain their thought process to you.<\/p>\n\n\n\n<p>You\u2019ll learn more about their skill set by asking them how they think than just watching them code anyways. Or you can watch them squirm when <a href=\"https:\/\/twitter.com\/vogon\/status\/1598334517647134720\" target=\"_blank\" rel=\"noopener\">ChatGPT answers their question incorrectly<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create questions with nuance<\/h2>\n\n\n\n<p>One of the things we\u2019re learning about current iterations of AI-powered tools like ChatGPT is that it doesn\u2019t do so well at understanding nuance or the technical intricacies of specific topics.&nbsp;<\/p>\n\n\n\n<p>Take this question about creating palindromes from date formats:<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"responsive-embed\"><blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">I was asking ChatGPT about palindrome dates for this century and found several algorithmic errors\/bugs. Can you spot them? <a href=\"https:\/\/t.co\/fCgIFu9PKE\">pic.twitter.com\/fCgIFu9PKE<\/a><\/p>&mdash; Anthony Mooz (@AnthonyMooz) <a href=\"https:\/\/twitter.com\/AnthonyMooz\/status\/1628943556336312322?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">February 24, 2023<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/div>\n<\/div><\/figure>\n\n\n\n<p>Despite 1) knowing what a palindrome is and 2) knowing that different countries use different date formats, ChatGPT struggles with combining those two topics.&nbsp;<\/p>\n\n\n\n<p>There\u2019s also this date-time issue:<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"responsive-embed\"><blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">As I write this, the date is Feb 20th or Feb 21st, depending on where you are in the world. If I ask ChatGPT, it says the date is Feb 22nd. How does it get close at all and why the off-by-one bug? <a href=\"https:\/\/t.co\/5minqv2tOd\">pic.twitter.com\/5minqv2tOd<\/a><\/p>&mdash; Matt Mazur (@mhmazur) <a href=\"https:\/\/twitter.com\/mhmazur\/status\/1627766834022711304?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">February 20, 2023<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/div>\n<\/div><\/figure>\n\n\n\n<p>Here, we can see that ChatGPT doesn\u2019t quite understand timezones to give the user a correct answer when they ask for the date.&nbsp;<\/p>\n\n\n\n<p>ChatGPT will either give you a wrong answer (like above) or \u201cbeat around the bush\u201d when faced with nuanced questions. Consider this conversation:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/d2h1bfu6zrdxog.cloudfront.net\/wp-content\/uploads\/2023\/03\/img_64089b1586f33.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/d2h1bfu6zrdxog.cloudfront.net\/wp-content\/uploads\/2023\/03\/img_64089b1586f33.png\" alt=\"question: &quot;who is the greatest football player of all time?&quot; chatgpt answer: &quot;The answer to this question is highly subjective and can vary depending on personal opinions and preferences. However, many people consider the Brazilian forward, Pel\u00e9, to be the greatest football player of all time. Pel\u00e9 won three FIFA World Cups with Brazil and scored a remarkable 1,281 goals during his professional career. He was known for his incredible skill, speed, and agility on the field and his ability to score goals in seemingly impossible situations. Other players such as Diego Maradona, Lionel Messi, and Cristiano Ronaldo are also often mentioned as some of the greatest football players in history. Ultimately, the debate over who is the greatest football player of all time is likely to continue for many years to come.&quot;\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>First, notice that it doesn\u2019t understand the cultural nuances of the word \u201cfootball\u201d \u2013 the sport refers to different things in the US, Australia, Ireland, and South Africa than it does in the rest of the world.<\/p>\n\n\n\n<p>Second, notice the \u201chedging\u201d that ChatGPT partakes in:<\/p>\n\n\n\n<p><em>\u201cThe greatest football player of all time is a subject of much debate and is ultimately subjective.\u201d<\/em><\/p>\n\n\n\n<p><em>\u201cIt is important to note that comparing players across different eras is difficult and often contentious, and opinions on the greatest football player of all time will vary depending on personal preferences and criteria for greatness.\u201d<\/em><\/p>\n\n\n\n<p>Most humans have stronger opinions on that and more business-related questions. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How does a candidate spend their time on a question that requires them to choose between priorities like quality, cost, and time?<\/li>\n\n\n\n<li>How do your front-end candidates choose which design elements are they focusing on for a landing page?<\/li>\n\n\n\n<li>And how do candidates justify these decisions?<\/li>\n<\/ul>\n\n\n\n<p>Consider also that being a software developer is rarely about writing snippets of code in isolation. There are bigger picture nuances that need to be taken into account, which is why adding in <a href=\"https:\/\/coderpad.io\/resources\/docs\/interview\/quick-start-guides\/multi-file-frameworks-for-engineers\/\">multi-file questions<\/a> to your interview can be beneficial.&nbsp;<\/p>\n\n\n\n<p>While ChatGPT can easily provide candidates with answers for generic algorithm questions that only require one file, having to create a multi-file answer to demonstrate engineering nuances is not only a more realistic interview exercise but one that would stump ChatGPT as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ask ChatGPT<\/h2>\n\n\n\n<p>Going to get meta here and see what ChatGPT has to say about its controversial role as a cheat enabler. Here\u2019s what it told me when I asked it, \u201cHow can I tell if the answer to an interview question came from ChatGPT?\u201d:<\/p>\n\n\n\n<p><em>As an AI language model, I am designed to provide information and assistance to anyone who asks, and I cannot control who uses my responses. However, there are several ways you can try to determine if a candidate&#8217;s answer came from ChatGPT:<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><em>Listen for consistency: While it is possible for a candidate to provide a response that is similar to one generated by ChatGPT, it is unlikely that they will be able to replicate the exact wording and phrasing. Listen for consistency in their response, such as the use of similar vocabulary and grammar to their other answers.<\/em><\/li>\n\n\n\n<li><em>Ask follow-up questions: To determine if a candidate&#8217;s response is genuine and original, ask follow-up questions that require them to elaborate or provide more detail. If their response is based solely on information from ChatGPT, they may struggle to provide additional information or context.<\/em><\/li>\n\n\n\n<li><em>Check for understanding: Ask the candidate to explain the concept or idea in their own words. If their response is based solely on information from ChatGPT, they may struggle to explain it in their own words or may use the same phrasing and vocabulary as ChatGPT.<\/em><\/li>\n\n\n\n<li><em>Use multiple assessment methods: To reduce the reliance on ChatGPT as a source of information, use multiple assessment methods to evaluate a candidate&#8217;s skills and abilities. This can help to provide a more comprehensive evaluation of the candidate&#8217;s abilities and reduce the reliance on ChatGPT as a source of information.<\/em><\/li>\n<\/ol>\n\n\n\n<p><em>Ultimately, it may be difficult to determine if a candidate&#8217;s answer came from ChatGPT, and it is important to keep in mind that candidates may use a variety of resources to prepare for an interview. The best approach is to focus on evaluating the candidate&#8217;s overall skills, abilities, and fit for the position.<\/em><\/p>\n\n\n\n<p>It looks like ChatGPT has been browsing the CoderPad blog for answers again. Or maybe I\u2019m unknowingly training my replacement.<\/p>\n\n\n\n<p>Either way, ChatGPT has a long way to go before it becomes a concern for interviewers and recruiters who continuously improve their candidate experience.<\/p>\n\n\n\n<p>Talk with your candidates and give them real, thought-provoking business cases to solve, and you\u2019ll have little to worry about.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>No need to fear these robot overlords.<\/p>\n","protected":false},"author":12,"featured_media":40360,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12],"tags":[],"persona":[],"blog-programming-language":[],"keyword-cluster":[],"class_list":["post-31550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interviewing"],"acf":[],"_links":{"self":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/31550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/comments?post=31550"}],"version-history":[{"count":13,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/31550\/revisions"}],"predecessor-version":[{"id":34425,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/31550\/revisions\/34425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media\/40360"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=31550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/categories?post=31550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/tags?post=31550"},{"taxonomy":"persona","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/persona?post=31550"},{"taxonomy":"blog-programming-language","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/blog-programming-language?post=31550"},{"taxonomy":"keyword-cluster","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/keyword-cluster?post=31550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}