3 min read

šŸ—‘ļø Ditch the ChatGPT Prompt Box

"Iā€™d worked my way up to three hundred pounds of weight in calf raises, beyond any other bodybuilder I knew. I thought I must be near the limit of human achievement. So I was amazed to see Reg doing calf raises with one thousand pounds." - Arnold Schwarzenegger

You might think you're giving ChatGPT enough context, but you're not.

The limited dialogue box psychologically constrains your prompts. 

It's like Arnold Schwarzenegger's experience training his calves.

Arnold thought he was at the pinnacle of achievement until he saw Reg Park lifting over three times as much. 

The lesson? 

Limits are often psychological.

If you get this wrong when you're programming with ChatGPT: 

ā€¢ You'll get suboptimal code back. 

ā€¢ Your software packages might lack necessary design patterns. 

ā€¢ End-users could face unexpected errors and bugs. 

ā€¢ Your test functions may not actually assess code quality.

I made this very same mistake.

When ChatGPT first released, I overvalued it's output.

I fed it a shotgun spread of small prompts only to realize that ChatGPT thrives on fewer large prompts.

This early misconception led to shipping software riddled with errors.

I expected a robust API wrapper, I ended up with one that was fragile and badly tested.

Venture beyond the built-in terminal and write better prompts

If I could revisit my earlier days with ChatGPT, I'd draft my prompts in a separate document. 

Make sure they're detailed and exhaustive and then transfer them back to ChatGPT. 

What does this look like in practice?

Bad Prompts:

ā€¢ "Write a function to make limit orders with the Coinbase Advanced Trade API"

ā€¢ "Write a class that authenticates my Coinbase API connection"

ā€¢ "Write a blog post about how to use ChatGPT for programming."

Good Prompts: 

ā€¢"""I have a nontechnical audience on youtube that I am trying to teach how to program so these API functions need to abstract away as much complexity as possible.  

Authentication should be possible in a single line of code where the user passes in plain text API keys (optionally sacrificing some security for ease of use while still keeping the option for environment variable security open to more advanced users)   

The new limit buy function should be as easy as possible to use with a default limit price of 0.995* the spot price of the asset and the limit order function should also be able to be written in a single line because we will be using them a lot in other trading strategy functions 

We will do the same thing with a limit sell function where we instead set a default limit price of 1.005* the spot price of the asset  

Please ask me 5-10 more questions that will help you get a better understanding of what we are trying to build in the strategy folder"""

ā€¢ """Rewrite the authentication module cb_auth.py using a singleton pattern. Add comments to explain why it is a singleton and provide pros and cons of this design comparing it to alternatives."""

ā€¢"""Here is a template that we will use to write a blog post about how to feed information into chatGPT-4 to better program python APIs  

Next ask me 10 questions about my experience using chatGPT-4 to program python APIs including dos and don'ts around how to prompt ChatGPT-4 to get the best outcomes.

After you have collected that information from me, fill out the template below with a first draft.  

Template: In this first sentence, tell the reader what they shouldn't do if they want to achieve X..."""

This approach guarantees:

ā€¢ More accurate code outputs. 

ā€¢ A tailored solution based on the exact problem statement. 

ā€¢ Fewer debugging hours. 

ā€¢ That writing produced by ChatGPT is relevant and structured

Understanding the real potential of ChatGPT is like discovering hidden treasure. 

When used correctly, it can amplify your productivity, turning you into a 10X engineer, even if you're just starting. 

But remember, while ChatGPT is powerful, it can't replace core knowledge of programming concepts.

Why does this even matter?

"Give me a lever long enough and a place to stand and I will move the Earth" - Archimedes

Code and media are permission-less leverage.

You can write code once and 10,000 people can use it

You can make one video and 1,000,000 people can watch it

The internet is overflowing with opportunities, and tools like ChatGPT are leverage points. 

The better you understand how to use these tools, the more high leverage work you'll be able to produce. 

Even if the work sucks at first - going through iterations and producing more will make you better faster.

Don't quit before you realize the benefits of leverage

Don't let your misconceptions limit your potential. 

Test, iterate, and leverage ChatGPT to its fullest - the results will come.