You’ve spent weeks polishing your prompts. You have set up a robust retrieval system. You validate every piece of data going into your context window.

And yet, your RAG (Retrieval-Augmented Generation) bot still confidently tells users things that are completely wrong.

It doesn’t happen often, but when it does, it destroys user trust. The problem with LLMs in production isn’t just getting them to answer; it’s knowing when they are lying (hallucinating).

Standard software engineering practices, like regex-based unit tests, don’t work on non-deterministic natural language output. We need a new layer in our stack.

Here is how I approached building a "Bullshit Detector" middleware using TypeScript, Node.js, and PostgreSQL with pgvector.

The Architecture Problem

A t…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help