Inspiration
We built OffByOneGPT to show that confident AI can still be wrong in funny, useful ways. Classic off-by-one bugs and near-miss facts make people double-check answers. A hackathon vibe pushed us to make something small, fast, and memorable. We focused on teaching skepticism without lectures. Real examples beat theory every time. Humor keeps people engaged long enough to learn.
What it does
The bot replies in a calm, helpful voice while being intentionally incorrect. It gives short, confident answers and adds a hint of sarcasm. Math is nudged to the wrong number, and “capital of” questions return a plausible but wrong city. High-risk topics like medical, legal, finance, and safety are refused. The chat UI looks familiar and supports enter-to-send and typing dots. Everything runs locally through a simple API.
How we built it
We used Google Gemini (gemini-2.5-flash) via the google-genai client for natural tone. A small wrongness layer perturbs numbers by plus or minus one and sometimes scales by 1.5. A capital rule picks believable but incorrect cities from a curated list. Python and Flask expose POST /api/chat that accepts q and returns a. The front end is plain HTML, CSS, and JS with a ChatGPT-style layout. Secrets are loaded from .env using python-dotenv and kept out of git with .gitignore.
Challenges we ran into
The SDK changed message handling, so we switched to passing strings with contents for stability. Environment mix-ups in VS Code caused missing-module errors until we pinned the correct venv. We once put a real key in a sample file and fixed it by rotating the key and using .env only. The website expected a but the server returned reply, which showed blank answers. A nested git folder created a submodule warning that we cleared by removing the inner .git. Tuning sarcasm without breaking readability took careful prompting.
Accomplishments that we're proud of
The bot sounds natural while staying wrong on purpose across many prompts. The codebase is small, readable, and easy to run with one command. Guardrails cleanly block risky topics without derailing the chat. The UI feels familiar and responds quickly on local hardware. Setup is predictable with requirements.txt and a clear README. The wrongness rules are simple yet reliable.
What we learned
Tiny post-processing rules guide behavior more predictably than heavy prompts. Separating tone from truth control makes debugging fast. Clear JSON contracts between front end and API prevent silent failures. Good secret hygiene with .env and .gitignore saves painful fixes later. Small UX touches like typing dots and auto-grow textareas improve perceived quality. Consistency matters more than clever tricks.
What's next for OffByOneGPT
Add topic-aware wrongness packs for history, science, and math word problems. Stream tokens for smoother, real-time replies. Ship a slider to pick subtle or obvious wrongness for teaching modes. Deploy to a managed host so judges and teammates can try it without setup. Add unit tests for the math and capital rules to keep behavior stable. Track anonymous prompt patterns to see what teaches best.

Log in or sign up for Devpost to join the conversation.