Skip to content

KingJayan/ais-coding-ai

Repository files navigation

ais coding ais

my first project(if you could call it that) that i've truly vibecoded initially meant to just be better than my ap csp practice create task turned into a monster

local/offline-ish chatbot with fake confidence but real python files (does more than expected and less than promised)

capabilities

  • math parsing
  • sympy solving (single var, multi var, systems)
  • intent/emotion detection
  • context-ref matching
  • does the cool ai math thing with words -> vectorization
  • topic extraction
  • follow-ups
  • looks stuff up on wikipedia when local brain is cooked

recent additions:

  • correction handling (no, i meant x)
  • pronoun/reference repair (can you explain that?)
  • light knowledge graph expansion
  • adaptive depth (simple vs deep)
  • strategy-based replies (direct, socratic, analogy, hints)
  • nonchalant style pass (less support bot, more chill)
  • no-key wikipedia fallback when local brain fails
  • solve-for-x -> solve-for-anything (x, y, a, systems, roots)

limitations

  • just about everything

more specifically:

  • not a real llm
  • not trained on your private brain notes
  • regex can and will occasionally do regex things
  • memory is short and selective, like me on precalc tests
  • confidence score != actual correctness
  • symbolic solving can get cursed-looking exact forms for some equations

project structure

  • chatbot.py: main loop + glue
  • intent.py: intent + entities + math parser
  • responses.py: reply gen + tone + strategy + graph use
  • memory.py: chat memory + profile-ish state + refs
  • knowledge.json: tiny local facts + concept graph
  • utils.py: typing effect + text/vector helpers

how it works (high level)

  1. user says something
  2. intent detector scores it (semantic + pattern + structure + state)
  3. entities are extracted (topic, expression, correction target, pronoun ref)
  4. memory stores both user and bot messages w/ vectors
  5. response generator picks a template, depth, tone, and strategy
  6. you get an answer that is sometimes surprisingly solid

quick start

cd chatbot-ollama
.venv\Scripts\python.exe chatbot.py

if you dont have the venv yet:

python -m venv .venv
.venv\Scripts\python.exe -m pip install sympy
.venv\Scripts\python.exe chatbot.py

to stop the venv:

deactivate

for mac/linux equivalent:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install sympy
python chatbot.py

dependencies

  • python 3.10+
  • sympy (symbolic solving)
  • standard library only for everything else (including wikipedia lookup)

example prompts

  • explain machine learning in simple terms
  • no, i meant artificial intelligence
  • can you explain that?
  • what is 12 mod 5
  • i'm stuck, give me a hint
  • explain python with an analogy
  • solve for a: a^2 - 5a + 6 = 0
  • solve for x and y: 2x + y = 5, x - y = 1
  • solve x^3 - 6x^2 + 11x - 6 = 0
  • who is alan turing (forces lookup path if local logic taps out)

known weird behavior

  • if input is vague enough, it asks for clarification (better than hallucinating ig)
  • sometimes it gets the right intent for the wrong reason
  • math handling is safe-ish and p strict
  • internet lookup depends on internet existing and wikipedia not being mad at your request
  • some symbolic answers are exact but unreadable unless you're into math masochism

future roadmap (if i keep maintaining)

  • better multi-step tracking
  • less brittle parsing
  • stronger topic graph + retrieval
  • cleaner tests so future me doesnt suffer
  • inequality solving and domain constraints (real-only, integer-only)
  • optional step-by-step algebra traces

why this exists

because building things is fun and overengineering random stuff is a hobby

contribution status

my bad decisions and several ai models tag-teaming the codebase

used:

  • gpt-5.4 for planning
  • deepseek-v3.1:671b for initial setup
  • combination of opus-4.6, gpt-5.3-codex, and gpt 5.4 for development

About

first time truly vibe coding, kinda mid ngl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages