← back

(LinkedIn) Saving Tokens with ChatGPT

Created on: 2026-10-27

๐Ÿš€ 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! ๐Ÿ’ธ