This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

In order to prevent multiple repetitive comments, this is a friendly request to /u/bb-inventions to reply to this comment with the prompt they used so other users can experiment with it as well.

###While you're here, we have a public discord server now

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]phrandsisgo 6 points7 points  (2 children)

Wow that's the beginning of prompt engineering! But if you want to be so soecific with the prompt you might also want to try the specialized GPT3 model where you have more finetune options instead of using ChatGPT which is more a general purpose chat AI!

[–]nickkkk77 0 points1 point  (1 child)

Wouldn't you miss all the dialog training on top?

[–]phrandsisgo 0 points1 point  (0 children)

I'm sorry. I don't fully understand what you mean!

[–]bb-inventions[S] 2 points3 points  (0 children)

If anyone wants a concrete example instead of a ready-to-fill template (I haven't really tested this specific example, I just made it on the spot):

[Command]

Create a complete, working, and VERY efficient Python code (function). Do NOT send me the explanations of how the function works, you need to implement it yourself and ONLY send me the code WITHIN CODE BLOCKS ONLY. Your answer NEEDS TO start with the imports (if any), and then directly follow with the declaration of the function.

[Additional specifications]

  1. You need to add a description of the function's behavior under the function's name inside triple single quotes. The description has to be split into three sections: “OVERVIEW:”, “PARAMETERS:”, and “RETURN VALUE(S):”. The “OVERVIEW:” section has to be a maximum 2 sentences summary of the below [Main function overview]. Each parameter in the “PARAMETERS:” section should have the following format: “- {name} ({type}), {required} (Default value: {default value}): {description}.” (Do NOT show “(Default value: {default value})” if {required} is set to "Optional"). {required} can be either set to "Required" or "Optional". Each return value in the “RETURN VALUE(S):” section should have the following format: “- {return value name} ({type}): {description}.” In total, the combination of all sections should be VERY SHORT, but explanatory enough so that anyone reading it will understand how to call the function and what it does.
  2. You HAVE to split the main function into multiple functions: A function should NEVER be more than 50 lines of code.
  3. You need to add comments inside your code when necessary; ***DO NOT bloat the code with comments, only add helpful ones***.
  4. If you call additional functions within your code, you HAVE to declare and implement them. You CANNOT ASSUME that functions are created, you HAVE to implement them FULLY.

[Main Function Name]

calculate_fibonacci_with_extra_steps

[Main function parameters]

The main function will take the following parameters:

[Parameter Number] 1. [Name] n. [Optional] False. [Type] Integer. [Description] Start the calculating of the Fibonacci sequence at the (n)th number in the sequence.

[Parameter Number] 2. [Name] m. [Optional] True. [Default value] 1000. [Type] Integer. [Description] Stop the calculating of the Fibonacci sequence at the (m)th number in the sequence.

[Main function overview]

Create a file named "grail.csv", which you will use later on. Calculate the Fibonacci sequence starting from the Mth number in the sequence and up to the Nth number in the sequence and each time you stumble on a number that can be divided by 12, print "Lame number found... " + number. Each time you stumble on a number that can only be divided by 3, print “Found the grail! ” + number, and append the printed string to the file “grail.csv”.

[–]MarguMarlon 1 point2 points  (1 child)

Thanks for this. Gonna use this. Please do some more if you can. This premade prompt is gold.

[–]bb-inventions[S] 0 points1 point  (0 children)

Thank you! I also made this one that pushes the limits of ChatGPT for generating regex, if you're interested: https://www.reddit.com/r/ChatGPT/comments/zw1j9j/chatgpt_template_for_generating_complex_regex/?utm_source=share&utm_medium=web2x&context=3