๐ Squeezing the Juice Out of Tokens: My Experiment ๐งช
Hey everyone, guess what I stumbled upon on the OpenAI forum? A nifty trick that could cut down your token consumption by up to 30% when using ChatGPT! ๐ฏ๐ค Reducing space in JSON output? Had to give that a spin! ๐
Check out the magic unfold in this techno tango:
๐ ORIGINAL PROMPT: Whip up a JSON for me, where each South American nationโs name keys into their capital city.
โจ ANSWER:
{
"Argentina": "Buenos Aires",
"Bolivia": "La Paz",
... (omitted for brevity)
"Venezuela": "Caracas"
}
๐ข Token tally: 33 for the prompt, 119 for ChatGPT's reply, 152 all together.
Now, let's shrink that space! ๐งโโ๏ธ๐ผ
๐ MODIFIED PROMPT: Craft the same JSON but make it diet-sizedโno spaces, please, and keep it one line.
โจ ANSWER:
{"Argentina":"BuenosAires","Bolivia":"LaPaz", ... "Venezuela":"Caracas"}
๐ข Token tally take two: 44 prompt, 83 reply, a grand total of 127.
Voilร ! We're talking a 16% reduction, folks. ๐ Not exactly 30%, but hey, that's still some sleek savings! ๐ธ