
Prompt Engineering and How to Prompt The Right Way
You already use ChatGPT, Gemini, and Claude, but your spending a lot money on ineffective prompts, inconsistent outputs, and constant back and forth with the AI. As models have gotten smarter, we have gotten lazier at prompting - and most people don't realist that taking your time and writing out a single well structured prompt can save you hundreds of dollars a year in invocation costs. A study by MIT has shown that using well structured prompts on smaller models can result in efficiency gains of up to 65% (Link to the study here).
In this guide, we'll show you how the team at OMNIUX structure our prompts, including some quick tips that will immediately improve AI efficiency as well as a more in depth review of fully structured prompts with XML and Markdown. We'll be focusing on INPUT prompts - the kind of prompt you would enter into ChatGPT/Gemini/Claude when you want to make a change to your code, create new images, or better manage your resources.
Prompt Basics
If you're just looking to get some advice on quick wins, here are some excellent tips to help with improving your prompt efficiency.
1. Be Clear & Concise
Ultimately, you want to keep your prompts as short as possible. Every additional word is an additional token the model needs to think about. Try to avoid using jargon wherever possible. Spelling and grammar mistakes are not a big deal for AI models, but should still be fixed. Think like you're talking to a high-school graduate who now works at as an administrative assistant. Keep your language tight, and simple.
Example
Can you synergize our paradigm-shifting core deliverables into a high-level executive briefing that leverages actionable insights for key stakeholders?
Replace it with...
Summarize these project updates into a bulleted list showing key decisions, risks, and next steps for leadership.
"Summarize" and "list" instead of "synergize" and "leverage". These small tweaks cut down on tokens.
2. Be a Little Bit of an A$$hole
Despite what many people think, LLMs are not human and do not have feelings. It won't remember you for saying please and thank you if the AI uprising ever comes. Drop the pleasantries - and be as direct with your model as possible. Don't feel like you need to swear at ChatGPT, but think of it as heavily left-brained. it just needs to be told what to do in simple clear terms. Try to cut down on conversational elements of your prompt.
Example
Please can your check the numbers in this Google Sheet. Let me know if you see anything that looks off. I think all of the items in Column C add up right!
Thanks.
Replace it with...
Review the attached spreadsheet. Identify incorrect values in Column C.
LLMs are pretty smart. They can figure out what you mean without adding a lot of flowery language. Over-explaining yourself leads to a loss in output quality.
3. Avoid "Do Not" Language/Negative Prompting
You may have heard of negative prompting, but for the majority of use cases - you are not using it correctly. Negative prompts are not readily available features within most chat applications, and people make the mistake of thinking that using language like "Do not..." will result in better instruction following by an LLM. This is incorrect as the model will pay particularly close attention to those "Do Not" instructions - moving focus away from what you actually want the model to do. Instead, use positive framing to remove ambiguity.
Example
Write a decline email to a customer asking for a discount. Do not mention competitor pricing. Don't use the word 'expensive'. Avoid sounding cold, and do not write more than 3 sentences.
Replace it with...
Write a warm, 2-to-3 sentence email declining a customer's discount request. Focus on the core value of our current package and invite them to explore our free tier.
Not only are we using less tokens, we're actually putting a lot more emphasis on the core instruction which will result in a much better output.
4. Agent Roles
If you are about to perform a task that requires a higher level of specialist knowledge, you can try adding a line to the top of your prompt that describes the role of the AI. This should be brief and concise (as mentioned earlier). Your AI will not magically become a 10x web developer, or a trained medical expert, but it will help position the model. Include a strong Role statement, the exact professional title, the core objective, and the target audience.
Example
Act as a super smart, friendly, and deeply wise creative writing wizard who has written thousands of best-selling fantasy novels over a 50-year career. You love helping aspiring authors, know everything about literature, and are super excited to share your deep magical wisdom with me today.
Replace it with...
Act as a senior developmental editor specializing in young adult fantasy fiction. Your goal is to review chapter outlines to identify structural pacing flaws, character plot holes, and world-building inconsistencies.
Less flowery language, to the point, consistent framing, and most importantly - SHORT!
5. Use Proper Separations for Code
If you need an LLM to debug some code, or review a solution and you are not actively using an AI coding assistant such as Claude Code, Codex, or Cursor - AI models will not instinctively know where the code starts and ends as part of your prompt.
When pasting code, create 2 rows of 3 backticks ``` - and place the code inside.
Example
Review the following code and tell me what it does:
export function helloWorld() {
return "hello world!"
}
Replace it with...
Review the following code and tell me what it does:
```
export function helloWorld() {
return "hello world!"
}
```
Obviously on a small chunk of code this won't make a huge difference, but if the code block you are checking is 25+ lines long, you'll want to use backticks.
Advanced Prompting
1. Structured Input
Let's move onto something a bit more in-depth. Let's say you are building out a brand new project from scratch, a 2D platforming mini-game. You have a lot of requirements for this game, character design references, gameplay mechanics, art style, etc...
You might be tempted to do this across multiple conversations, but stop for a second. Models are incredibly powerful and capable. They may not get it right 100% the first time round - but the closer you get to 100% on the first prompt, the less tokens and time you'll waste correcting it's mistakes.
In order to craft a prompt worthy of such a large task, there are some tools we can use to help better structure our input. We already saw a small slice of that with our coding backtick example, but now we'll take it a step further.
2. Laying out your Prompt
It's important that the most critical information in your prompt comes as close to the start as possible, this is because of a known issue in LLMs called Lost in the Middle - where an LLM spends less resources ensuring the "middle" of your prompt is followed instead of the start and end. There is no exact cut off for this so making sure your prompts follow a consistent flow will help a lot.
There is no explicit rule book on how you should structure your prompt, but I have found that placing Role and Goal near the top, and additional context at the bottom can greatly improve the resulting output. Here is how I would lay out the initial structure for our 2D Platformer prompt.
- Role
- Goal
- Core Features
- Instructions
- Additional Context
3. Using Markdown for Word Doc-Style Formatting
LLMs work best when prompts are written in english - but they miss out on a lot of additional context that we, as humans, get when reading a word document. This includes things like titles, quotes, links, etc...
But as you may have noticed, there are no controls in your AI editor of choice that allow you to set these properties - at least - not that YOU know of.
That is why Markdown is so helpful. It allows us to sprinkle in some additional sugar in all of our prompts to make it easier for an LLM to determine what is and is not important. We already saw an example of this with our code example. So how do we add titles and headings to our prompts? It's as simple as #, ##, ###
# - Title
## - Subtitle
### - Section Header
Adding these to our prompt will make it much easier for us to understand, as a human, where information is presented. LLMs are able to identify the weight of information.
You can also better layout information in List formats using a dash -
LLMs are great at reading list-based information as there is a clear start and end point to the information.
Putting it all Together
Now that we've covered some more advanced topics around prompt engineering - let's combine everything we have learned into a single, highly structured prompt. The following prompt may not work well in a single ChatGPT, Claude, or Gemini chat - so I recommend dropping this kind of prompt into Codex, Claude Code, or Cursor, and check out the result!
Example
# 2D Side-Scrolling Platformer
## Role
Act as a senior game developer. specializing in web-first video game development
## Goal
Your goal is to create a simple 2D Side-Scrolling game with classic AWD controls to move and avoid obstacles, holes in the ground, and enemies - with a win condition of reaching the flag at the end of the level.
## Instructions
Based on the following instructions, build the game. All external resources must be accessible via a CDN.
### Game Design
The game must be playable within a web browser. The design is flat, 2D, low-pixel, and blocky. A looping soundtrack and sound effects will play as the user interacts in the game.
### Game State
The game must have a Start Menu, Win, and Death screen. After a win or death, the user can play again. The game has a timer at the top right of the screen, showing the player how much time has elapsed during gameplay. On Win, the player will be shown their time in the Win screen.
### Obstacles
- Hole in the ground: A pit that the player must jump over. varying lengths to add challenge to gameplay. Holes must not be placed beside one another.
- Walls & Floor: Single or multiple stacked blocks, can also be floating, placed over the level to encourage problem solving in order to navigate.
- Lava: Similar to holes in the ground but do not instantly kill the player. Every 0.5 seconds a player is in lava, they lose a life.
### Player Character
A small Red Square with a smiley face. The Player controls the character using:
- A to move left
- D to move right
- W to jump
The player starts with 3 lives. When an enemy makes contact, the player loses a life when
- An enemy makes contact with the player
- The player makes contact with an obstacle
- The player makes contact with lava
The player loses all lives if they fall down a hole.
### Enemies
A yellow circle with a frowning face that infinitely moves between two fixed points in the game with multiple enemies distributed across the level.
## Additional Context
- Perform some light research on the best 3rd party libraries and asset sources to use for the game.
- Think Super Mario Bros.
- Look for examples online of simple 2D side scrollers that you could base this project off of.
Conclusion
Now you've learned all the basics of prompt engineering it's time for you to try it out for yourself. Remember, writing a detailed and highly targeted prompt is not quick, and it's not easy. It may feel like you're writing slower, and getting less out of our AI - but the opposite is true. By taking the time to properly craft your prompts you'll waste less time in the long run, get more out of the model, and cut down on your costs.
