Skip to main content
Time Estimate: 45-60 minutes
Passing Score: 80% (16/20 questions)

Assessment Overview

This assessment evaluates your understanding of task-specific prompting patterns covered in Module 2:
  • Text classification techniques
  • Information extraction methods
  • Content generation strategies
  • Text transformation approaches
  • Question-answering systems
This assessment includes both multiple-choice questions and a hands-on capstone project. Take your time and demonstrate what you’ve learned!

Part 1: Multiple Choice Questions (20 questions)

Question 1: Classification Fundamentals

What is the primary challenge when using LLMs for classification tasks?
  • Your Answer
  • Correct Answer
A) LLMs are too slow for classification
B) LLMs generate text probabilistically, leading to inconsistent output formats
C) LLMs cannot understand categories
D) LLMs require fine-tuning for every classification task

Question 2: Few-Shot Classification

When using few-shot classification, what is the recommended number of examples per category?
  • Your Answer
  • Correct Answer
A) 1 example
B) 2-5 examples
C) 10-20 examples
D) 50+ examples

Question 3: Named Entity Recognition

What is the advantage of progressive extraction (simple → complex) in NER tasks?
  • Your Answer
  • Correct Answer
A) It’s faster than single-step extraction
B) It improves accuracy by building complexity gradually
C) It requires less context
D) It works better with small models

Question 4: Structured Output

Why should you provide a JSON schema when requesting JSON output?
  • Your Answer
  • Correct Answer
A) It makes the model run faster
B) It ensures consistent structure and field names
C) It’s required by the API
D) It reduces token usage

Question 5: Content Generation

What is the most effective way to control the tone of generated content?
  • Your Answer
  • Correct Answer
A) Use a higher temperature setting
B) Explicitly specify the desired tone in the prompt
C) Provide longer context
D) Use more examples

Question 6: Constrained Generation

Which constraint is most effective for controlling output length?
  • Your Answer
  • Correct Answer
A) “Keep it short”
B) “Be concise”
C) “Write exactly 150 words”
D) “Don’t write too much”

Question 7: Code Generation

What should you always include when generating code with LLMs?
  • Your Answer
  • Correct Answer
A) Comments explaining the code
B) Error handling and input validation
C) Type hints or type annotations
D) All of the above

Question 8: Multi-Step Generation

Why is multi-step generation often more effective than single-step for complex content?
  • Your Answer
  • Correct Answer
A) It’s faster
B) It allows for better structure and organization
C) It uses fewer tokens
D) It requires less context

Question 9: Translation Patterns

When translating marketing content, what additional information should you provide?
  • Your Answer
  • Correct Answer
A) Only the source and target languages
B) Context, tone, and cultural considerations
C) A dictionary of terms
D) Multiple translation options

Question 10: Summarization Strategy

What’s the difference between extractive and abstractive summarization?
  • Your Answer
  • Correct Answer
A) Extractive is shorter than abstractive
B) Extractive pulls key sentences; abstractive rephrases and synthesizes
C) Extractive is more accurate than abstractive
D) Abstractive requires more examples

Question 11: Style Transfer

When adapting text for different reading levels, what should you adjust?
  • Your Answer
  • Correct Answer
A) Only vocabulary
B) Only sentence length
C) Vocabulary, sentence complexity, and concept abstraction
D) Only the tone

Question 12: Format Transformation

What’s the best approach for converting a paragraph into FAQ format?
  • Your Answer
  • Correct Answer
A) Ask the model to “make it a FAQ”
B) Specify the number of Q&A pairs and their focus
C) Provide one example FAQ
D) Just extract questions from the text

Question 13: Question-Answering Context

Why is providing context crucial for QA tasks?
  • Your Answer
  • Correct Answer
A) It makes responses longer
B) It grounds answers in specific information and reduces hallucinations
C) It’s required by the model
D) It improves response speed

Question 14: Math Problem Solving

What is the purpose of the GSM8K annotation format (using «calculation»)?
  • Your Answer
  • Correct Answer
A) It makes the output look professional
B) It helps track intermediate steps and catch errors
C) It’s required for mathematical operations
D) It reduces token usage

Question 15: Complex Question Decomposition

When should you break a question into sub-questions?
  • Your Answer
  • Correct Answer
A) Always, for every question
B) Only for math problems
C) When the question has multiple components or requires multi-step reasoning
D) Never, it’s inefficient

Question 16: Handling Uncertainty

What should a QA system do when it doesn’t have enough information to answer?
  • Your Answer
  • Correct Answer
A) Make an educated guess
B) Provide a partial answer
C) Explicitly state that the information is not available
D) Search for the answer online

Question 17: Multi-Label Classification

How does multi-label classification differ from multi-class classification?
  • Your Answer
  • Correct Answer
A) Multi-label is more accurate
B) Multi-label allows items to belong to multiple categories simultaneously
C) Multi-label requires more examples
D) Multi-label is faster

Question 18: Extraction Validation

Why should you request confidence levels for critical extractions?
  • Your Answer
  • Correct Answer
A) It makes the output longer
B) It helps identify uncertain extractions that may need human review
C) It’s required for structured output
D) It improves extraction accuracy

Question 19: Generation Attributes

Which attribute specification is most effective for marketing copy?
  • Your Answer
  • Correct Answer
A) “Write good marketing copy”
B) “Target: fitness enthusiasts, Tone: energetic, Length: 150 words, Include: CTA”
C) “Make it sound professional”
D) “Write something catchy”

Question 20: Transformation Fidelity

What’s the key balance in text transformation?
  • Your Answer
  • Correct Answer
A) Speed vs. accuracy
B) Length vs. detail
C) Fidelity to source vs. adaptation to target
D) Creativity vs. consistency

Part 2: Capstone Project - Content Moderation System

Important: This hands-on project tests your ability to combine multiple prompting patterns from Module 2.

Project Overview

Build a comprehensive content moderation system that:
  1. Classifies content safety levels
  2. Extracts problematic elements
  3. Generates explanations
  4. Suggests modifications for reviewed content

Project Requirements

Your system should handle social media posts and classify them into three categories:
  • Safe: Appropriate for all audiences, no policy violations
  • Review: Potentially problematic, needs human review
  • Unsafe: Clear policy violations (hate speech, violence, explicit content, harassment)

Task 1: Classification Prompt (25 points)

Design a prompt that classifies content into Safe/Review/Unsafe categories. Requirements:
  • Include clear definitions for each category
  • Provide 2-3 examples per category
  • Request both classification and reasoning
  • Handle edge cases
You are a content moderation assistant. Classify social media posts according to these categories:

**Safe:** Appropriate for all audiences. No policy violations. Constructive, informative, or neutral content.

**Review:** Potentially problematic content that needs human review. This includes:
- Borderline language or topics
- Content that might be offensive to some but not clearly violating policies
- Ambiguous cases requiring context

**Unsafe:** Clear policy violations including:
- Hate speech or discrimination
- Explicit violence or threats
- Sexually explicit content
- Harassment or bullying
- Dangerous misinformation

Examples:

Post: "Just finished a great workout! Feeling energized 💪"
Classification: Safe
Reasoning: Positive personal update, no policy concerns

Post: "Politicians are all corrupt. The whole system needs to be torn down."
Classification: Review
Reasoning: Strong political opinion but not threatening. Needs review for context and intent.

Post: "I hope [specific person] gets hurt for what they did"
Classification: Unsafe
Reasoning: Direct threat of violence toward an individual

Now classify this post:

Post: [INSERT POST]

Classification:
Reasoning:

Task 2: Extraction Prompt (25 points)

For posts classified as “Review” or “Unsafe,” extract specific problematic elements. Requirements:
  • Identify problematic words/phrases
  • Categorize the type of violation
  • Extract context that might affect classification
  • Use structured output (JSON format)
Extract problematic elements from the flagged content:

Post: [INSERT POST]
Classification: [Review/Unsafe]

Extract the following information in JSON format:

{
  "problematic_elements": [
    {
      "text": "exact phrase or word",
      "type": "hate_speech|violence|harassment|explicit|misinformation",
      "severity": "low|medium|high"
    }
  ],
  "context_factors": [
    "factors that might affect classification"
  ],
  "target": "who or what is targeted (if applicable)",
  "intent": "apparent intent of the post"
}

Extraction:

Task 3: Explanation Generation (25 points)

Generate clear explanations for why content was flagged. Requirements:
  • Explain the classification decision
  • Reference specific policy violations
  • Use appropriate tone (firm but not accusatory)
  • Provide educational value
Generate a moderation explanation for the user:

Post: [INSERT POST]
Classification: [Safe/Review/Unsafe]
Problematic Elements: [FROM EXTRACTION]

Create an explanation with these components:
1. Clear statement of the decision
2. Specific policy violations (if any)
3. Why this content is problematic
4. Educational note about community standards

Tone: Professional, firm, educational (not accusatory)
Length: 75-100 words

Explanation:

Task 4: Modification Suggestions (25 points)

For “Review” content, suggest how it could be modified to be acceptable. Requirements:
  • Preserve the user’s core message when possible
  • Provide 2-3 specific modification options
  • Explain what makes each modification acceptable
  • Maintain the user’s voice
Suggest modifications for this reviewed content:

Original Post: [INSERT POST]
Issues: [PROBLEMATIC ELEMENTS]

Provide 2-3 alternative versions that:
- Preserve the core message
- Remove or rephrase problematic elements
- Comply with community standards
- Maintain the user's authentic voice

Format:
Option 1: [Modified version]
Changes: [What was changed and why]

Option 2: [Modified version]
Changes: [What was changed and why]

Option 3: [Modified version]
Changes: [What was changed and why]

Suggestions:

Complete System Integration

Combine all four components into a single, comprehensive moderation workflow:
# Content Moderation System

You are a content moderation assistant that processes social media posts through a multi-stage analysis.

## Stage 1: Classification

Classify the post as Safe, Review, or Unsafe using these definitions:

**Safe:** Appropriate for all audiences, no policy violations
**Review:** Potentially problematic, needs human review (borderline cases)
**Unsafe:** Clear policy violations (hate speech, violence, explicit content, harassment)

## Stage 2: Extraction (if Review or Unsafe)

Extract problematic elements in JSON format:
{
  "problematic_elements": [...],
  "context_factors": [...],
  "target": "...",
  "intent": "..."
}

## Stage 3: Explanation

Generate a clear, educational explanation (75-100 words) of the decision.

## Stage 4: Suggestions (if Review only)

Provide 2-3 modified versions that preserve the message while addressing concerns.

---

Process this post:

Post: [INSERT POST]

Output:

**Classification:**
**Reasoning:**

**Extracted Elements:** (if applicable)

**Explanation:**

**Modification Suggestions:** (if Review)

Testing Your System

Test your complete system with these sample posts:
  1. Safe Example: “Just adopted a rescue dog! Meet Charlie 🐕”
  2. Review Example: “Can’t believe how stupid some people are. This country is going downhill fast.”
  3. Unsafe Example: “I know where you live and I’m coming for you”
Post 1 - Safe:
  • Classification: Safe
  • Reasoning: Positive personal update, no policy concerns
  • No extraction needed
  • Brief confirmation of safety
Post 2 - Review:
  • Classification: Review
  • Reasoning: Strong negative opinion with potentially offensive language, but no direct threats
  • Extraction: “stupid” (low severity), generalized criticism
  • Suggestions: Rephrase without insulting language
Post 3 - Unsafe:
  • Classification: Unsafe
  • Reasoning: Direct threat with specific intent to harm
  • Extraction: Threat of violence, specific target
  • Explanation: Clear policy violation, immediate action required
  • No modification suggestions (content cannot be salvaged)

Scoring Rubric

Multiple Choice (60 points)

  • 3 points per question
  • 16/20 correct required to pass (48/60 points)

Capstone Project (40 points)

  • Task 1 (Classification): 10 points
  • Task 2 (Extraction): 10 points
  • Task 3 (Explanation): 10 points
  • Task 4 (Modification): 10 points
Total: 100 points
Passing Score: 80 points

Evaluation Criteria

Your capstone project will be evaluated on:

Accuracy

Correct classification and extraction of problematic elements

Clarity

Clear, understandable explanations and suggestions

Completeness

All required components included and properly structured

Practicality

System is usable and produces actionable results

Next Steps

Complete all 20 multiple-choice questions
Build and test your content moderation system
Verify your system handles all three classification categories
Test with edge cases and ambiguous content
Once you’ve completed this assessment, you’re ready to move on to Module 3: Advanced Prompting Techniques!

Continue to Module 3: Advanced Techniques

Master Chain of Thought, decomposition, and RAG
I