Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prompt Engineering Project 1

A beginner-friendly Prompt Engineering project focused on extracting structured information from unstructured text using Zero-Shot and Few-Shot Prompting techniques.

This project was completed as part of the DecodeLabs Prompt Engineering Training.


📌 Project Objective

The goal of this project is to design prompts that extract specific information from messy text and return the result as valid JSON.

The extracted fields are:

  • Name
  • Email
  • Age
  • City

🚀 Features

  • Zero-Shot Prompt
  • Few-Shot Prompt
  • Structured JSON Output
  • Delimiter Usage
  • Example Inputs
  • Expected Outputs
  • Prompt Comparison

📂 Project Structure

prompt-engineering-project-1
│
├── prompts
│   ├── zero_shot_prompt.md
│   └── few_shot_prompt.md
│
├── examples
│   ├── sample_inputs.md
│   ├── sample_outputs.json
│   └── test_cases.md
│
├── evaluation
│   └── comparison.md
│
├── screenshots
│
├── README.md
├── LICENSE
└── .gitignore

🛠 Technologies Used

  • Prompt Engineering
  • Markdown
  • JSON
  • Git
  • GitHub

📖 Prompting Techniques

Zero-Shot Prompting

The model receives only instructions to complete the task.

Few-Shot Prompting

The model receives instructions along with examples to improve consistency and output quality.


📊 Example

Input

John Smith

Age: 25

Email: johnsmith@gmail.com

Chicago

Output

{
  "name": "John Smith",
  "email": "johnsmith@gmail.com",
  "age": 25,
  "city": "Chicago"
}

📈 Results

Both prompts successfully extracted the required information from the provided sample inputs.

For simple inputs, Zero-Shot and Few-Shot prompts produced identical outputs. Few-Shot prompting is generally more effective for complex or ambiguous inputs because it provides examples for the model to follow.


👩‍💻 Author

Kiran Sarwar

Software Engineering Student | Aspiring AI Engineer

GitHub: https://github.com/Kiran-Sarwar

About

Zero-Shot and Few-Shot Prompt Engineering for Structured JSON Data Extraction.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors