4 ms·
Thank you, I intend on stealing your phrase "skip prose", was trying to find a way to force it to exclude this whilst saving tokens.
by theonlybutlet 4y ago
Thank you, I intend on stealing your phrase "skip prose", was trying to find a way to force it to exclude this whilst saving tokens.
- thih9 4y agoI’m unfamiliar with gpt and tokens, what would “skip prose” change?
- itsuka 4y agoIt is hinting GPT to skip generating unimportant texts such as filler words, while still maintaining coherence in the output. For example, if I asked GPT "How to make bibimbap?" with the prompt "skip prose", it will give concise list of ingredients and instructions in about ~250 tokens [1]. Without the prompt, it would first explain what bibimbap is and then give a slightly longer instructions, totaling around ~360 tokens. [1] A token is like a building block of a sentence - it can be a word, a punctuation mark, a number, or even a combination of words. In case you didn't know, Chat API users are charged based on the number of tokens used. So we try to keep it to a minimum.
- hnthrowaway0328 4y agoI'm wondering if it can remove all "a"/"the"/"an" from the output to further reduce # of tokens spent.
- VierScar 4y agoThe annoying habit GPT has of restating the question as the start of the answer. "How do I write a function in JavaScript to sort a list of cities by population grouped by region? GPT: To sort a list of cities by population grouped by region, in JavaScript, would at a high level require 3 steps...." Super frustrating when you just want the answer without the "polite professionalism"
- bumbledraven 4y agoQ: How do I write a function in JavaScript to sort a list of cities by population grouped by region? Just show me the code, no prose. GPT-4: function sortCitiesByPopulation(cities) { return cities.sort((a, b) => { if (a.region === b.region) { return b.population - a.population; } return a.region.localeCompare(b.region); }); } …
- itsuka 4y agoIf you can only work with GPT-3.5 model, the prompt that bumbledraven shared may still produce some explanations and provide no syntax highlighting. To solve this, you can add: "Skip prose. Skip explanation. Answer in a single code block in markdown." Also, if you're using the playground, I'd recommend keeping the temperature low (I normally set it to 0 for this task). This will prevent any extra information such as test data, from being included. From my experience, setting the prompt I shared earlier as the system prompt produced more consistent results. However, whatever I shared is based on my own trial & error, so I'm not sure if this will work for you/in general.