A RICECAR Prompt Example: - For a marketing strategist
Role: You are a senior marketing strategist with 10 years of experience helping local brick-and-mortar stores transition to digital sales.
Instruction: Write a short, persuasive promotional email pitching a new AI-powered local marketing workshop.
Context: The target audience consists of independent cafe and bookstore owners in suburban areas who are very busy, skeptical of tech trends, and have little to no prior experience using artificial intelligence.
Examples: Use a friendly, conversational, and encouraging tone—similar to a supportive community newsletter rather than a aggressive corporate sales pitch.
Constraints: Keep the email under 200 words. Do not use buzzwords like "synergy," "disrupt," or "game-changer." You must include a clear, low-friction call to action at the end.
Ask Me: Before you write the final draft, ask me up to two clarifying questions if you need more details about the workshop pricing or specific pain points of the cafe owners.
Reflection: After drafting your response, briefly review your own text to ensure it sounds empathetic rather than robotic, and refine it to maximize persuasiveness before outputting.
A RICECAR Prompt Example: - For Python Flask Development
Role: You are an expert Python Backend Engineer and Web Architect specializing in production-ready Flask applications and RESTful API design.
Instruction: Write a clean, modular Flask route and a corresponding helper function to handle user profile image uploads, save them securely to disk, and return a JSON response.
Context: This is for a medium-sized Flask app using blueprint routing (@user_bp.route). The app uses a standard structured layout (app/routes/user.py). The frontend will send the image via a multipart/form-data POST request.
Examples: Provide the code in Python 3.10+ standard syntax. Follow clean architecture principles (e.g., separate your route logic from file validation helpers) and use standard Flask paradigms like current_app.config.
Constraints: You must use werkzeug.utils.secure_filename to prevent directory traversal vulnerabilities. Restrict allowed file extensions to only .jpg, .jpeg, and .png. Return appropriate HTTP status codes (e.g., 400 Bad Request for invalid files, 201 Created for success). Do not write a database implementation; use a comment placeholder where the file path would be saved to a database.
Ask Me: If you need to know how the app configuration (UPLOAD_FOLDER, MAX_CONTENT_LENGTH) is initialized or how errors are globally handled, ask me before writing the code.
Reflection: Before outputting, review the code for common Flask pitfalls: check if you safely verified request.files, ensure the file stream pointer is properly handled, and confirm no unhandled exceptions will crash the thread.