explaingit

josephwoodall/uchi

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A Python library that stores facts in a trie structure instead of neural weights, so it recalls exactly what it learned with no hallucination and no forgetting, queryable via chat, REST API, or Python code.

Mindmap

mindmap
  root((uchi))
    How it works
      Prefix trie storage
      No neural weights
      Deterministic recall
    Interfaces
      Terminal chat TUI
      REST API
      Python SDK
    Capabilities
      Zero forgetting
      Constant lookup time
      Multi-modal input
    Bootstrapping
      Wikipedia facts
      Python stdlib patterns
      HuggingFace datasets
    Audience
      Researchers
      Developers
      Vibe coders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install uchi, stream a set of factual Q&A pairs into it, then query it to confirm it recalls every taught fact exactly.

USE CASE 2

Run the REST API locally and call it from another application to get deterministic, hallucination-free answers to questions drawn from a known knowledge base.

USE CASE 3

Pre-load a brain.uchi file with Wikipedia facts using the bootstrap scripts and distribute it alongside your application so users start with a working knowledge base.

What is it built with?

PythonFastAPIUvicornPyPI

How does it compare?

josephwoodall/uchia-bissell/unleash-liteabhiinnovates/whatsapp-hr-assistant
Stars111
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/54/53/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires pip install and a one-time bootstrap run that downloads Wikipedia data, optional extras like spaCy or HuggingFace datasets add setup time.

MIT license: use, copy, modify, and distribute freely for any purpose, including commercially, as long as you keep the copyright notice.

In plain English

Uchi is a Python library that learns from text and answers questions without using a neural network or a language model. Instead of the statistical weights that most AI systems rely on, it stores information in a structure called a prefix trie, which is closer to an indexed lookup table than to a trained model. When you ask it a question, it searches that structure and returns the most likely next words based on what it has seen before. The practical result of this design is that Uchi never forgets facts it has been taught. Because new information is added to the trie without touching existing entries, loading a thousand new facts does not erase the ones already stored. Benchmarks in the repository show that ten anchor facts remain perfectly recallable after one thousand unrelated facts are streamed in on top. Response time stays roughly constant as the knowledge base grows, because the lookup time depends on the depth of the query in the trie, not on the total number of facts stored. You interact with Uchi in three ways: a terminal chat interface you launch by typing uchi in your shell, a REST API you can run locally and call with standard HTTP requests, or a Python library you import directly into your own code. All three share the same brain file on disk, so anything you teach through one interface is available through the others. You can also run bootstrap scripts to pre-load Wikipedia facts, Python standard library patterns, or knowledge from public datasets before distributing your brain file to others. The repository describes Uchi as a deterministic sequence predictor. It claims zero hallucination because it only produces output from sequences it has actually seen. The trade-off is limited generalization: code completion scores are low on standard benchmarks because the system has not been pre-trained on large code corpora. The README is transparent about this, presenting the benchmarks alongside their limitations. Uchi is available as a Python package via pip and is MIT licensed. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using the uchi Python library, write a script that loads brain.uchi, streams in 50 geography Q&A pairs as user/assistant sequences, then queries each question and prints whether the answer matches.
Prompt 2
Show me how to start the uchi REST API with uvicorn, then send a POST request to /chat to ask it a question I pre-loaded, and a GET to /metrics to see how many records are stored.
Prompt 3
I want to use uchi as a deterministic FAQ bot. Write Python code that reads a CSV of question-answer pairs, streams them into an OmniRouter, saves the brain, then exposes a /chat endpoint.

Frequently asked questions

What is uchi?

A Python library that stores facts in a trie structure instead of neural weights, so it recalls exactly what it learned with no hallucination and no forgetting, queryable via chat, REST API, or Python code.

What language is uchi written in?

Mainly Python. The stack also includes Python, FastAPI, Uvicorn.

What license does uchi use?

MIT license: use, copy, modify, and distribute freely for any purpose, including commercially, as long as you keep the copyright notice.

How hard is uchi to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is uchi for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub josephwoodall on gitmyhub

Verify against the repo before relying on details.