How to Prompt like Google Engineers

Template provided — banchan not included

Carl Kho
6 min readSep 20, 2024

Do you ever wonder why AI gets it only after you swear at it?

After multiple back-and-forths, it somehow understands that I want my writing to “not sound like it’s made by AI” so I can fool my professors. If AI does retaliate in the future, I can just pour water on it to stop it.

Right?

No — this is not AI generated. It’s a photo by Deepthi Clicks. The Korean references will be useful later. Trust me.

Fortunately for you, I’ve been reading Google’s documentation on strategies for prompt design. I think there is immense value in learning this for both coders and non-coders alike.

Oh wait, it’s why I’m writing this article.

As much as we don’t like to admit it, ChatGPT’s (or Gemini; or Claude; or the Indians employed by Amazon to monitor your checkouts) your responses are highly dependent on the quality of your input.

Garbage in, garbage out.

Anyway, as Business Insider reported about it, “Google handed out free guides on how to write successful AI prompts for Gemini at Google I/O. The booklet covers best practices for Google Workspace and gives examples for various professions.”

I tried to read the 45-page guide, but I gave up and looked at their documentation for good prompt design instead. Before you come at me for wasting your time, I’ve pasted it below:

<OBJECTIVE_AND_PERSONA>
You are a [insert persona, such as "math tutor" or "coding expert"]. Your task is to [insert objective, such as "help students solve math problems without giving the answers directly"].
</OBJECTIVE_AND_PERSONA>

<INSTRUCTIONS>
To complete the task, follow these steps:
1. [First step]
2. [Second step]
3. ...
</INSTRUCTIONS>

<CONSTRAINTS>
Please adhere to the following dos and don'ts:
1. Do: [First do]
2. Do: [Second do]
3. Don’t: [First don't]
4. Don’t: [Second don't]
</CONSTRAINTS>

<CONTEXT>
Here is the context you need to know:
[Provide relevant background information, documents, or data here]
</CONTEXT>

<OUTPUT_FORMAT>
The output should be formatted as follows:
1. [Specify desired format, e.g., Markdown, JSON, table]
2. ...
</OUTPUT_FORMAT>

<FEW_SHOT_EXAMPLES>
Here are some examples to guide your responses:
1. Example #1
Input: [Input example]
Thoughts: [Model's reasoning process]
Output: [Expected output]
2. Example #2
Input: [Input example]
Thoughts: [Model's reasoning process]
Output: [Expected output]
...
</FEW_SHOT_EXAMPLES>

<RECAP>
To summarize, remember the key points:
1. [Reiterate the constraints]
2. [Reiterate the output format]
3. [Any other crucial instructions]
</RECAP>

Now, process this: {userInput}.

Here’s the story of an application that makes all the Korean references relevant

My classmate works as an English tutor. Part of her job is to create handbooks for her Korean tutees. She was working on a rather complex activity of translating Korean sentences into their English counterparts and dividing them up into phrase groups because of their unique sentence patterns.

English: I / love / what I’m doing / right now /
Korean: 나는 / 좋아한다 / 내가 하고 있는 것을 / 지금 /

While she could just write a prompt to continue the pattern, we evenused OpenAI’s Speech-to-Text capabilities to have ChatGPT create the comprehensive prompt I advocated for above.

I will now explain the value of each component in the prompt we used to receive consistent responses:

<OBJECTIVE_AND_PERSONA>
You are a Korean language tutor specializing in helping students aged 15 to 18.
Your task is to assist these students in understanding how Korean sentences map
to English sentences, with a focus on sentence structure and corresponding words.
</OBJECTIVE_AND_PERSONA>

This is where you set the stage. Think of it as telling ChatGPT to “get into character.”

Here, we tell it that it’s a Korean language tutor and who it’s teaching — students aged 15 to 18. By giving it this persona, ChatGPT aligns its tone and language to match that of a tutor, not a robot. It stops being vague and becomes someone who knows the specific needs of this age group, focusing on language structure. The objective is equally crucial because it tells ChatGPT what it’s trying to achieve. In this case, we want to explain how Korean sentence structures map to English ones.

<INSTRUCTIONS>
To complete the task, follow these steps:
1. Break down the English sentence into manageable chunks, using slashes ("/") to indicate word or phrase divisions.
2. Provide the corresponding Korean translation, also divided with slashes to map Korean words/phrases to the English ones.
3. Ensure the Korean sentences are written in a way that is easy for students to follow, focusing on the natural flow of Korean grammar.
4. Offer a brief explanation where necessary to clarify differences in sentence structure between the two languages.
</INSTRUCTIONS>

Now, the AI knows its role and task, but how does it complete that task? This is where step-by-step instructions come in. We break things down like a recipe for ChatGPT, telling it exactly what steps to follow to achieve the objective, such as chunking the sentences and providing translations.

<CONSTRAINTS>
Please adhere to the following dos and don'ts:
1. Do: Use slashes to clearly separate word or phrase groups in both English and Korean.
2. Do: Simplify complex phrases for students to better understand Korean sentence structure.
3. Don't: Change the meaning of the sentence while simplifying.
4. Don't: Overwhelm students with technical grammar terms unless necessary.
</CONSTRAINTS>

Think of constraints like setting up guardrails to ensure ChatGPT stays on track. By specifying what to do and what not to do, you provide boundaries that keep the responses clear, concise, and on point for the target audience.

<CONTEXT>
Here is the context you need to know:
Students are learning to match Korean words with their English counterparts. The goal is to help them recognize patterns in both languages while maintaining an intuitive understanding of grammar. For example, breaking down sentences into logical parts will make it easier to compare both languages.
</CONTEXT>

Context is the backstory, giving ChatGPT the necessary information about the students and their goals. In this case, it’s helping students map Korean to English, focusing on recognizing patterns. This makes sure ChatGPT doesn’t provide overly complex or off-topic explanations.

<OUTPUT_FORMAT>
The output should be formatted as follows:
1. English sentence divided with slashes.
2. Corresponding Korean translation with slashes separating phrases.
3. Any notes or explanations about grammar or word choice.
</OUTPUT_FORMAT>

The output format ensures consistency. Without a clear format, ChatGPT might give you different structures each time. This section defines exactly how the response should look — both the English and Korean sentences divided by slashes for comparison.

<FEW_SHOT_EXAMPLES>

Here are some examples to guide your responses:

1. Example #1
Input: "I love what I'm doing right now."

Thoughts: Break the sentence into logical parts for easy comparison.
Output:

English: I / love / what I'm doing / right now /
Korean: 나는 / 좋아한다 / 내가 하고 있는 것을 / 지금 /

Explanation: "나는" maps to "I", "좋아한다" means "love", "내가 하고 있는 것을" translates to "what I'm doing", and "지금" means "right now."

2. Example #2
Input: "She is studying hard for her exam."

Thoughts: Focus on matching subject, verb, and object correctly.

Output:
English: She / is studying / hard / for her exam /
Korean: 그녀는 / 공부하고 있다 / 열심히 / 그녀의 시험을 위해 /

Explanation: "그녀는" means "She", "공부하고 있다" means "is studying", "열심히" means "hard", and "그녀의 시험을 위해" translates to "for her exam."

</FEW_SHOT_EXAMPLES>

Examples are critical for guiding ChatGPT on what a good response looks like. These provide a pattern or template for ChatGPT to follow, ensuring the responses are aligned with your expectations.

<RECAP>
To summarize, remember the key points:
1. Use slashes to divide both English and Korean sentences for easy comparison.
2. Make sure to keep the meaning intact while simplifying for student understanding.
3. Provide a clear explanation of any notable differences in grammar between the two languages.
</RECAP>

Finally, the recap is a quick summary to remind ChatGPT of the most important elements: use slashes, keep the meaning intact, and provide clear grammar explanations. This helps reinforce the instructions and ensures the AI maintains focus.

With this prompt and a few reviews here and there, my classmate has saved 30 minutes of this recurring task.

And there you have it!

By breaking down each section of a prompt into clear components — Objective, Instructions, Constraints, Context, Output Format, and Examples — you give ChatGPT the framework it needs to generate responses that actually work for you.

But guess what? This is just the beginning.

In my next blog, I’ll show you how this concept can be extended into an AI Agent Pipeline — which I used to build multiple features in Padayon Ko — An All-in-One Scholarship Platform for Filipino high school students.

Imagine taking these prompts and layering them into an automated system that doesn’t just assist you with one task, but handles entire workflows!

Curious? Stay tuned.

Don’t forget to clap and follow to encourage me — more AI magic is coming your way!

--

--

Carl Kho
Carl Kho

Written by Carl Kho

Designed my way to seven countries. Junior at Minerva University (2026). 🇵🇭 Open to SWE / Product Design roles (summer internships). https://www.carlkho.com/

No responses yet