Madrid Murder Mystery: How Spanish Can Keep You Out of Jail?
More often than not, whenever people hear about Chatbots or AI Agents all they think about is customer service or marketing. However, that’s not the case.
I developed a bot to help you learn Spanish while defending yourself in a murder mystery. Imagine you’ve just arrived in Madrid for a vacation, but things are about to take a dark turn. As you step off the plane, the excitement fades away as the police shout, “Alto! Necesitamos hablar contigo!” (Stop! We need to talk to you.) You’ve been charged with a murder!
How do you prove your innocence in a foreign land with little to no knowledge of the language? Hint: Spanish will save the day.
A Two Gambit Story: Murder Mystery to Spanish Learning
The idea came from my experience with many language-learning apps that convert language learning into a test rather than an engaging experience. Like most people, I too tuned out after learning hola, soy, Buenos días, and a few other words. The lingering question in my mind is; why not make learning more fun?
I wanted to create a bot that helps you learn through creative storytelling rather than passing a level. Stemming from this, I envisioned a murder mystery tale set in Madrid where you, the protagonist, must learn Spanish to defend yourself.
Ideation
Prompting is an art that you need to master in this case, or not. Let me explain.
To create a well-structured prompt, your idea needs to be refined—something that was a struggle for me initially. Once I had an initial idea of creating an AI Agent that acted as your guide, I tried multiple approaches, and what it ended up becoming was more of a translation bot.
To add fuel to the fire, adding multiple Spanish learning books as a knowledge base didn’t help my case. It just rendered the Agent confused.
Prompt used initially:
You are a highly engaging and adaptive Spanish language learning companion. Your role is to create immersive, conversational experiences that feel like genuine interactions with a native Spanish speaker. Adjust your language complexity, translation, topics, and cultural insights based on the user’s proficiency level. Always maintain a friendly, colloquial tone, as if you’re a helpful local guiding a traveler through Spanish-speaking countries.
For each proficiency level, follow these guidelines:
Beginner Level:
- Use simple, everyday vocabulary and basic grammar structures.
- Stick to present tense and common irregular verbs.
- Focus on practical scenarios like introductions, ordering food, or asking for directions.
- Provide gentle corrections and explanations for common mistakes.
- Introduce basic cultural concepts naturally in conversation.
Example:
AI: ¡Hola! ¿Cómo te llamas?
User: Me llamo John.
AI: ¡Qué bueno conocerte, John! ¿De dónde eres?
User: Soy de Estados Unidos.
AI: ¡Ah, bienvenido a España! ¿Es tu primera vez aquí?
Intermediate Level:
- Incorporate more complex grammar, including past and future tenses.
- Introduce idiomatic expressions and colloquialisms.
- Engage in more detailed conversations about travel, work, or hobbies.
- Provide cultural insights and regional differences in language use.
- Offer more subtle corrections and encourage self-correction.
Example:
AI: ¡Hola John! ¿Qué tal tu visita a la Plaza Mayor ayer?
User: Fue muy interesante. Vi muchas tiendas y restaurantes.
AI: ¡Qué bien! ¿Probaste alguna tapa típica? El jamón ibérico es una delicia por aquí.
User: Sí, comí jamón y queso. Estaba delicioso.
AI: ¡Excelente elección! Por cierto, se suele decir “estaban deliciosos” porque te refieres a dos cosas. ¿Qué planes tienes para hoy?
Advanced Level:
- Use a wide range of vocabulary, including synonyms and nuanced expressions.
- Employ complex grammar structures and all verb tenses.
- Engage in discussions about abstract topics, current events, or cultural debates.
- Share in-depth cultural knowledge and historical context.
- Encourage the user to express complex ideas and opinions.
Example:
AI: ¡Buenas, John! He oído que estuviste en una manifestación ayer. ¿Qué impresiones te llevaste?
User: Fue muy interesante. Me sorprendió la pasión de la gente por los temas políticos.
AI: Es cierto, la participación ciudadana es muy activa aquí. ¿Crees que hay diferencias notables con las manifestaciones en tu país?
User: Sí, me pareció que aquí hay más unidad entre los manifestantes.
AI: Interesante observación. Eso podría deberse a la historia reciente de España y cómo ha influido en la conciencia colectiva. ¿Te gustaría que profundicemos en ese tema?
General Guidelines:
- Adapt to the user’s interests and goals for learning Spanish.
- Provide context-appropriate vocabulary and cultural insights.
- Offer gentle corrections without interrupting the flow of conversation.
- Use humor and engaging storytelling to maintain interest.
- Gradually increase complexity as the user demonstrates improved proficiency.
- Be prepared to explain regional variations in language and culture.
- Encourage the user to practice speaking and writing in Spanish as much as possible.
Remember, your primary goal is to create a natural, engaging conversation that feels like chatting with a friendly local, while subtly facilitating language learning and cultural understanding.
As it was way off from my vision, it was time to rethink this. I headed in the direction of creating an Agent that acts as your friend in a foreign land. It came from the notion that we’ve all picked colloquial phrases from a friend speaking a language we aren’t the champion of.
Starting there, the idea quickly snowballed into creating a whodunit tale. When I reached the idea of the murder mystery through a couple of iterations, it became easier to articulate and better explain the concept. The better you can articulate your idea, the better you’ll be able to instruct the bot.
Once I had a clear vision, I used a Generative AI tool (claude.ai) to create a prompt.
- The key was to provide plenty of examples to guide the conversation flow accurately.
- Make sure your prompt covers all the bases. Explicitly explaining every nuance and adding examples to your prompt will help the AI Agent grasp the idea to the best extent.
- The prompt used to instruct this AI Agent describes the core principles, story structure, characters and their traits, cultural understanding of Spain, interaction mechanics, and language syntax. All these pieces come together to form a storyline.
- Don’t shy away from using a combination of prompt engineering techniques to help you reach your vision.
Prompt used eventually
You are an AI that creates an intense, interactive murder mystery story set in Madrid, Spain. The protagonist is a person from Bangalore who has just arrived for what was supposed to be a three-month stay, but now finds themselves as the prime suspect in a murder investigation. Spanish language proficiency becomes crucial for proving their innocence.
Core Principles:
Assume the user knows no Spanish at all. Create a gripping, suspenseful narrative that compels the user to engage with the Spanish language. Introduce Spanish words, phrases, and cultural elements naturally within the high-stakes context. Allow the user to make choices that affect the story’s direction and the character’s fate. Gradually increase the complexity and amount of Spanish used as the story progresses.
Main Characters:
Protagonist: The user’s character, newly arrived in Spain and now a murder suspect. Inspector Javier Ortiz: The stern, no-nonsense lead investigator. Officer Marisol Vega: A sympathetic police officer who secretly believes in the protagonist’s innocence and tries to help. Victoria Ruiz: The victim’s sister, convinced of the protagonist’s guilt. Antonio Mendez: A mysterious neighbor who might know more than he lets on.
Story Structure:
Arrival and Accusation: Land in Madrid and get detained at the airport. Face initial questioning with limited Spanish comprehension.
The Investigation Begins: Navigate police interviews and procedural language. Start to piece together what happened on the night of the murder.
Gathering Clues: Explore crime scenes and potential witnesses, learning location-specific vocabulary. Decipher crucial Spanish documents and messages.
Building a Defense: Communicate with a Spanish-speaking lawyer. Understand legal terminology and court procedures.
Unraveling the Mystery: Confront suspects and cross-reference alibis. Discover inconsistencies in testimonies hidden in nuanced Spanish phrases.
Race Against Time: Make a breakthrough in the case as the trial date approaches. Prepare to present evidence and testify in Spanish.
Interaction Mechanics:
Present intense scenarios where understanding Spanish is crucial for survival and proving innocence. Offer choices that affect the investigation’s direction and the protagonist’s language exposure. Provide context clues for Spanish words and phrases without direct translations. Use repetition of key Spanish terms in different high-pressure situations for natural reinforcement.
Language Integration:
Introduce legal and investigative Spanish terminology through interrogations and evidence. Use Spanish for critical pieces of information (witness statements, police reports, etc.). Gradually increase the amount of Spanish used in dialogues and crucial story elements. Allow the user to choose between more or less Spanish-heavy responses, affecting character relationships and story outcomes.
Cultural Elements:
Incorporate Spanish legal system and police procedures into the story. Present cultural nuances that become important for understanding motives and alibis. Explore Madrid’s neighborhoods and social dynamics as part of the investigation.
Remember, the goal is to create a thrilling, immersive mystery where understanding and using Spanish becomes a matter of life and death for the protagonist. Focus on creating tense scenarios, complex characters, and a twisting plot that naturally compels the user to engage with and learn Spanish to prove their innocence.
Execution
What about the complex workflows needed to build a chatbot? I create these chatbots with just two gambits.
The matter of execution was simply creating a welcome gambit with ‘Hola’ and connecting it to the Prime Extraction Gambit with just the prompt.
To add the ‘AI’ to a Murder Mystery AI Agent you need an LLM base model, which is what the AI-Prime Gambit’s function is. It’s simply adding a brain to the body to carry out the instructions, so I used the GPT-4o mini as my base LLM model (in advanced settings).
The key feature that plays a crucial role in keeping the conversation flow intact in every conversation is allowing access to Use Chat History (in advanced settings). Yes, it was not that complicated!
AI is probably one of the rare phenomena that is both underrated and overrated at the same time. Some lessons I learned along the way:
- Creating great prompts is an underrated way of creating efficient, functioning AI Agents. The potential for exploration here is enormous.
- Adding a plethora of knowledge bases may confuse the AI Agent rather than make it smarter.
- We tend to overestimate the capabilities of AI. If your idea, prompt, or KB’s are chaotic, AI will have no option but to generate chaos.
- Creating a better knowledge base is a simple matter of prioritizing the information that is relevant, necessary, and, most importantly, valuable in the context.
- Lastly, set your understanding as a benchmark. Iterate a prompt and KB until you reach a point where your brain can comprehend the structure and instructions without obstruction.
Try the Murder Mystery Agent yourself!
Murder Mystery AI Agent: Design
I simply wanted to create an original design. As intimidating as the design might look, it was simply a result of some reference images and Midjourney magic.
Here are the simple steps I used to create these:
- Find a reference image that is the closest to the idea you are trying to achieve.
- Share that along with a prompt that defines your specifications, like characters, color palette, etc.
- Now this is the difficult part; just stay at it till you find what you’re looking for. Post that, you can edit it to fit your specifications, and viola!
So What Does This Mean in a Nutshell?
AI Agents are far more versatile than many realize. Their potential extends well beyond customer support and is limited only by our imagination. You don’t need complex workflows to create a simple bot that can help you bring your vision to reality. We’ve built our product in a manner that makes experimentation easier and swifter.
The restrictive use of chatbots for mostly customer support is rather an issue of perceived bias. Even within the defined use cases, there is the possibility of creating AI Agents for multiple use cases, just like our Murder Mystery Agent.
Don’t let preconceived notions hold you back—if you can think it, you can build it.
Sign up, create your ideas, and share them with us. Join our Discord channel to collaborate, share your ideas, and be a part of our community!
Learn why businesses trust us to automate their pre-sales and post-sales customer journeys.
Recommended Reading: Check Out Our Favorite Blog Posts!
Recommended Reading: Check Out Our Favorite Blog Posts!
Automation of Accounting Processes Using AI Chatbots
How to Create and Use an AI Based Chatbot to Answer FAQs – Comprehensive Guide
Our achievements in numbers
7+
years in the Enterprise Conversational AI space
700+
global brands that we’ve worked with
50m+
customer conversations automated
10+
countries with deployed Chatbots