An open API service indexing awesome lists of open source software.

https://github.com/sunanda01/llm_prompting


https://github.com/sunanda01/llm_prompting

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

# 🚀 **Prompt Engineering Techniques**

A curated collection of prompt engineering strategies and techniques for working effectively with large language models (LLMs) such as GPT-4, Claude, and others.

> This repository is a curated collection of notes, strategies, and examples based on the Coursera course:
> **["ChatGPT Prompt Engineering for Developers"](https://www.coursera.org/learn/chatgpt-prompt-engineering-for-developers-project/home)**
> by [DeepLearning.AI](https://www.deeplearning.ai/) and OpenAI.

> 📁 Organized into practical, real-world categories like summarizing, transforming, inferring, and more.

---

## 🧠 What is Large Language Models (LLMs)?
### An LLMs is an artificial intelligence (AI) model trained on massive amounts of text data to understand, generate, and reason with human language.
Examples include:
- ChatGPT (by OpenAI)
- Claude (by Anthropic)
- Gemini (by Google)
- LLaMA (by Meta)

---

## 💬 What is Prompting?
### Prompting is how we instruct the model to perform tasks — from summarizing to reasoning or generating creative text.

---

## 📌 Note
### LLM is the tool. Prompting is how we use it.

---

## ✍️ Two types of Large Language Models (LLMs)
- Base LLM
- Instruction Tuned LLM

---

## 🎯 Principles for Prompting

### 📌 Principle 1: Write Clear and Specific Instructions

#### 🔧 Tactics to Apply:

- Use Delimiters
- Ask for Structured Output
- Check whether condition are satisfied. Check assumption required to do the task
- Few-shot Prompting


### 📌 Principle 2: Give the model time to think

#### 🔧 Tactics to Apply:

- Specify the steps required to complete a task
- Instruct the model to work out its own solution before rushing to a conclusion

---

## 💡 Tips for Prompting

- Be detailed and specific
- Guide the model to think through its answers
- Experiment and iterate

---

## 🔁 Prompting Process

- Be clear and specific in prompt
- Think about why result isn't giving desired output
- Refine prompt
- Repeat

---

## 💢 Demerit of Large Language Models (LLMs)

- Knowledge Cutoffs
- Making things up : HALLUCINATIONS
- The input and output length is limited
- Bias & Toxicity
- Generative AI does not work well with structured data

---

## 📂 Folder Structure

| Folder Name | Description |
|-----------------------|-----------------------------------------------------------------------------|
| `chatbot/` | Prompts and patterns for building conversational agents and chatbots. |
| `expanding/` | Techniques for elaborating, extending ideas, or continuing content. |
| `inferring/` | Prompts designed to extract meaning, assumptions, or conclusions. |
| `iterative_prompt/` | Step-by-step refinement and feedback-based prompt workflows. |
| `prompting_principle/`| Core principles and best practices of good prompt design. |
| `summarizing/` | Strategies to condense long content into concise, useful summaries. |
| `transforming/` | Prompts for changing tone, format, style, or structure of a given input. |

---