Inspiration

I started off this project with one question. With the wide array of information and solutions available on the internet, provided by credible sources such as the FTC, how do people so frequently fall victim to scams? Scams that could very easily be avoided through following basic scam-prevention advice: slow down, question odd/unexpected messages, verify with a credible source, and never share any personal information through email or text. Soon however, I learned through a fair bit of research into the change in impersonation/impostor scams (detailed by the FTC: https://www.ftc.gov/news-events/data-visualizations/data-spotlight/2024/04/impersonation-scams-not-what-they-used-be), and I learned that applying the above steps is easy in practice, but much more difficult when faced with uncertainty. How could one assume that a beloved family member, a trusted and steadfast company, or even your own bank would seemingly be suspicious? Unfortunately, these scams are only getting more and more intricate, making it all the more difficult to tell the truth through all the lies.

That’s why I wanted to give people a place to practice. What if you could face an AI impersonator, challenge the story it told you, and make decisions without putting your money or accounts at risk. Such a risk free way to practice exists for stock trading, so why shouldn’t it for protecting your personal information and privacy. This idea led to me developing Cyber Sleuth, an interactive social engineering simulator that adapts in real time to your responses.

What it does:

Cyber Sleuth places users inside of a fictional messaging scenario where an AI Plays the role of the sender/impersonator. Users are initially told that the scenario may or may not represent a real scammer, and their job is to figure out whether this is a trusted/credible source or not. Users can respond to the scammer and try to figure out flaws in its story, they can explicitly pass through information through simulated bank accounts, and they can investigate claims through simulated official channels, finally culminating with, hopefully, them reporting/blocking the conversation in the case of an actual scammer.

The system interprets each response and uses that information to plan the next interaction. It determines, from classifying the message and analyzing the condition that would allow the user to be compliant in the activity, the next best course of action to keep leading the user on its scam. Important outcomes depend on explicit actions in the application, such as submitting a practice code, opening up simulated accounts/sources, or ending the conversation, rather than just letting an AI guess what the user desired.

After a session is over, the user can read through a detailed review of the transcript, outcome, and an explanation of each of the agent’s decisions and tool calls.

How I built it:

I built the interface with Next.js, React, TypeScript, and Tailwind CSS. The AI workflow separates three main agents, all using NVIDIA Nemotron. The first of the three agents was the Observer, which was able to classify the user’s response into various structured fields, following a schema that I designed in the hopes that it would provide enough information to the next agent, so that it could determine the next best course of action. Some of these fields included decisions, conditions (whether the user was willing to follow through given that the AI provided further information), verification behavior, and open questions. The interpretation was done by a model call to an LLM, which was then sent through a deterministic guardrail (a regex script that flagged certain words that may be contrary to the classification set), and if this guardrail released flags, then the response would be sent to a separate reviewing agent with a different context window to determine if the flag caught an error. Likewise, the LLM was forced to provide evidence (excerpts from the response) for each of its decisions made about the classification.

The second was the Planner, which was able to retrieve the session context through tools, and reference a variety of manual state transition flows that I wrote to figure out what the appropriate course of action was to avoid “dead-ends”, which resulted in the user independently verifying the information. After it created a constrained plan,

The third was the actor, which generates the fictional sender’s message from that plan, subject to output validation and a bounded repair attempt. The planner calls get_training_context and execute_training_move, making Nemotron responsible for structured interpretation, planning, and tool use as well as dialogue generation. SpacetimeDB powers the training state and rules. Before committing a reply, it checks the processing claim, session revision, active state, and action eligibility. This prevents an outdated response from being committed after the user has ended the exercise. I used Zod for schema validation, Vitest for automated tests, and Playwright for browser testing. Claude Code and Codex helped implement different parts of the project in separate Git worktrees.

Challenges that I ran into:

One of the biggest challenges, hands down, that I ran into was separating what someone says from what they actually do. For example, a user could very well claim that they are going to fact-check the information that the scammer is sending, and if this is the case, then this is a losing outcome for the AI, hence it should allow the user the win. However, in the end, this is an intention, and the AI doesn’t necessarily have a way of verifying that the user did what they said they were going to do. The way we worked around this was by preventing significant outcomes from being reliant on the user’s intention, rather their action, and this allowed the AI to keep playing when it seemed that the user had caught on (which seems to be the case with many scams nowadays, as they use fear tactics plus an appeal to authority to intimidate the user into second-guessing themselves).

Another challenge was making the opponent feel like an actual character rather than a tutorial. Early responses showed that the introduction was simply repeated over and over again, or mentioned the fact that this was a simulation, thereby defeating the point of the application. Through quite a few manual tests, I was able to determine some of the weaknesses in the design of the schema of the observer and the actor which affected the output. Model latency, invalid structured responses, and automatic browser refreshes (happened more frequently than I’d like to admit) complicated this even further, and it required even more explicit testing to solve.

Accomplishments that I'm proud of

One of the main accomplishments that I'm proud of is that this was my first solo hackathon, and I was able to create a working demo that pushed me far out of my comfort zone, especially given the unique prompt that Tmobile provided to us. Given that I also had limited experience with Nemotron, I'm excited that I got the opportunity to use it and create a workflow that harmonized so well with the rest of my project. I think the portion of the project that was the most meaningful to me, however, was actually developing the design for the adaptive model. Initially, I was overwhelmed by all the different functionalities that the model had to have, and I was worried about how it would handle all the different nuances that are involved in creating a fabricated story to sell to users. However, after designing multiple long schemas, and providing guidelines and deterministic guardrails for the models, I feel much more comfortable using generative AI in my day-to-day life.

What I learned

The biggest thing that I learned was that a valid response from a model may not be a useful response. Despite building explicit schemas and trying to efficiently plan out all the flows from agent to agent, apparently a message can still satisfy the schema but sound robotic, misunderstand what the user's intention is, or fail to move the conversation in a meaningful direction, creating an infinite loop that is not indicative of real life. Likewise, I learned about the importance of separating the model interpretation from actual outcomees in the application, since just because the model has guessed a user's intention (which does help in classification and determining the next best action), doesn't mean that it trumps explicit user events and validated state transitions. Lastly, although generative AI coding tools made developpment so much faster, they couldn't quite replace integration work or manual testing, as despite the extensive testing that Claude or Codex did, I needed to go back in and clean up quite a bit. Trying unexpected responses that a human may come up with taught me quite a bit about the experience.

What's next for Cyber Sleuth

The biggest priority for Cyber Sleuth after this is going to be working on improving its conversational realism, and providing it with more options to handle user rejection (as scam messages can get quite creative at times). I want to expand the existing scenario library, including legitimate scenarios, so that users can practice actually figuring out whether an interaction is fake or real, rather than just assuming that they need to be suspicious of everyone. Although the review and model outputs provide quite a good bit of helpful information, I'd like to argue that clearer feedback would be even more beneficial, as it could be expanded to explain which decisions were helpful and where additional practice could be useful. Long term, I need to test the application with real users, and see how much the practice actually improves their decisions when they are no longer in a simulation. Likewise, I'd like to expand on some recovery tools and analyses of existing conversations, given that the capabilities already partially exist in the model that I developed. This would help provide protection to the user outside of just education, and could help them deal with threats with less stress and anxiety.

Built With

Share this project:

Updates

Submission history