One of the most powerful AI prompting tips is mixing languages.
What do I mean? Well LLMs have been trained on all kinds of computer language, not just English.
For example:
"Give me a history of the Roman empire -depth 1"
This will spit out a high level overview, meanwhile:
"Give me a history of the Roman empire -depth 10"
Will give you more like a PhD dissertation
Wha?! How does this work?
LLMs were also trained on tons of computer commands, so it intrinsically understands the concept of command line arguments or flags. You don’t have to limit your prompting to just English!
You could say:
"Use the todo tool to grab the list of open tasks, then take the first one and process it."
Or equivalently:
let task::_ = `todo list`
Extremely precise, and fewer tokens. Here I’m mixing OCaml/F# with Bash syntax.
You can even express general recursion and looping much more concisely using computer language constructs mixed with english instructions, rather than just trying to describe the loop in english alone.
Take a look at this Ralph Loop prompt I use for TaskLeef. I was really struggling until I remembered this trick.
