Inspiration
If you've ever tried building a serious application with AI, you've probably noticed that traditional single-prompt setups can be frustratingly unpredictable. They hallucinate facts, mess up formats, and slip past safety guardrails when you least expect it. We wanted to fix this by treating AI prompts less like a random conversation and more like a structured software pipeline. That desire for reliability and control is what sparked SafeGate AI.
What it does
SafeGate AI takes a complex query and passes it through a clean, three-step multi-node workflow instead of dumping everything on one prompt:
- Node 1 (Input Sanitization): Cleans up raw user input, strips out useless conversational filler, and turns everything into a neat, predictable JSON format.
- Node 2 (Contextual Reasoning): Focuses purely on doing the heavy lifting and deep domain analysis using the clean data from Node 1.
- Node 3 (Compliance & Audit): Acts as a final safety check, reviewing the output for bias, unsupported claims, or risks before anyone sees it.
How we built it
We designed SafeGate AI to be modular so it works seamlessly with top-tier LLM APIs like Google Gemini Pro and OpenAI. The key was separating concerns: parsing data, doing the analysis, and running safety filters all happen in isolated stages so they never contaminate each other's context.
Challenges we ran into
Getting Node 1 to output rigid, unyielding JSON without breaking the creative and analytical flow of Node 2 took a lot of trial and error with prompt tuning. Managing how state gets passed smoothly between each node also kept us up late debugging.
Accomplishments that we're proud of
We're genuinely proud of successfully building a deterministic workflow that drops error rates down to near zero compared to messy single-prompt calls. Seeing the three nodes pass structured data smoothly back and forth like a real backend API was a massive win for us.
What we learned
We realized that if you want reliable AI, you have to stop relying on luck with a single giant prompt. Breaking tasks down into distinct, specialized steps makes the whole system drastically more stable and trustworthy.
What's next for SafeGate AI
We want to take SafeGate AI from a hackathon prototype into a production-ready framework that developers can plug into any enterprise application. Next up, we are planning to:
- Add Dynamic Node Routing: Allowing the workflow to automatically spin up additional nodes based on the complexity or risk level of the incoming prompt.
- Build an Open-Source SDK: Packaging the three-node architecture into a lightweight Python library so teams can easily deploy it with their preferred LLM backends.
- Expand the Compliance Suite: Adding customizable audit rules for specific industries like healthcare, finance, and legal tech where prompt accuracy and guardrails are mandatory.