Skip to content

Promt librairy to improve productivity with LLM like ChatGPT.

License

Notifications You must be signed in to change notification settings

antoheri/LLM-prompts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# LLM Prompting

Promt librairy to improve productivity with LLM like ChatGPT.

How to create good prompts

The 6 prompt components

When writing a new prompt, go down this check list :

Mandatory

  1. Task
  2. Exemplar

Important

  1. Context
  2. Persona

Nice to have

  1. Format
  2. Tone
[persona] + [context] + [task] + [exemplar] + [format] + [tone]

This formula will give you a good output, wowerever, you don't need to use the six components.


1. The task

Always start the task sentence with an action verb, ex: generate, give, write, analyze, etc. and clearly articulate what your end goal is.

It can be a simple task or a multi-task. Use a verb for each one of them.

Analyze the collected feedback, summarize the top 3 takeaways and categorize the rest.

2. The context

It can be quite difficult to define, here is three questions to refine your context :

  • What is the user's background ?
  • What does success look like ?
  • What environment are they in ?

I'm a computer science student studying for a bachelor's degree.
I have to pass my exam on big data in 2 weeks.
I have very little time to revise.
Give me 3 points to prioritise to understand this subject.

The key is to give just enough information to constraint the endless possibilities.

3. Exemplar

Adding exemplars to the prompt drastically improves the quality of the output.

John Dohe, Athlete, Monaco
Alice Reed, Computer scientist, New-York
Megan Dahl, Driver, London
Re-write this list using this structure: "My name is X, I work as a Y and I live in Z"
For example: My name is Carlos, I work as a Cook ans I live in Zurich.

4. Persona

Who the AI needs to be ? Who do you want to talk. Specify expert or profession for any domain.

You are an expert in cybersecurity, with more than 10 years of experience, give me...

It also works with famous personalities, even non-real ones.

5. Format

Specify and visualize the exact format of the result.

Sort these feedbacks and display the results in a table with column headers: 'Feedback,' 'User,' 'Date'.

Formats examples :

  • Emails
  • Table
  • Bullet points
  • Code blocks
  • Paragraphs
  • Markdown

6. Tone

Specify the tone of the result : With enthusiasm, pessimisstic, formal, casual.

Check these lists of prompts

About

Promt librairy to improve productivity with LLM like ChatGPT.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published