LeeBoonstra.dev
The Art of Writing Effective Prompts

Blog: Learn Machine Learning from a Google AI Engineer

The Art of Writing Effective Prompts

Whether you are writing a prompt to let the LLM or AI answer a question from a contract, summarize a report, classify user feedback, or extract order information, writing a prompt containing just one line with the question is likely insufficient. You will need to provide instructions, constraints, reasoning, and a few-shot examples, and you will set your expectations for the style and output format. Trust me, you will quickly end up with an extensive written prompt, which increases in size over the various iterations.

Writing prompts can present challenges, particularly when instructions or constraints clash. For instance, an instruction to ‘avoid hallucinations or fabrications’ could hinder creativity or explanations in certain edge cases. This underscores the importance of adaptability in your prompt writing approach. When working with a test set of example user inputs, it’s crucial to be flexible and ready to revisit and verify if recent prompt changes don’t disrupt previously successful prompts. This adaptability is key to maintaining the effectiveness of your prompts.

This is the 5th blog of the series: Prompt engineering for business applications. Prompt Engineering is complex and requires careful planning and refinement to achieve desired results from AI models. As a software engineer @Google with experience in prompt engineering for major businesses, I will share practical learnings in a blog series to help others unlock the power of AI beyond simple tasks.

Documenting Your Prompts a Best Practice for Success

Let’s be real; documenting stuff isn’t the most exciting part of any job. But when it comes to pr...
Beyond the Basics How to Choose and Configure Your LLM for Maximum Impact

When it comes to AI prompt engineering, the choice of language model (LLM) is crucial. Each promp...
The Foundation Understanding LLMs and Prompt Engineering, and Why It All Matters

Let’s get down to basics and talk about how Large Language Models (LLMs) actually work. Think of ...
Demystifying Prompt Engineering for the Enterprise

Prompt engineering for AI business applications isn’t as simple as asking a question. It’s a comp...
Disclaimer: The opinions stated here are my own, not those of my company. - 2025 ® Lee Boonstra