Improve Prompt Engineering - Real World Examples - Content & Links (#7660)

* 📃 docs, data (Image Prompting) Update Topic/Sub Topics - In Place Edits.

- intent: Update topic from May 2023 to Oct 2024

- data: src/data/roadmaps/prompt-engineering/content/

- modify - 10X .ms
---

Co-authored-by: @iPoetDev <ipoetdev-github-no-reply@outlook.com>

* 📃 docs, data (Prompt Engineering Roadmap) Basic Concepts - In Place Edits.

- changes: single paragraphs (74-125 words)>
- concerns: if any more concise, topics looses fidelity, meaning and utility.

- data: src/data/roadmaps/prompt-engineering/content/
    - 📂 100-basic-llm

- modify: Topic
    - update content:
        - index.md
        - 100-what-are-llm.md
        - 101-llm-types.md
        - 102-how-llms-built.md
---

Co-authored-by: @iPoetDev <ipoetdev-github-no-reply@outlook.com>

* 📃 docs: (Prompt Eng.)  Basic LLM Concepts - New Links.

- intent: Update topic from May 2023 to Oct 2024
   - 📂 100 basic-llm

- modify topics:
    - add links
        - 100-what-are-llms.md
        - 101-types-llms.md
        - 102-how-llms-are-bilt.md

BREAKING CHANGE: 
---

Co-authored-by: @iPoetDev <ipoetdev-github-no-reply@outlook.com>

* docs: (Prompt Eng.) Prompting Introduction - New Links.

- intent: Update topic from May 2023 to Oct 2024
   - 📂 101-prompting-introduction

- modify topics:
    - add links
        - index.md
        - 100-basic-prompting.md
        - 101-need-for-prompting.md

BREAKING CHANGE: 
---

Co-authored-by: @iPoetDev <ipoetdev-github-no-reply@outlook.com>

* 📃 docs: (Prompt Eng.) Real World Uses - Content & Links.

- intent:
  - Update topic and links from May 2023 to Oct 2024.
  - Realword use cases are dynamic and evolving.
  - Remodelled existing examples.

- data: src/data/roadmaps/prompt-engineering/content/
  - 📂 103-real-world

   - modify: Content Improve, 1st paragraph.

    - modify: Expanded Content paragraphs
      - index.md
      - 100-structured-data.md
      - 101-inferring.md
      - 102-writing-emails.md
      - 103-coding-assistance.md
      - 104-study-buddy.md
      - 105-designing-chatbots.md

    - modify: Links New
      - index.md
      - 100-structured-data.md
      - 101-inferring.md
      - 102-writing-emails.md
      - 103-coding-assistance.md
      - 104-study-buddy.md
      - 105-designing-chatbots.md

BREAKINGCHANGE: 
---

Co-authored-by: @iPoetDev <ipoetdev-github-no-reply@outlook.com>

* Apply suggestions from code review

Just a couple of small spacing fixes

---------

Co-authored-by: Dan <daniel.s.holdsworth@gmail.com>
pull/7666/head
Charles J. Fowler 3 weeks ago committed by GitHub
parent a09704baa2
commit 779935cc60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 65
      src/data/roadmaps/prompt-engineering/content/103-real-world/100-structured-data.md
  2. 12
      src/data/roadmaps/prompt-engineering/content/103-real-world/101-inferring.md
  3. 6
      src/data/roadmaps/prompt-engineering/content/103-real-world/102-writing-emails.md
  4. 11
      src/data/roadmaps/prompt-engineering/content/103-real-world/103-coding-assistance.md
  5. 5
      src/data/roadmaps/prompt-engineering/content/103-real-world/104-study-buddy.md
  6. 7
      src/data/roadmaps/prompt-engineering/content/103-real-world/105-designing-chatbots.md
  7. 17
      src/data/roadmaps/prompt-engineering/content/103-real-world/index.md

@ -1,18 +1,26 @@
# Structured Data
Structured data helps in organizing information. It is especially useful in applications like e-commerce where you need to convert user input into a structured format.
Structured data is a powerful tool for organizing information effectively, particularly in real-world applications like e-commerce, mobile, and search. It helps convert user inputs into structured formats such as JSON, Markdown tables, HTML, and YAML, enhancing data management and retrieval. Recent improvements in this field include Google's expanded product information types, the increasing use of AI to automate and enhance structured data processes, the continued preference for JSON-LD as a structured data format, and enhanced mobile experiences through rich media and detailed information in search results.
### Example 1
## Examples
Let's say a user searches for `Birthday gift for my 18 months old daughter`. You can use a prompt to generate a JSON object from this input:
### Example: JSON Object
```
Print a JSON object containing `gender` ("male", "female"), `occasion` (one of "party", "birthday", "anniversary"), `age_years` (numeric value) from the text delimited by triple quotes:
"""Birthday gift for my 18 months old daughter"""
```
Consider a user searching for a "Birthday gift for my 18 months old daughter." Using prompts, you can generate structured data in various formats.
JSON Example:
```json
Print a JSON object containing:
- `gender` ("male", "female"),
- `occasion` (one of "party", "birthday", "anniversary"),
- `age_years` (numeric value)
from the text delimited by triple quotes:
"""Birthday gift for my 18 months old daughter"""
### Output
```
**Output**
The model would generate the following JSON object:
```json
@ -21,25 +29,38 @@ The model would generate the following JSON object:
"occasion": "birthday",
"age_years": 1.5
}
```
### Example 2
The following examples extend the original Print JSON prompt to convert one structured data into other formats, demonstrating another capability with structured data, data format interchange from a single source prompt.
Consider a user input `Anniversary gift for my husband`. You can use a prompt to generate a JSON object from this input:
### Example: Markdown Table
```
Print a JSON object containing `gender` ("male", "female"), `occasion` (one of "party", "birthday", "anniversary"), `age_years` (numeric value) from the text delimited by triple quotes:
"""Anniversary gift for my husband"""
From JSON to Markdown table
```markdown
| Gender | Occasion | Age (years) |
|--------|----------|-------------|
| Female | Birthday | 1.5 |
```
### Output
### Example: HTML Table
The model would generate the following JSON object:
From JSON to HTML table
```json
{
"gender": "male",
"occasion": "anniversary",
"age_years": null
}
```
<table>
<tr>
<th>Gender</th>
<th>Occasion</th>
<th>Age (years)</th>
</tr>
<tr>
<td>Female</td>
<td>Birthday</td>
<td>1.5</td>
</tr>
</table>
Learn more from the following resources:
- [@article@How to Use AI to Organize Data into Tables for Reports and Articles](https://learnprompting.org/docs/basic_applications/table_generation)

@ -1,6 +1,10 @@
# Inferring
Making use of LLMs to infer information from text is another common use case. Imagine you are running a famous e-commerce store with thousands of reviews. You want to group the reviews by the sentiment of the review. You can use LLMs to infer the sentiment of the review.
Making use of LLMs to infer information from text, i.e. text analysis, is another common use case. A common use case is sentiment analysis, such as grouping e-commerce reviews by sentiment. Beyond this, LLMs have diverse real-world applications, including customer service automation, market research, fraud detection, compliance monitoring, speech-to-text transcription, and anomaly detection. These applications demonstrate the versatility of LLMs in extracting valuable insights from text data, automating processes, and enhancing decision-making across different sectors. By leveraging LLMs, businesses can improve operational efficiency, gain deeper customer insights, and tackle complex challenges in areas such as cybersecurity and regulatory compliance
### Example
Imagine you are running a famous e-commerce store with thousands of reviews. You want to group the reviews by the sentiment of the review. You can use LLMs to infer the sentiment of the review.
Here are some prompts showing the use of inferrence:
@ -21,3 +25,9 @@ Identify a list of emotions that the writer of the following review is expressin
```
Output: `happy, satisfied, pleased, content, enthusiastic`
Learn more from the following resources:
- [@article@Generating Data | Prompt Engineering Guide](https://www.promptingguide.ai/applications/generating)
- [@article@Every Day Prompt Engineering - Text Analysis](https://www.ikangai.com/every-day-prompt-engineering-part-5-text-analysis/)
- [@course@Prompt Engineering Course — Inferring, Transforming, and Expanding with ChatGPT ](https://medium.com/geekculture/prompt-engineering-course-openai-inferring-transforming-expanding-chatgpt-chatgpt4-e5f63132f422)

@ -26,3 +26,9 @@ We value your business and are committed to ensuring your complete satisfaction.
Best regards,
AI Customer Service
```
Learn more from the following resources:
- [@article@Write Emails Faster Using AI: Sick Days, Cold Outreach, and More](https://learnprompting.org/docs/basic_applications/writing_emails)
- [@guides@AI Tools for Business Writing](https://communicationprogram.wharton.upenn.edu/library/ai-tools/)
- [@article@Everyday Prompt Engineering -Emails](https://www.ikangai.com/everyday-prompt-engineering-part-one-emails/)

@ -1,6 +1,6 @@
# Coding Assistance
You can use ChatGPT for debugging, code generation, reformatting, commenting, and more.
Large Language Models (LLMs) tailored for coding have become invaluable tools for developers, offering a wide range of functionalities to assist in coding tasks. These include debugging, code generation, reformatting and reviewing, translating between programming languages, refactoring code, program simulations, and generating unit tests. Recent advancements have expanded their capabilities to include code optimization, documentation generation, bug fixing, project management assistance, security analysis, and version control support. New features also allow users to interact with outputs directly, such as editing or refining code suggestions with or without additional prompts, like OpenAI's Canvas or Anthropic's Artefacts. These advancements make LLMs' capabilities available across the software development process, enhancing productivity and streamlining workflows across various stages of coding and project management.
## Code Generation
@ -26,6 +26,7 @@ noun = random.choice(nouns)
madlib = f"I {verb} {preposition} the {noun}."
print(madlib)
```
## Commenting and Reformatting Code
@ -62,6 +63,7 @@ for i in range(num_points):
# Print a space for padding, followed by an asterisk at the appropriate position on the wave
print(' ' * (amplitude + y) + '*')
```
## Debugging
@ -111,7 +113,9 @@ for i in numbers:
if j in numbers:
numbers.remove(j)
print(numbers)
```
Note that we asked the bot to "act like a senior developer" to optimize the script. You can also dictate that it have a certain area of expertise (e.g., sorting algorithms) or number of years of experience. Alternatively, if you have a script that seems overly complicated, you can ask ChatGPT to write that script "as a very junior developer."
## Translating Between Programming Languages
@ -147,8 +151,13 @@ salary = float(input("Enter employee's salary: "))
ss_tax = salary * 0.062
print("Social Security tax is: $", round(ss_tax, 2))
```
Learn more from the following resources:
- [@article@LLM Coding Assistance](https://learnprompting.org/docs/basic_applications/coding_assistance)
- [@guides@Generating Code | Prompt Engineering Guide](https://www.promptingguide.ai/applications/coding)
- [@article@Prompt engineering 101 for developers](https://www.pluralsight.com/resources/blog/software-development/prompt-engineering-for-developers)
- [@guide@Prompt Engineering for Coding Tasks ](https://towardsdatascience.com/prompt-engineering-llms-coding-chatgpt-artificial-intelligence-c16620503e4e)
- [@article@How GenAI Transforms Software Development: 11 Use Cases](https://www.index.dev/blog/11-generative-ai-use-cases-software-development)

@ -1,6 +1,6 @@
# Study Buddy
One of our favorite ways to use LLMs is as a study tool! In particular, it is useful for explaining confusing terms as well as quizzing you on test content.
LLMs have become powerful study & tutoring tools, offering various applications in education. They can explain complex terms, generate quizzes, and provide personalized learning experiences adapted to individual needs, including neurodivergent learning styles. Recent developments have expanded their capabilities to include multilingual support, automated grading and feedback, content creation for diverse educational materials, and improved accessibility for all students. These advancements enable LLMs to enhance comprehension, retention, and overall educational outcomes while allowing educators to focus on more complex tasks.
## Explaining Terms
@ -46,4 +46,7 @@ And the model will generate 5 questions for you to answer.
There are probably other ways to use LLMs to study. Many learning companies like Duolingo and Quizlet are implementing LLMs into their products.
Learn more from the following resources:
- [@article@LLMs as a Study Buddy](https://learnprompting.org/docs/basic_applications/study_tool)
-

@ -1,4 +1,9 @@
# Designing Chatbots
Building chatbots to offer customer support, sales, or other services is a hot topic in the tech industry. LLMs make it possible to build chatbots that can respond to a wide variety of user inputs, and can be trained to respond to new inputs with minimal effort.
Designing chatbots and other interfaces for real-world usage cases remains a key focus in the tech industry. Large language models (LLMs) continue to enhance chatbot capabilities, allowing them to respond effectively to diverse user inputs with minimal effort and training. The use cases for new user interfaces is expanding beyond traditional chatbots like: voice interfaces, gesture-based interfaces, multimodal AI systems using various input types, AI agents performing complex tasks autonomously, extended reality (XR) combining AI with AR/VR for immersive experiences. These advancements highlight the evolving nature of user interfaces, driven by technological innovations that promise more engaging and efficient interactions.
Learn more from the following resources:
- [@video@What is a Chatbot?](https://www.youtube.com/watch?v=o9-ObGgfpEk)
- [@video@Do Chatbots Need AI?](https://www.youtube.com/watch?v=93l-2Usc08U)
- [@video@Generative vs Rules-Based Chatbots](https://www.youtube.com/watch?v=lZjUS_8btEo)

@ -1,11 +1,24 @@
# Real World Usage Examples
LLMs are used in a variety of ways. Here are some examples of how LLMs are used in the real world.
LLMs are being used in an increasing number and variety of usages, applications and embedded approaches. These use cases are dynamic and ever evolving.
### Examples
Here are some examples of how LLMs are used in the real world, though not exhaustive:
- Natural Language Processing
- Information Retrieval
- Internet Search & Citations
- Question Answering
- Text Generation
- Text Summarization
- Learning Tools
- Chatbots
- Chatbots and Assistants
- Agents & Automation
- Multimedia Content
Follow the resources and latest updates to learn more:
- [@article@Solving Everyday Tasks with GenAI: Emails, Contracts, and More](https://learnprompting.org/docs/basic_applications/introduction)
- [@article@LLM Applications & Guides | Prompt Engineering Guide](https://www.promptingguide.ai/applications)
- [@article@7 Large Language Model (LLM) Use Cases and Applications: How AI is Reshaping Industries ](https://collabnix.com/7-top-large-language-model-llm-use-cases-and-applications-how-ai-is-reshaping-industries/)
Loading…
Cancel
Save