Inspiration

Child abuse is happening right now, and a lot of it goes unreported. The child is often scared, ashamed, or manipulated by the adult into believing the relationship is kind and their own choice. By the time a child does tell someone, they are often already distressed and in danger. That made me ask two questions. What can help a child who is already a victim? And what can help a child before it gets that far, while the chat is still going on and the warning signs are small?

Safe Space is my answer to both. It supports children who are being groomed or blackmailed, and it shows early warning signs so a child knows when to be careful.

What it does

A child, a sibling or friend, or a parent opens the app and picks who they are. They paste a chat or describe what happened. The app names the warning signs in plain words, rates the risk, and gives small steps the person can actually take. If the situation is blackmail, it switches to a separate rescue flow where the child never has to upload or describe the image, and can skip saying whether they sent one.

The safety box updates with every new message, so a child can paste a conversation with a stranger while it's still happening and see the warning signs as they appear.

Who it's for and impact

Users: children and teens in India who feel something is off in a chat or with an adult, and the siblings, friends and parents who notice something is wrong.

Impact:

  • A child can spot warning signs early, while a chat is still happening, before it turns into pressure or blackmail.
  • A child who is already a victim gets calm, non-blaming steps and real contacts (Childline 1098, police 112, cyber helpline 1930), not just "tell your parents".
  • Siblings and parents get guidance on how to support the child without making things worse.
  • It works in English and Hinglish, so it fits how many children in India actually write.
  • The warning-sign tags and rules work anywhere. Only the language and helpline numbers need to change for another country.

    What I learned

  • Researching this changed how I think about it. The situation is deeper and more common than I expected, and it is rarely as obvious as people assume. The most dangerous cases start with compliments and attention, not threats.

  • Empathy has to be built into the design. A child who feels judged stops talking. Small wording choices matter, like "this is a pattern that can be a warning sign" instead of "this is abuse", and never asking "why did you send it?".

  • "Go tell your parents" is not enough advice. Many children won't, so the tool offers a ladder of people: a sibling, an aunt or uncle, a school counselor, Childline, the police.

  • A generic chatbot is not good enough for this topic. It needs rules, boundaries and tested wording.

How I built it

Safe Space is a Streamlit app using the Gemini API. It has three parts:

  1. Tagger. An LLM reads each new message and tags warning signs from a list of 24, such as secrecy, hiding things from parents, returning to a topic the child already refused, guilt pressure, gifts, photo requests, fake peer identities and blackmail. It works in English and Hinglish.
  2. Rule layer. Plain Python code in rules.py sets the risk level (LOW, CONCERNING or HIGH). The LLM never decides the level. The rules consider the age gap, whether the person is a teacher or other authority figure, repeated pressure after the child said no, and how many different warning signs have appeared. The level never goes down within a session.
  3. Reply. A second LLM call writes the answer using a safety guide I wrote, plus the mode, the current level and the warning signs found so far. The tone changes with the level: gentle and curious for CONCERNING, calm and direct for HIGH.

To test it, I wrote five fictional chats covering different paths: a gaming-app "boyfriend", a photo request on Instagram, an adult posing as a teenage girl who then blackmails a boy, a teacher with subtle extra attention, and a man who retreats and then comes back to a topic she declined.

Challenges

  • Getting the replies right. I tested the app, read the replies, and refined the prompts many times. Early replies were generic, too long or preachy. I kept adjusting the system prompt, the talking rules and the fear scripts until the answers were actually useful and compared them against what a generic chatbot would say.
  • Avoiding false alarms. Normal things like a coach's feedback or a surprise party secret can look like warning signs. I had to teach the tagger to flag only what is clearly there, and that took several rounds of testing.
  • Technical errors. Parsing the tagger output, model errors, empty replies and session state kept causing problems. The app now falls back safely: if the tagger fails it assumes no tags, and if the API fails it shows a message with Childline 1098 and the police number.

Things I'm proud of

  • The risk level comes from rules you can read and audit, not from the AI's opinion.
  • The warning-sign box is plain English and adapts after every message. A real child could get early signs before becoming a victim.
  • Fear scripts for the real objections: "I like him", "my mom will take my phone", "he'll lower my marks", "no one will believe me".
  • Separate advice for siblings (support first, don't rush to parents who might blame them) and for parents (start with "You're not in trouble. You were manipulated. I'm on your side.").
  • The Blackmail Rescue flow is built to avoid making things worse. The child never has to upload the image or describe it, and doesn't have to say whether they sent one. "I'm not sure / don't want to say" is an option, and every answer leads to the same help.

Limits

Safe Space is an AI tool and not a replacement for a trusted person, a counselor or the police. The tagger can miss things or over-tag, and all the test chats are fictional. If a child is in danger, call 112.

Built With

Share this project:

Updates

Submission history