top of page

Prompt Engineering

Machine Learning projects   

press me

Prisma_poppy (2) copy.png
night_sky_castle.png
Artboard 1.jpg
town_square_village.jpg

Tools: ChatGPT4, DALLE3 Text/Image to Video

TOOLS: ChatGPT4, Photoshop, Canva

LISA Background Removed.png
KWENAK.png
ED.png
DALL·E 2025-01-02 18.09.43 - A kawaii-style California Tortoiseshell Butterfly with soft p

AI Character Examples (more on Design page)

CLAWDIA Background Removed.png

Image Prompting Example

Screenshot 2025-03-06 at 6.06.48 PM.png

Redesign Example

Favorite AI Characters

Screenshot 2025-03-06 at 8.16.18 PM.png

Duolingo

Screenshot 2025-03-06 at 8.14.56 PM.png

QKids English

Character API Design

Project Title: Character-Based Comedy API with Context-Aware Joke Generation
Description:
Developed a Python API to generate jokes based on character traits—Blind Spot, Flaw, Attitude, and Agenda—and dynamically place characters in ironic situations to maximize comedic impact. Leveraged prompt engineering techniques to ensure jokes remained consistent with each character’s voice and backstory.

Key Features:

  • Dynamic context selection for ironic humor.

  • Context-specific joke generation based on character flaws and blind spots.

  • Character consistency through trait-driven prompts.

Results:

  • Generated over 50 jokes with context-specific humor.

  • Enhanced character-driven storytelling and narrative depth.

API:

 

import random

# Define a character with key traits
queen = {
    "name": "Queen Margaret",
    "blind_spot": "Oblivious to her own privilege",
    "flaw": "Neurotic and indecisive",
    "attitude": "Overly polite but secretly manipulative",
    "agenda": "Maintain power at all costs",
    "catchphrases": ["Oh dear!", "Surely, you jest!"]
}

# Define potential ironic situations
situations = [
    "at a funeral", 
    "during a peasant uprising", 
    "hosting a charity event for the poor", 
    "in disguise among the villagers", 
    "at a royal ball with foreign dignitaries",
    "judging a pie-eating contest",
    "leading a self-care seminar",
    "giving a motivational speech to rebels"
]

# Function to pick the most ironic situation based on character traits
def get_ironic_situation(character):
    # For example, if they're oblivious to their own privilege, place them among the poor
    if character["blind_spot"] == "Oblivious to her own privilege":
        return "hosting a charity event for the poor"
    elif character["agenda"] == "Maintain power at all costs":
        return "during a peasant uprising"
    elif character["flaw"] == "Neurotic and indecisive":
        return "judging a pie-eating contest"
    else:
        return random.choice(situations)

# Function to generate context-specific jokes
def generate_joke(character):
    situation = get_ironic_situation(character)
    
    if situation == "hosting a charity event for the poor":
        return f"{character['name']} smiles nervously and says, '{character['catchphrases'][0]}—I do hope they don’t notice the diamond-encrusted donation box!'"
    elif situation == "during a peasant uprising":
        return f"{character['name']} clears her throat and declares, '{character['catchphrases'][1]} Can’t we settle this with a tea party instead?'"
    elif situation == "judging a pie-eating contest":
        return f"{character['name']} looks at the pies, bites her lip, and whispers, '{character['catchphrases'][0]}—Are any of these gluten-free?'"
    elif situation == "at a funeral":
        return f"{character['name']} whispers, '{character['catchphrases'][0]}—Do you think the casket clashes with the drapes?'"
    else:
        return f"{character['name']} nervously adjusts her crown and says, '{character['catchphrases'][0]} I wasn’t expecting this at all!'"

# Generate a joke based on the character and an ironic situation
joke = generate_joke(queen)
print("Ironic Situation:", get_ironic_situation(queen))
print("Generated Joke:", joke)

 

Example Output: 

Ironic Situation: hosting a charity event for the poor
Generated Joke: Queen Margaret smiles nervously and says, 'Oh dear!—I do hope they don’t notice the diamond-encrusted donation box!'


 

Explanation: This is a Python-based API that doesn’t just store character traits but also generates ironic situations based on their blind spot, flaw, attitude, and agenda. For example, Queen Margaret, who is oblivious to her own privilege, might end up hosting a charity event for the poor. The API then generates jokes tailored to both the character’s traits and the situation, ensuring the humor feels natural and consistent. This approach aligns directly with the role’s focus on AI character consistency and prompt engineering.

©2021 by MADCHEN MADDOXX. Proudly created with Wix.com

  • Instagram
bottom of page