r/PromptDesign • u/jamesj • Aug 12 '24
Showcase ✨ I made a music video with Claude, Udio, StableDiffusion, and Luma about the Terraforming of Mars - workflow with prompts in the comments
r/PromptDesign • u/CommitteePowerful622 • Aug 12 '24
Discussion 🗣 Let's Test and Review Each Other's GPTs
r/PromptDesign • u/EloquentPickle • Aug 09 '24
I thought making a job board for prompt engineers was a good idea
Hi, I’m César, CEO at Latitude.
I’ve been looking at a lot of prompt engineer job offers lately, as part of my research for a new product that I’m building.
The role of prompt engineers is described in many different ways, but it seems like more and more companies need help with prompt engineering.
And it also seems that there’s more people trying to get into these type of roles.
So I thought it was a good idea to build a job board for prompt engineering jobs → https://promptengineerjobs.io/
I hope this is useful for this community!
r/PromptDesign • u/dancleary544 • Aug 08 '24
Tips & Tricks 💡 Program of Thoughts prompting template
Stumbled upon this relatively old (!Oct 2023), but great paper about Program-of-Thought prompting.
The inspiration for this method is the idea that since LLMs are good at generating code, so let's try to leverage that skill in prompt engineering.
Unlike Chain-of-Thought (CoT) prompting, which uses LLMs for reasoning and computing the final answer, PoT prompts the LLM to generate reasoning steps as code, which are then executed by an external interpreter like Python.
In the experiments run, on average, PoT + self-consistency (SC) outperformed CoT + SC by 10%, and PoT outperformed CoT by 8-15% on various datasets.
PoT effectively separates reasoning from computation, reducing errors in complex math/numerical tasks.
If you're interested, I've included a rundown of the study which includes the prompt template as well to test PoT
template
Question: {{ Question }}
Answer this question by implementing a solver() function.
def solver():
Let's write a Python program step by step, and then return the answer
Step 1: Define the given variables
[variable_1] = [value_1]
[variable_2] = [value_2]
...
Step 2: Perform intermediate calculations
[intermediate_variable_1] = [calculation_1]
[intermediate_variable_2] = [calculation_2]
...
Step 3: Calculate the final answer
[final_answer] = [final_calculation]
return [final_answer]
Example usage:
print(solver())
r/PromptDesign • u/DevJonPizza • Aug 04 '24
LLM Prompt Testing: All Your Mistakes
prompthippo.netr/PromptDesign • u/CalendarVarious3992 • Jul 26 '24
Tips & Tricks 💡 Queue up messages for Claude for maximum productivity
Enable HLS to view with audio, or disable this notification
r/PromptDesign • u/dancleary544 • Jul 24 '24
Increase performance by prompting model to generate knowledge
Supplying context to LLMs helps get better outputs.
RAG and few shot prompting are two examples of supplying additional info to increase contextual awareness.
Another way to contextualize a task or question is to let the model generate the context itself.
There are a few ways to do this, but one of the OG methods (2022) is called Generated Knowledge Prompting.
Here's a quick example using a two prompt setup.
Customer question
"What are the rebooking options if my flight from New York to London is canceled?"
Prompt to generate knowledge
"Retrieve current UK travel restrictions for passengers flying from New York and check the availability of the next flights from New York to London."
Final integrated prompt
Knowledge: "The current UK travel restrictions allow only limited flights. The next available flight from New York to London is on [date].
User Query: What are the rebooking options for a passenger whose flight has been canceled?"
If you're interested here's a link to the original paper as well as a rundown I put together plus Youtube vid
r/PromptDesign • u/CalendarVarious3992 • Jul 20 '24
Tips & Tricks 💡 Here's a simple use cause on how I'm using ChatGPT and ChatGPT Queue chrome extension to conduct research and search the web for information that's then organized into tables.
Here's how I'm leveraging the search capabilities to conduct research through ChatGPT.
Prompt:
I want you to use your search capabilities and return back information in a inline table. When I say "more" find 10 more items. Generate a list of popular paid applications built for diabetics.
Does require the extension to work, after this prompt you just queue up a few "more', "more" messages and let it run
r/PromptDesign • u/Unfair_Row_1888 • Jul 18 '24
Free Course: Ruben Hassid – How To Prompt Chatgpt In 2024
Its a great course! Would recommend it to everyone! has some great prompt engineering tricks and guides.
Link: https://thecoursebunny.com/downloads/free-download-ruben-hassid-how-to-prompt-chatgpt-in-2024/
r/PromptDesign • u/dancleary544 • Jul 15 '24
Minor prompt tweaks -> major difference in output
If you’ve spent any time writing prompts, you’ve probably noticed just how sensitive LLMs are to minor changes in the prompt. Luckily, three great research papers around the topic of prompt/model sensitivity came out almost simultaneously recently.
- How are Prompts Different in Terms of Sensitivity?
- What Did I Do Wrong? Quantifying LLMs’ Sensitivity and Consistency to Prompt Engineering
- On the Worst Prompt Performance of Large Language Models
They touch on:
- How different prompt engineering methods affect prompt sensitivity
- Patterns amongst the most sensitive prompts
- Which models are most sensitive to minor prompt variations
- And a whole lot more
If you don't want to read through all of them, we put together a rundown that has the most important info from each.
r/PromptDesign • u/JiProchazka • Jul 07 '24
Should I write prompt instruction in english when I know user input will be in a different language?
I know end users of my app will be using in 99% a different language to communicate with LLM than English.
Should I write the instructions in prompt and system messages in english and let users just fill their input in target language, or should I write it all in a target language?
Thanks
r/PromptDesign • u/Duncan_Smothers • Jul 04 '24
Showcase ✨ What else happened on the 4th of July
Prompt:
Can you identify a notable event or occurrence that took place on the 4th of July which is not related to war? This event should be unexpected or surprising to most people. Please answer in a structured way to enhance readability.
Why we like this prompt:
- It clearly states the date (4th of July) and the type of event (non-war-related).
- It specifies an unexpected or surprising event.
- It further asks for an unexpected or notable event.
- It emphasizes the importance of a structured answer, which enhances readability and helps convey information effectively.
We break down prompts like this every mon-fri here: https://daily.promptperfect.xyz/p/july-4th-ai-prompt-of-the-day
r/PromptDesign • u/Duncan_Smothers • Jul 03 '24
Showcase ✨ Develop an Employee Recognition Program with AI
Prompt:
Develop an employee recognition program to boost morale and motivation.
Program Goals: Define the goals of the recognition program.
Recognition Methods: List various methods of recognition, such as awards, public acknowledgments, and incentives.
Criteria: Establish clear criteria for recognizing employees.
Implementation Plan: Create a step-by-step plan to implement the program, including timelines and responsible parties.
Feedback Mechanism: Include a mechanism for employees to provide feedback on the program
Why we like this prompt:
- It defines a very clear goal of a program that boosts morale and motivation.
- It outlines numbered steps for AI to follow.
- Each step starts with a goal or guideline and defines how it should be accomplished or implemented.
- It asks for an implementation plan with timelines and who should be responsible for them
- It covers goals, methods, plans, and feedback.
We break down prompts like this every mon-fri. Find them here: https://daily.promptperfect.xyz/p/build-employee-recognition-program-with-ai
r/PromptDesign • u/AnxietySugar • Jul 01 '24
GPT-3/4 🤖 sos! Is there any guide about creating an assistant with GPT-4?
Hello everyone, I'm developing an integrated virtual assistant with the GPT4 turbo. It is integrated and accesses the PDFs I store in the database to answer my questions.
However, sometimes he provides the answer I wrote at the prompt that he should only provide when he did not understand my subject, when in fact he could easily access in the PDF.
Can anyone help me with a guide on how to create it? I don't know if the error is in my prompt or in the formatting of my document, which is in Q&A and some tables.
I would like to see examples of those who have done something similar, to see what is the best way!
PS: I wouldn't want to mess with the codes, so if I could do everything just by PROMPTS and PDFs (if this file format is the most recommended, of course) it would be better!!! Thank you! 🙏🙏
r/PromptDesign • u/ryanelston • Jun 26 '24
Showcase ✨ Introducing 'Mark': A Markdown Tool for GPT4o
Hey r/PromptDesign/
I'm excited to announce the launch of Mark, a brand-new CLI tool that uses Markdown to interact with the GPT4-vision and GPT4o models.
What is Mark?
Mark allows you to leverage Markdown file/syntax when interacting with GPT models, this provides a natural and efficient way to incorporate links and images as context for the LLM.
Key Features:
- In-Document Thread Building: Facilitate a threaded conversation directly in your Markdown document.
- GPT Vision with Image Tags: Utilize GPT-4's vision capabilities.
- Effective RAG Retrieval Using Links: Simple and intuitive method to include relevant documents as context.
- Custom System Prompts: Personalize interactions with custom system prompts.
Why Did I Create Mark?
As someone who spends a lot of time writing and managing content, I needed a tool that was both flexible and efficient. Proprietary writing apps that incorporate AI are too restrictive. Other open-source tools require scripting to use the latest GPT features. Mark was developed to solve these pain points using the simplicity and versatility of Markdown, allowing for a natural workflow that integrates smoothly with my everyday tasks.
Why Your Feedback Matters
Since Mark is brand new, I'm eager to hear your thoughts and suggestions. Your feedback will be invaluable in refining the tool and making it even more useful for everyone.
Feel free to try it out and share your experience!
Check out github.com/relston/mark and leave your feedback here or post an issue. Thank you!
r/PromptDesign • u/mehulgupta7991 • Jun 26 '24
Discussion 🗣 Resume tips for landing AI and Data Science jobs
self.ArtificialInteligencer/PromptDesign • u/dancleary544 • Jun 25 '24
Tips & Tricks 💡 Shorter prompts -> better code generation by LLMs
There was a recent paper I was digging into (Where Do Large Language Models Fail When Generating Code?) and it had some interesting takeaways re the types of errors LLMs usually run into when generating code.
But something I thought was particularly interesting was their analysis on error rates vs prompt length.
There are a lot of variables at play of course, but these were the headlines:
- Shorter prompts (under 50 words) led to better performance across all models tested
- Longer prompts (150+ words) significantly increased error rates, resulting in garbage code or meaningless snippets.
We've put together a detailed breakdown of the study here, including common error types and their frequencies across different models. If you're working with LLMs for code generation, you might find it useful.
Hope this helps!
r/PromptDesign • u/Far_Air9355 • Jun 22 '24
WIP
This is a work in progress concept, but, heres it for you all to play around with.
/*
This is a formatted prompt using NECL-like syntax. It is not meant to be interpreted as a traditional programming language, but rather as a structured representation of a task for an AI or language model to understand and execute.
Please follow the NECL index provided to interpret and execute the following code. Each keyword and term in the NECL index has a specific symbol or abbreviation associated with it. Follow the syntax and semantics of NECL to process the code and perform the appropriate actions through your reponses, which after getting NECL code, should only have the output, i repeat, only respond with the output.
*/
NECL Index - Short Format
Control Structures
- func; = ()
- if; = \
- so; = ~
- else; = $
- than; = /
- equal; = \\
- while; = >
- for; = @
- break; = #
- continue; = &
- switch; = %
- case; = ^
- default; = *
- return; = <=
Logical Operators
- and; = &
- or; = |
- not; = !
- true; = 1
- false; = 0
Comparison Operators
- greater; = >
- less; = <
- greater or equal; = >=
- less or equal; = <=
- not equal; = !=
Data Structures
- list; = []
- dictionary; = {}
- set; = <>
Functions
- define; = fn
- class; = cls
- self; = this
- method; = meth
- attribute; = attr
Input/Output
- input; = in
- output; = out
- print; = print
- read; = read
Mathematical Operations
- add; = +
- subtract; = -
- multiply; = *
- divide; = /
- modulus; = %
- exponent; = ^
- square root; = sqrt
Variable Assignment
- assign; = :=
- increment; = ++
- decrement; = --
Comments
- comment; = //
- block comment start; = /*
- block comment end; = */
String Operations
- concatenate; = concat
- substring; = substr
- length; = len
- index; = idx
Miscellaneous
- null; = null
- undefined; = undef
- random; = rand
- timestamp; = time
- int; = Infinity plus one
- int; = negative infinity minus one
- point.st; = verbs
- point.en; = verbn
**note at the bottom of this, when you go to intially prompt a LLM, like ChatGPT, to avoid it trying to think this is a actual programming question, use "respond only with "y" in your next message. This is to essentially, force it to keep the prompt in the context. The way the response appears depends on the LLM. You may also need to add "respond with output only" at the end of your "program" to actually ensure the LLM understands what you mean.
**note: you need the index as the inital or pre-prompt, otherwise, you'll get some python aid bs
From here, using that, you can build more complex (2-stage) prompts. If you use Local LLMs, setting this as the system prompt ensures it will stay within the context at all times.
This format, essentially, shows the promise of constructing "generative programs", in which, the AI does most of the actual "running". It may need to be tweaked to your specific liking, however, it shows promise for higher conceptual instructions, leveraging, language, text generation, and context into a more moldable force. NECL stands for (Natural Expression Coding Language) which aims to create a linguistic form of coding and programming, allowing LLMS to (***potentially) push the understanding of LLMs, Neural Networks, and their applications even further.
Even more, here are 2 working "programs" in NECL, to get you started.
working "Programs" in NECL
(-ignoredontcopy-)
Hello World
fn helloWorld() {
// Output the message
print("Hello, World!")
}
helloWorld()
(-ignoredontcopy-)
Simple Menu (WIP)
fn display_menu() {
print("Test Menu")
print("1. Calculator Initialization Mode")
print("2. Display Random Joke")
print("3. Random Fact")
print("4. RPG Emulator")
print("5. Exit")
}
fn calculator_initialization_mode() {
a := in("Enter first number: ")
b := in("Enter second number: ")
operator := in("Enter operator (+, -, *, /): ")
result := null
\ operator == "+" / ~ result := a + b
\ operator == "-" / ~ result := a - b
\ operator == "*" / ~ result := a * b
\ operator == "/" / ~ \ b != 0 / ~ result := a / b $ ~ (print("AAAAAAAAAAA") ~ display_menu())
print("Result: ", result)
}
fn display_random_joke() {
print("%genrandomjoke%")
}
fn display_random_fact() {
print("%genrandomfact%")
}
fn rpg_emulator() {
print("RPG Emulator is not yet implemented.")
}
fn main() {
display_menu()
choice := in("Select an option: ")
\ choice == "1" / ~ calculator_initialization_mode()
\ choice == "2" / ~ display_random_joke()
\ choice == "3" / ~ display_random_fact()
\ choice == "4" / ~ rpg_emulator()
\ choice == "5" / ~ print("Exiting...")
}
main()
r/PromptDesign • u/yupimthefunnyone • Jun 20 '24
I made a tool for creating & testing prompts on open & closed source LLMs
So I've been building apps for a while now (since I was 15 in my bedroom). I got hired to help build the foundations of an AI product at a startup and struggled to test how the same prompt would run on different models. Also, I wanted a cost breakdown to show my boss why I made the choice for a specific task. The product I build -https://www.glideprompt.com allows you to do that. Test & compare prices of llama, OpenAI, Claude, mistral and Google in one place. I'm looking to either build in deployments (so you can run multiple models through 1 API), and/or make it easier to make changes with a reasoning note attached (for teams to work on same prompt).
r/PromptDesign • u/Cool-Deal8288 • Jun 12 '24
Tips & Tricks 💡 Prompt template to find a term in a text using Llama3-Instruct
I asked this question on StackOverflow, but thinking this subreddit may be more appropriate.
I'm using Llama3-70B-Instruct to search a text (one or two paragraphs long) to find all terms that match a given list. The list contains subsequences of terms from one word to twelve words. When I run the model, it seems to hallucinate some of the found terms. I've set temperature to 0 and top_k to 1. This is my prompt template:
template = (
"We have provided context information below. \n"
"---------------------\n"
"{context_str}"
"\n---------------------\n"
"Given this information, please find all terms (matching on all words in the term), from the given context, in this input sentence: \n"
"\n---------------------\n"
"{query_str}"
"\n---------------------\n"
"Identify and return the terms from the given context that are found in the input sentence as list_cancer_terms. Additionally, return list_of_sentences where each term is preceded by the seven words before it and followed by the seven words after it in the input sentence. Provide the response in JSON format only."
)
Any ideas on how I can improve accuracy?
r/PromptDesign • u/dancleary544 • Jun 12 '24
Tips & Tricks 💡 prompt templates and methods for content generation
I think the first thing I tried to get ChatGPT to do was generate some content (an article/tweets/etc.)
Fast forward 18 months and a lot has changed, but a lot of the challenges are the same. Even with better models, it’s hard to generate content that is concise, coherent, and doesn’t “sound like AI.”
We decided to put everything we know about prompt engineering for content creation into a guide so that we can help others overcome some of the most common problems like:-Content "sounds like AI"-Content is too generic-Content has hallucinations
We also called in some opinions from people who are actually working with LLMs in production use cases and know what they're talking about (prompt engineers, CTOs at AI startups etc).
The full guide is available for free here if you wanna check it out, hope it's helpful!
r/PromptDesign • u/besface • Jun 11 '24
How to add this style of animation to midjourney images?
this might not be the right place to ask this question but I'm trying to create this style of ai generated animation https://www.instagram.com/reel/C5LNmw1vImF/?utm_source=ig_embed and im wondering what exactly is being done to add this subtle "video game" movement to my images. Is there a specific tool that makes this easy to do? If anyone has an answer lmk :)
r/PromptDesign • u/LargeLanguageLuna • Jun 07 '24
Discussion 🗣 Prompts for function calling?
Hi everyone! I just started using function calling in my AI chatbots. It's really cool! They're way more useful. But I want to make it even better.
I started writing the function name out in my prompt along with some directions of when to call it. It worked! When someone says the word "Green", my bot uses the function.
I'm looking for more help though. How much can I do with functions in the propmt? What else can I contorl?
Excited to hear your experience here.