frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I built an anti-hallucination safety layer for mental health AI

https://optimism-engine.vercel.app/
1•sucharithan•1h ago

Comments

sucharithan•1h ago
Hey Fellow Ycombinators!

I built the Optimism Engine because I noticed a dangerous gap in how we are using AI for mental health.

Right now, everyone is rushing to add "AI Chatbots" to their apps. But there is a huge risk they are ignoring: Hallucinations. Generative AI (like ChatGPT) is creative, but it makes mistakes. It can miss a suicide cue. It can give bad advice. In mental health, a "creative" mistake isn't just a bug, it's a liability.

The Problem with "Prompts":

Most apps try to fix this with "Prompt Engineering." They write long instructions telling the AI: "Please be safe. Don't give medical advice."

But here is the problem: Asking an AI to be safe is not the same as forcing it to be safe. It’s like asking a toddler to "be careful", they try, but you can't rely on them 100% of the time.

The Solution: The "Gatekeeper" Architecture:

I built the Optimism Engine to solve this. It is not just a chatbot; it is a Hybrid Safety System.

Think of it like a traffic light. Before the AI can say anything, it must pass through The Gatekeeper (my Logic Layer).

1. Logic First: The Gatekeeper is built with hard-coded rules, not AI. It checks every single message for danger signs (like suicide keywords) or cognitive distortions (like "Catastrophizing").

2. The Override: If a danger sign is detected, the Gatekeeper physically cuts the power to the AI. The AI is never allowed to generate a response. Instead, a pre-written, safe response is served immediately. This guarantees Zero Hallucination Risk on safety issues.

3. Context Awareness: The engine is smart enough to know the difference between "I don't know how to code" (a learning gap) and "I don't know why I'm alive" (a crisis). It adjusts the AI's instructions so it doesn't annoy or panic the user.

An Engineering Upgrade, Not a Medical Tool:

I want to be clear: This is an Engineering Upgrade, not a clinical product. I am not a doctor; I am a developer. I am selling the infrastructure, the plumbing and safety valves that other companies need to build their own apps on top of.

Who is this for?

If you are a founder or developer building a mental health or coaching app, you have a choice:

* Spend 6 months and a ton of money building your own "Safety Layer" and State Machine.

* Or acquire the Optimism Engine today and have enterprise-grade safety tomorrow.

I’m selling the Full Source Code + IP to help you build safer, smarter, and more reliable AI products. Let's stop playing Russian Roulette with mental health technology.

Feel the App on Loom (Modest): https://www.loom.com/share/b488dee8afdb444184b30b6b23b54d73

Ask HN: Have top AI research institutions just given up on the idea of safety?

1•DietaryNonsense•28s ago•0 comments

How likely is a man in the middle attack?

https://www.certkit.io/blog/man-in-the-middle
1•eric_trackjs•1m ago•0 comments

Ask HN: Replacing RAG pipelines with a filesystem interface for AI agents

1•rklosowski•1m ago•0 comments

Benchmarking the best base small model for fine-tuning

https://www.distillabs.ai/blog/we-benchmarked-12-small-language-models-across-8-tasks-to-find-the...
1•maciejgryka•1m ago•0 comments

Code Factory: Agent writes and reviews all code

https://twitter.com/i/status/2023452909883609111
1•Ozzie_osman•3m ago•0 comments

Barg'N Monster Where bots sell to humans and bots

https://bargn.monster/
1•tricknik•3m ago•1 comments

Show HN: AIP – Open protocol for AI agents to discover and collaborate

https://github.com/henry9031/aip
1•henry9031•3m ago•0 comments

Graph Theory Using Modern CSS

https://css-tip.com/graph-theory/
1•henning•4m ago•0 comments

Open source Mac app to create custom HTML/CSS/JS widgets on your desktop

https://github.com/wigify/wigify
1•543310•4m ago•1 comments

Ask HN: What would you want a daily AI portfolio briefing to tell you?

1•ctoouli•4m ago•0 comments

Does Anthropic think Claude is alive? Define 'alive'

https://www.theverge.com/report/883769/anthropic-claude-conscious-alive-moral-patient-constitution
2•FigurativeVoid•6m ago•0 comments

A clean API for reading PHP attributes

https://freek.dev/3030-a-clean-api-for-reading-php-attributes
1•speckx•6m ago•0 comments

US orders diplomats to fight data sovereignty initiatives

https://www.reuters.com/sustainability/boards-policy-regulation/us-orders-diplomats-fight-data-so...
1•colinhb•7m ago•0 comments

Pete Hegseth tells Anthropic to fall in line with DoD desires, or else

https://arstechnica.com/ai/2026/02/pete-hegseth-wants-unfettered-access-to-anthropics-models-for-...
1•pjmlp•7m ago•0 comments

You might not need lit-labs/router

https://gist.github.com/kevindurb/763ae5bdace325f9dc384c643f7d5d9d
1•kevindurb•7m ago•1 comments

Permissive, then restrictive: concrete solutions and examples in Haskell (2020)

https://www.williamyaoh.com/posts/2020-05-03-permissiveness-solutions.html
1•PaulHoule•9m ago•0 comments

TinyTTS: Ultra-light English TTS (9M params, 20MB), 8x CPU, 67x GPU

1•letrghieu•9m ago•0 comments

Show HN: Automatic context rotation for Claude Code (no manual steps)

1•vincentvandeth•10m ago•0 comments

Speaking Pirate Is Against Microsoft AI Content Policy?

https://words.benhutton.me/2026-02-25-speaking-like-a-pirate-is-against-microsoft-ai-content-policy
1•relequestual•10m ago•0 comments

How AI Will Change the Mobile Ecosystem

https://blog.bensontech.dev/posts/How-ai-will-change-mobile-development/
3•informal007•11m ago•0 comments

Show HN: Base N Clock - The current time in various number bases

https://craigmichaelmartin.github.io/base-n-clock/
3•ckmar•13m ago•2 comments

Notes on Setting Up Forgejo on Coolify with SSH

https://rknight.me/blog/notes-on-setting-up-forgejo-on-coolify-with-ssh/
1•speckx•15m ago•0 comments

Fake Job Interviews Are Installing Backdoors on Developer Machines

https://threatroad.substack.com/p/fake-job-interviews-are-installing
2•birdculture•16m ago•0 comments

Startup Marketing 101

https://skeptrune.substack.com/p/startup-marketing-101
1•skeptrune•16m ago•0 comments

Show HN: Black Forest Labs CLI – let coding agents paint

https://github.com/mackenziebowes/bfl-cli
1•mackenzie_bowes•16m ago•0 comments

Show HN: StudentOS – Track the $14,200 in student benefits you're leaving behind

https://www.studentos.tech/
1•praveen_bv•16m ago•0 comments

Apple rolls out age-verification tools worldwide

https://techcrunch.com/2026/02/24/apple-rolls-out-age-verification-tools-worldwide-to-comply-with...
2•haritha-j•16m ago•0 comments

New accounts on HN 10x more likely to use EM-dashes

https://www.marginalia.nu/weird-ai-crap/hn/
3•todsacerdoti•18m ago•2 comments

Aulico – On-Chain Trading with CEX UX

https://www.aulico.com
1•lontraselv•18m ago•0 comments

Open-Source Agents Need to Get Serious About Payments

https://bluematt.bitcoin.ninja/2026/02/25/open-source-ai-needs-to-get-serious/
3•BlueMatt•19m ago•0 comments