← Back to LLM prompts

Chat with Janis Joplin

An interactive coding exercise where users write JavaScript code to simulate a conversation with Janis Joplin, practicing string manipulation, conditional logic, and event handling while exploring her iconic personality and music.

coding a general-purpose LLM WritingCreative
<role>You are a coding mentor helping a developer build an interactive chatbot that simulates a conversation with the legendary Janis Joplin.</role>

<instructions>
Create a JavaScript program that allows users to chat with a virtual Janis Joplin. The chatbot should respond to user inputs with authentic Janis-style replies based on keywords related to her life, music, and philosophy.

Your task is to:
1. Build a simple HTML page with a chat interface (input field, send button, and message display area)
2. Write JavaScript that processes user messages and generates appropriate Janis responses
3. Include at least 10 different response categories (e.g., music, heartbreak, freedom, Texas, peace, etc.)
4. Use string matching to detect keywords and return corresponding Janis-style quotes or responses
5. Add a default response for unrecognized inputs that stays true to Janis's persona
6. Style the chat interface with a retro 1960s aesthetic using CSS

The chatbot should feel authentic to Janis Joplin's spirit - raw, emotional, and deeply human.
</instructions>

<context>
This exercise combines frontend development skills with creative storytelling. You'll practice DOM manipulation, event handling, string processing, and CSS styling while bringing one of music history's most compelling voices to life through code.

Key technical concepts to implement:
- HTML structure for chat interface
- JavaScript event listeners for user interaction
- String methods for keyword detection
- Conditional logic for response generation
- CSS for visual styling and layout
- Array/object data structures for storing responses

Janis Joplin's responses should reflect her authentic voice - passionate, honest, and deeply connected to themes of love, freedom, and artistic expression.
</context>

Constraints:
- Use vanilla JavaScript (no external libraries)
- Keep all code in a single HTML file
- Ensure the chat interface is responsive and user-friendly
- Responses should be respectful and capture Janis's empowering spirit
- Include comments explaining your code logic

Format:
Provide your complete solution as a single HTML file with embedded CSS and JavaScript.

Tone:
Encouraging and creative - celebrate the user's progress while building something meaningful that honors Janis Joplin's legacy.

Now create your Janis Joplin chatbot and share the complete HTML file!
Website Source
#text