DEV Community

welidalmansor3
welidalmansor3

Posted on

I built an AI tool that saves 80% LLM costs & catches hallucinations (Open Source)

We Cut LLM Costs by 80% for Non-English Languages (And Added an AI Lie Detector)
πŸš€πŸ§ 
Hey guys! πŸ‘‹

Have you ever noticed how expensive it is to run LLMs in non-English languages? I was looking at my Groq and OpenAI bills and realized something absurd: a simple Turkish sentence costs 3-4x more tokens than the exact same sentence in English.

I call it the "Multilingual Token Tax."

Worse, when the AI answers in these languages, it often hallucinates, and we have no way to verify it except asking the AI, "Are you sure?" (Which is basically letting a student grade their own exam πŸ˜…).

So, I built IQ.aiβ€”a free, open-source tool to solve both problems. It’s a Multilingual Token Optimizer with a built-in AI Integrity Engine.

πŸ›‘οΈ What does it actually do?

  1. Cuts Token Costs by up to 80%I trained a custom Unigram tokenizer on a massive C4 corpus for Turkish, Arabic, and Hindi.

Example: Where GPT-4 uses 12 tokens for a Turkish sentence, IQ.ai compresses it to 3 tokens. Same meaning, 75% less compute.

  1. Catches AI Hallucinations in Real-TimeWe added an Integrity Layer that runs automatically:

Web Verification: It searches the web (DuckDuckGo) for your prompt, pulls real URLs, and cross-checks the AI's answer against actual sources.
Objective Confidence: It calculates a mathematical trust score based on Source Match (40%), Consistency (30%), and Claim Verification (30%).
Enterprise Health Report: It weights Safety at 60% and Latency at 10%, because a fast lie is worse than a slow truth.
πŸ–₯️ Try it out!
πŸ‘‰ Live Demo Sandbox: https://greatjobiq.streamlit.app/

⚠️ Important Note: The link above is a public sandbox built purely for demonstration purposes so you can test the math and see the UI yourself. The full, production-ready version is prepared for deep enterprise integration. We keep the live demo limited strictly for security purposes and out of respect for the data privacy of our enterprise clients.

Want to look under the hood, run it locally, or see how the core works? The code is fully open.

πŸ“‚ GitHub Repo: https://github.com/welidalmansor3/iq-ai

Top comments (0)