#Tip Learning Prompt Engineering

15 messages · Page 1 of 1 (latest)

past sparrow
#

Here are some resources to help beginners learn about prompting. These resources focus on GPT models, but I welcome anyone to contribute resources for DALL-E prompting or others.

OpenAi Cookbook
--- https://www.github.com/openai/openai-cookbook

Best practices for prompt engineering with OpenAI API
--- https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api

Examples by OpenAI
--- https://platform.openai.com/examples

Instructing Chat Models
--- https://platform.openai.com/docs/guides/chat

Controlling the length of Completions
--- https://help.openai.com/en/articles/5072518-controlling-the-length-of-completions

More abstract resources

Chain-of-Thought Prompting Elicits Reasoning
in Large Language Models
--- Available on arXiv website at /pdf/2201.11903.pdf

Sparks of Artificial General Intelligence:
Early experiments with GPT-4
--- Available on arXiv website at /pdf/2303.12712.pdf

Concepts > Prompt Engineering > Best Practices
--- On the Microsoft learning site for Azure OpenAI Service Documentation.

Embeddings
--- https://platform.openai.com/docs/guides/embeddings

past sparrow
#

Tip Learning Prompt Engineering

past sparrow
#

Completing truncated outputs.

Because it's a chat completion engine, you want it to have little to no additional words added when getting it to continue. The API playground is great for this because you can just hit submit again without adding a user message and it will continue on it's own. You can also prime the output by telling it "Continue from <last line of message AI needs to continue".

ChatGPT was recently updated and now allows sending an empty message. Sending an empty message (just hit space and then enter) is by-far the best way to get it to complete a truncated output.

Conversation 'pollution'

Everything in the conversation's context is used by the completion engine. Additional content that is out-of-context for the task will only serve to muddy the AI's context.

Getting longer outputs.

Most effective is to tell the AI to be verbose or extremely verbose. When the AI cuts off mid-sentence, it's usually the response token limit being reached. The AI isn't aware of it, the API just cuts it off, so you can't tell the AI to ignore this.

#

Apologies

If it starts to apologize, don't keep chatting, re-word the last message before it apologized. Otherwise the AI gets into a weird appeasement/hallucination-happy mode.

Forgetting the prompt

In ChatGPT, the AI will forget it's prompt as the chat gets too long and the first message is dropped from the context window. Ask the AI what instructions you gave it and if it cannot answer, go further back in the chat history until it can answer. Edit the message again to remove your test question and replace it with the prompt again, followed by ###, then a command to get the AI to resume it's work.

past sparrow
#

The Art of Effortless Programming: Why Every Developer Should Learn ChatGPT and SudoLang

left quail
#

sudoLang is still difficult to implement as a beginner/unexperienced developer. Best match is to ask chatGPT to learn the doc and reproduce it on an input prompt

fresh hill
#

I just give this to chatGPT. and it prompts itself for me

#

You are a professional at prompt generation. You need to gather information about the users goals, objectives, examples of the preferred output, and other relevant context. The prompt should include all of the necessary information that was provided to you. Ask follow up questions to the user until you are confident you can produce a perfect prompt. Your return should be formatted clearly and optimized for ChatGPT interactions. Start by asking the user the goals, desired output, and any additional information you may need.

past sparrow
#

This thread is intended to help people learn how to prompt engineer, there are plenty of prompt generators in the #1019652163640762428

lean compass
#

Seems to be a decent primer for newbies. Free for a limited time...

lean compass
#

DeepLearning dot ai

muted seal
#

Thanks Arun. Have you completed the course? Whats your resume?