Hacker News new | past | comments | ask | show | jobs | submit login

You can just say “no explain” and it won’t explain. Don’t waste tokens patronizing gpt lol



Doesn't always work. Sometimes you have to be more verbose or even repeat yourself in order to force the model to do something. This is one of those cases. Just adding "No explain" in the end of the prompt often doesn't stop it from adding an explanation anyways.

> write a function in JavaScript that turns a JavaScript array into JS DOM elements, like what Hiccup does in Clojure. No explain

Makes GPT-4 output text + code.

> write a function in JavaScript that turns a JavaScript array into JS DOM elements, like what Hiccup does in Clojure. Just show me the code, no extra words or explanation.

Makes GPT-4 output only code, nothing else.


Hah for GPT-3.5-Turbo I prompted:

    write a function in JavaScript that turns a JavaScript array into JS DOM elements, like what Hiccup does in Clojure. No explain
It replied:

    ation is necessary, just write the code.
    
    function arrayToDOM(arr) {
    (code follows)


True, it’s a fuzzy NN after all, but does more verbose really 100%? I’d still stick with it if it works 80% of the time. Or find a better short prompt like try “code only” or “just code”. Promoting can get really tiring.


I said earlier that it's 99%, but it's more like a disclaimer because if I said 100%, someone is surely gonna reply "look here, I did this and you lied so it's not 100%!". I've used the suffix for code examples for ~2 weeks now and never had it fail, personally.


#GPT Python: code for Fibonacci, no explain

def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: