0% found this document useful (0 votes)
128 views3 pages

Vault of Codes Assignment 2 - 30960551

The document outlines a Week 2 assignment focused on prompt engineering, where students will craft and experiment with different types of prompts to analyze how variations influence AI responses. Additionally, it includes a Python assignment to build a basic calculator with error handling. There are also additional tasks involving advanced prompt engineering techniques and designing experiments with AI models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views3 pages

Vault of Codes Assignment 2 - 30960551

The document outlines a Week 2 assignment focused on prompt engineering, where students will craft and experiment with different types of prompts to analyze how variations influence AI responses. Additionally, it includes a Python assignment to build a basic calculator with error handling. There are also additional tasks involving advanced prompt engineering techniques and designing experiments with AI models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Week 2 Assignment for Prompt Engineering: "Exploring Prompt Variability"

Objective:

The goal of this assignment is to help you understand how different types of prompts can
influence the responses of AI models. You'll practice crafting effective prompts and
analyzing the outcomes.

Assignment: Craft and Experiment with Prompts

You will experiment with writing different types of prompts and analyze the variations in
responses to see how prompt structure, length, and wording affect results.

Steps:

1. Choose a Task:
o Select one task you want the AI model to perform. For example:
▪ Summarizing a news article.
▪ Generating a creative story.
▪ Answering a factual question.
▪ Providing advice or solutions to a problem.
2. Design 3 Different Prompts:
o Create three distinct prompts for the same task. Try to vary:
▪ Length (one concise, one medium, and one detailed prompt).
▪ Tone (e.g., formal vs. casual).
▪ Instructions (specific vs. open-ended).
o Example for the task "Generate a creative story":
1. Concise: "Tell me a short story about a robot."
2. Medium: "Write a story about a robot who tries to learn human
emotions."
3. Detailed: "Generate a detailed story about a futuristic robot living in a
world where robots are programmed not to feel, but this robot starts to
develop feelings and has to navigate a world where emotions are
forbidden."
3. Analyze Responses:
o For each prompt, analyze the responses generated by the AI.
▪ How does the length, tone, or clarity of your prompt affect the quality
or style of the response?
▪ Did a more detailed prompt generate a more elaborate response?
▪ Were there any surprises in how the model interpreted your
instructions?
4. Submit:
o Submit the three prompts you designed and the corresponding AI responses.
o Write a brief reflection (150-200 words) on how the changes in your prompt
design influenced the output. Discuss what worked well and what could be
improved.

Bonus (Optional):

• Create a challenging prompt that forces the AI model to think creatively or solve a
difficult problem (e.g., "Generate a mystery story with a plot twist").

Python Assignment: "Basic Calculator with Error Handling"

Objective:

Build a basic calculator that performs addition, subtraction, multiplication, and division
while handling potential errors like invalid inputs or division by zero. This will help you
practice functions, conditionals, error handling, and user input.

Requirements:

1. Calculator Functions:
o Implement four functions to handle the basic operations:
▪ Addition (add()).
▪ Subtraction (subtract()).
▪ Multiplication (multiply()).
▪ Division (divide()).
2. User Input:
o Ask the user to input:
▪ Two numbers.
▪ The operation they want to perform (+, -, *, /).
3. Error Handling:
o Handle invalid inputs (e.g., if the user inputs a string instead of a number).
o Handle division by zero by displaying an appropriate error message.
4. User Menu:
o Create a simple menu that allows the user to:
▪ Perform a calculation.
▪ Exit the program.

Bonus (Optional):

• Implement a power function (e.g., 2^3).


• Allow the user to perform multiple calculations without restarting the program.

Instructions:
• Submit your Python file as a .py file.
• Ensure the program gracefully handles errors and gives meaningful feedback to the
user.

Additional Tasks:
Task 1: Advanced Prompt Engineering Techniques
Research and Summarize in a ppt:
Explore advanced prompt engineering techniques such as zero-shot, few-shot, and chain-
of-thought prompting. Describe each technique and its applications.

Task 2: Design and Experiment


Prompt Design Experiment:
-Select an AI model available to you for experimentation (e.g., GPT-3.5 or newer versions,
if accessible).
-Design a set of prompts that illustrate zero-shot, few-shot, and chain-of-thought
techniques. Choose a complex topic or task for these prompts (e.g., solving a math
problem, explaining a scientific concept, or providing advice on a niche topic).
-Document the AI's responses to each prompt type and analyze the effectiveness and
limitations observed in each approach.\

Hint: Pay special attention to how the amount and type of information provided in each
prompt type affect the AI's performance on the given task.

You might also like