Prompt Engineering the Technical Interview

Time to Level Up Those Prompting Skills

In partnership with

Hello everyone. 👏

What’s in today’s newsletter? 

  • Definition: Technical interview

  • Definition: Prompt engineering

  • Prompting: Provide grain

  • Gemini: Google’s LLM

  • Tech Interview: SQL Server

Try Artisan’s All-in-one Outbound Sales Platform & AI BDR

Ava automates your entire outbound demand generation so you can get leads delivered to your inbox on autopilot. She operates within the Artisan platform, which consolidates every tool you need for outbound:

  • 300M+ High-Quality B2B Prospects, including E-Commerce and Local Business Leads

  • Automated Lead Enrichment With 10+ Data Sources

  • Full Email Deliverability Management

  • Multi-Channel Outreach Across Email & LinkedIn

  • Human-Level Personalization

If you’re a technical resource you’ll go through an additional interview most will not. 😠It’s called the technical interview. It will be questions about your technical acumen with the languages and tools the company is using that you profess some level of expertise in.

The technical interview is brutal. đŸ˜°It’s stressful and frustrating, it’s also where you get the job or lose it if you’re in a technical role. In this newsletter, let’s prompt engineer our way to acing the SQL Server interview. Why the SQL Server interview? Because SQL is the single most IMPORTANT skill for any data professional.

What is prompt engineering? It sounds super technical but it’s not.

In essence, prompt engineering is fundamentally about asking the "correct" questions (or providing the "correct" instructions and context) to elicit the desired response from a large language model (LLM).

A large language model is a deep learning model. In simple terms, an LLM is a computer program that can understand and generate human-like text because it has learned from a massive amount of text data. That last sentence was created by the LLM called Gemini. It’s Google’s LLM and the one we will be using for this article.

I don’t have a favorite LLM. 👍 There are quite a few of them. If you have a preference, great… use that one. You could also use multiple ones. They all behave the same way and the strategy in this article will help you create and learn regardless of your choice.

Here’s an easier way to understand prompt engineering with an example.

Think of it like giving instructions to a new employee. Simply saying "write a report" is a poor prompt. This is really vague. You’d would have a hundred questions after your bossed asked that. Same applies to the LLM.

A better prompt would be: "Write a report summarizing the Q1 sales figures for the marketing department, focusing on the performance of our top three campaigns. The report should be no more than two pages and include a brief executive summary at the beginning." This more detailed instruction is closer to effective prompt engineering. The majority of the time you’ll need to ask very specific questions. 

Core Idea: Asking the Right Questions

  • At its heart, a well-crafted prompt guides the LLM towards the specific information, format, style, or task you need.

  • Poorly phrased or ambiguous prompts can lead to irrelevant, inaccurate, or unhelpful outputs.

  • Just like asking a human a clear and specific question leads to a better answer, the same principle applies to LLMs.

Throughout this post, I’ll put all the prompts on one line and in italics so you can simply cut/paste my prompts. I’ll also use lower case on the entire sentence. 👍

Now, you might be thinking, why not just prompt this: 

create an interview level interview cheat sheet for sql server

The results are damn good. However, Gemini is having a hard time focusing on entry level versus intermediate and above. This missed some crucial items. Additionally, you’re missing out on the probing part of the process. This process is where a lot of learning takes place.

I saved the output to a PDF. You can download it below.

SQL Server Interview Cheat Sheet Gemini.pdf140.08 KB • PDF File

PROMPTING OUR WAY TO A JOB

Let’s start with a poorly written prompt.

what is sql server?

Here’s what Gemini returned. I knew that our prompt was bad so it add more granularity to the response. This is great but verbose.

Let’s try again. 🔄

provide a short definition for sql server

Much better but still too long. The amount of information you’ll need to ingest and regurgitate to thrive in any data role is voluminous. When preparing for the technical interview, use concept reductionism. That simply means reduce everything to the simplest definition you can.

Here’s what I put in my notes. SQL Server is a relational database created by Microsoft. If your notes are type written, simply delete most of the text and author your own.

⚠️ Type written notes are not remembered with the same success as writing them down in your own words. If you’re studying for any interview, I strongly recommend you write the notes in your own words or create flashcards based on the study guide you craft here.

Let’s say you don’t know what a relational database is. Well, that’s your next prompt.

what is a relational database

Perfect response.

New prompt.

explain the relationships between the tables in a relational database

The response was good but too verbose to use. Here’s what will take from the first sentence.

Database are connected to one another using relationships. These relationships are established by linking columns in different tables, often using primary keys and foreign keys. Now, put down the three types of relationships.

  • Type 1: In a one-to-one relationship, each record in one table is associated with at most one record in another table, and vice versa.

  • Type 2: In a one-to-many relationship, one record in the "parent" table can be associated with zero, one, or many records in the "child" table. However, each record in the child table can only be associated with one record in the parent table.

  • Type 3: In a many-to-many relationship, multiple records in one table can be associated with multiple records in another table.

Here’s another section from our last prompt. This is great and doesn’t require any alteration. This is always an interview question because it’s one of the fundamental aspects to all relational databases. 😟

Key Concepts in Establishing Relationships:

  • Primary Key: A column or a set of columns in a table that uniquely identifies each row in that table. Primary keys must have unique values and cannot be NULL.

  • Foreign Key: A column or a set of columns in one table that refers to the primary key of another table. Foreign keys establish and enforce the links between the tables. They ensure referential integrity, meaning that the relationships between tables remain consistent.

If you’re not familiar with something, you’ll need to continue probing. For example, most novices will not know what a NULL value its.

what is a null value in relational databases

Gemini’s response to this one is perfect. The process is the same throughout. This process is the same for anything you’ll want to learn when you are using an LLM.

  • Create a granular prompt… use detail

  • Reduce the answer… if necessary

  • Probe the answer… add more grain

  • Repeat… next item

If you’re having a hard time starting out, try this. Use the document we created earlier and probe or ask questions about the items you don’t understand.

Probe Each Bullet Point

what is transact-sql 

Here’s Gemini’s answer. It’s perfect. Not verbose. Two simple, highly focused sentences. The second sentence is great because it will help you “understand” what transact is.

Learn to create relationships with things you know. 👍 This will help you remember. Here’s the next prompt I used based on contents of the interview cheat sheet above.

explain a table in a relational database

The response is below and is very good. Now, I think it’s too verbose so I’d water it down significantly. However, this is great. Notice what Gemini is doing? It’s trying to create a relationship between the question and something more common. It does this often.

Once you understand the process, prompt engineering anything is easy. Just follow the steps.

  • Create a prompt that is very detailed and very specific

  • Reduce the answer by pulling out verbose or irrelevant points

  • Probe the answer. Ask more questions about the answer given

  • Repeat this process until you have exactly what you need

If you aren’t getting exactly what you need, head over to another LLM. Use the same process. The key point is asking the model very specific questions to the points of the answer you are interested in.

Thanks everyone and have a great day. 👏