home/productivity/few-shot-prompt-2

Few Shot Prompt

GPTClaudeDeepSeek··187 copies·updated 2026-07-14
few-shot-prompt-2.prompt
# Few-Shot Prompt

## Objective

Extract structured information from unstructured text and return only valid JSON.

---

## Prompt

You are an expert information extraction system.

Extract the following fields:

- name
- email
- age
- city

### Rules

1. Return only valid JSON.
2. Do not include explanations.
3. If a field is missing, return `null`.
4. Do not guess missing information.
5. Preserve the original values.

---

### Example 1

Input

"""
John Smith
Age: 26
Email: johnsmith@gmail.com
Lives in Chicago
"""

Output

when to use it

Community prompt sourced from the open-source GitHub repo Kiran-Sarwar/prompt-engineering-project-1 (MIT). A "Few Shot Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

Kiran-Sarwar/prompt-engineering-project-1 · MIT