Learn_Prompting
Prompt Engineering, Generative AI, and LLM Guide by Learn Prompting | Join our discord for the largest Prompt Engineering learning community
Top Related Projects
🐙 Guides, papers, lecture, notebooks and resources for prompt engineering
This repo includes ChatGPT prompt curation to use ChatGPT better.
Examples and guides for using the OpenAI API
This repository contains a hand-curated resources for Prompt Engineering with a focus on Generative Pre-trained Transformer (GPT), ChatGPT, PaLM etc
A library for helping developers craft prompts for Large Language Models
Quick Overview
Learn_Prompting is an open-source course and resource hub for learning about AI prompt engineering. It provides comprehensive guides, tutorials, and examples for crafting effective prompts for various AI models, with a focus on practical applications and best practices.
Pros
- Extensive and well-organized content covering a wide range of prompt engineering topics
- Regular updates to keep pace with the rapidly evolving field of AI
- Community-driven approach, allowing contributions and feedback from users
- Available in multiple languages, making it accessible to a global audience
Cons
- May be overwhelming for complete beginners due to the breadth of information
- Some advanced topics might require prior knowledge of AI and machine learning concepts
- Content quality may vary across different sections due to community contributions
- Lacks interactive exercises or hands-on practice environments within the repository
Note: As this is not a code library but an educational resource, the code example and quick start sections have been omitted as per the instructions.
Competitor Comparisons
🐙 Guides, papers, lecture, notebooks and resources for prompt engineering
Pros of Prompt-Engineering-Guide
- More comprehensive coverage of advanced techniques
- Includes practical examples and case studies
- Regular updates with the latest developments in prompt engineering
Cons of Prompt-Engineering-Guide
- Less beginner-friendly structure
- Fewer interactive elements and exercises
- More text-heavy, which may be overwhelming for some learners
Code Comparison
Learn_Prompting:
def generate_prompt(topic):
return f"Write a short essay about {topic}."
response = openai.Completion.create(
engine="text-davinci-002",
prompt=generate_prompt("artificial intelligence"),
max_tokens=150
)
Prompt-Engineering-Guide:
from langchain import PromptTemplate
template = """
Write a short essay about {topic}.
Include at least three key points and a conclusion.
"""
prompt = PromptTemplate(
input_variables=["topic"],
template=template
)
result = llm(prompt.format(topic="artificial intelligence"))
Both repositories offer valuable resources for learning prompt engineering, but they cater to slightly different audiences. Learn_Prompting is more accessible for beginners, while Prompt-Engineering-Guide provides a deeper dive into advanced techniques and current trends in the field.
This repo includes ChatGPT prompt curation to use ChatGPT better.
Pros of awesome-chatgpt-prompts
- Extensive collection of ready-to-use prompts for various scenarios
- Community-driven with frequent updates and contributions
- Simple, easy-to-navigate structure
Cons of awesome-chatgpt-prompts
- Lacks in-depth explanations or tutorials on prompt engineering
- Limited focus on advanced techniques or strategies
- Minimal organization or categorization of prompts
Code Comparison
Learn_Prompting:
def few_shot(examples, new_input):
prompt = "Examples:\n"
for ex in examples:
prompt += f"Input: {ex['input']}\nOutput: {ex['output']}\n\n"
prompt += f"Input: {new_input}\nOutput:"
return prompt
awesome-chatgpt-prompts:
# Act as a Linux Terminal
I want you to act as a linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English, I will do so by putting text inside curly brackets {like this}. My first command is pwd
Examples and guides for using the OpenAI API
Pros of openai-cookbook
- Official resource from OpenAI, ensuring up-to-date and accurate information
- Comprehensive coverage of OpenAI's APIs and models
- Includes practical examples and use cases for various applications
Cons of openai-cookbook
- Focused solely on OpenAI's offerings, limiting broader AI/ML exploration
- May lack community-driven content and diverse perspectives
- Less emphasis on prompt engineering techniques and strategies
Code Comparison
Learn_Prompting example:
prompt = f"""
Summarize the text below in 50 words or less:
{text}
"""
response = openai.Completion.create(engine="text-davinci-002", prompt=prompt, max_tokens=60)
openai-cookbook example:
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": f"Summarize this text in 50 words: {text}"}
]
)
Both repositories offer valuable resources for working with AI language models. Learn_Prompting provides a broader perspective on prompt engineering across various platforms, while openai-cookbook focuses specifically on OpenAI's offerings with official, in-depth guidance. The choice between them depends on whether you're looking for a comprehensive view of prompt engineering or specialized knowledge of OpenAI's ecosystem.
This repository contains a hand-curated resources for Prompt Engineering with a focus on Generative Pre-trained Transformer (GPT), ChatGPT, PaLM etc
Pros of Awesome-Prompt-Engineering
- More comprehensive collection of prompt engineering resources
- Includes a wider range of topics, such as tools, papers, and courses
- Regularly updated with new content and contributions
Cons of Awesome-Prompt-Engineering
- Less structured learning path for beginners
- Lacks in-depth explanations and tutorials
- May be overwhelming due to the sheer amount of information
Code Comparison
While both repositories primarily focus on curating resources rather than providing code examples, Learn_Prompting does include some code snippets in its tutorials. Here's a brief comparison:
Learn_Prompting:
prompt = f"""
Summarize the text below in 50 words or less:
{text}
"""
response = openai.Completion.create(
engine="text-davinci-002",
prompt=prompt,
max_tokens=60
)
Awesome-Prompt-Engineering: No specific code examples are provided in the main repository.
Both repositories serve as valuable resources for prompt engineering, with Learn_Prompting offering a more structured learning experience and Awesome-Prompt-Engineering providing a comprehensive collection of resources for various skill levels and interests.
A library for helping developers craft prompts for Large Language Models
Pros of prompt-engine
- Developed and maintained by Microsoft, potentially offering more robust support and resources
- Focuses on providing a structured framework for building prompt-based applications
- Includes tools for prompt management and version control
Cons of prompt-engine
- Less comprehensive educational content compared to Learn_Prompting
- May have a steeper learning curve for beginners in prompt engineering
- Primarily targets developers rather than a broader audience interested in learning about prompts
Code Comparison
Learn_Prompting (example from documentation):
from learn_prompting import Prompt
prompt = Prompt("Translate the following English text to French: {text}")
result = prompt.format(text="Hello, how are you?")
print(result)
prompt-engine (example from documentation):
import { PromptTemplate } from '@microsoft/prompt-engine';
const template = new PromptTemplate('Translate the following English text to French: {{text}}');
const result = template.format({ text: 'Hello, how are you?' });
console.log(result);
Both repositories provide tools for working with prompts, but prompt-engine offers a more structured approach with TypeScript support, while Learn_Prompting focuses on educational content and Python implementation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Learn Prompting
Prompt Engineering, Generative AI, and LLM Guide by Learn Prompting | Join our discord for the largest Prompt Engineering learning community
Contribution Guidelines
We welcome contributions in any form.
We are actively looking for:
- content suggestions
- translation
- content/art contributions
- typos :)
Local Development
Make sure you are using Node 18.0.0 or higher (node -v
). Then, run the following commands in a terminal:
# download the website code with git
git clone https://github.com/trigaten/Learn_Prompting.git
# enter the project directory
cd Learn_Prompting
# install node modules
npm i
# run the website locally
npm start
If you get an error related to the node version, you probably are using an older version of node.
Make sure the newer version appears higher in your path than any older versions.
Alternatively, you can use nvm to install the latest version of node. Install nvm, then do the following:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install-latest-npm
npm start
starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Thanks to all contributors â¤
Cite
Use the provided GitHub citation in this repository:
@software{Schulhoff_Learn_Prompting_2022,
author = {Schulhoff, Sander and Community Contributors},
month = dec,
title = {{Learn Prompting}},
url = {https://github.com/trigaten/Learn_Prompting},
year = {2022}
}
Top Related Projects
🐙 Guides, papers, lecture, notebooks and resources for prompt engineering
This repo includes ChatGPT prompt curation to use ChatGPT better.
Examples and guides for using the OpenAI API
This repository contains a hand-curated resources for Prompt Engineering with a focus on Generative Pre-trained Transformer (GPT), ChatGPT, PaLM etc
A library for helping developers craft prompts for Large Language Models
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot