AI & ML Engineering

Mimo

I built Mimo to answer a preference question after the preference changes, without losing when the earlier statement applied. I stored original messages locally and made person, conversation, scope and valid time part of the answer.

Preference and sourceExplore the interface ↘
Project
Source-linked, temporal memory for changing preferences
My role
I built the local memory model, temporal resolution, three-method comparison and query interface.
Year
2026
Contents

Remembering a preference after it changes

I built Mimo to answer a small memory question with its original evidence: how many sugars does a person take in their coffee, now or at an earlier point? The difficult part is the change. An older message can remain an excellent textual match after a correction makes its value obsolete.

I used a local Python application and SQLite to work through that behavior explicitly. Coffee sugar count gave me a narrow domain in which I could inspect corrections, weekend preferences and conflicting statements without hiding extraction errors inside a broad conversation task. I wanted an answer that retained the source message and could explain which time interval made that source applicable.

Walking through a correction in time

In a separate diagnostic, I used a timeline with value one on January 1 and January 2, followed by a correction to zero on January 3. A friend's message on January 4 advances the conversation's latest timestamp. Asking for the current preference should therefore use the corrected value, even though an older statement may resemble the question more closely.

Lexical retrieval returned the obsolete value one from r1. Temporal retrieval returned zero from r9. I kept this example separate from the canonical benchmark because it explains a specific failure without changing that benchmark's scores. Asking at an earlier cutoff also has a legitimate answer: a later correction should never rewrite what the system knew before it arrived.

A creature keeping coffee preferences from different times on folded paper
I kept the changed preference and its earlier evidence on the same folded strip.

Adding evidence and asking beside it

I split the Streamlit screen into an evidence form and a query form. The first records message ID, conversation, person, timestamp and assertion. The second asks for conversation and person again, plus a cutoff and default or weekend scope. Keeping those fields visible makes the conditions behind an answer inspectable.

The result includes structured answer data and the original stored messages. An expandable timeline shows how derived facts occupy time intervals. Backend selection sits in the sidebar; choosing the optional encoder exposes its local directory and receipt. Fixture replay can initialize the store, while manual messages remain personal runtime state. The measured evaluation uses a separate fixture-only store, so trying an example in the interface does not change its benchmark population.

Application screens

1 / 3
Preference and source

I put the original message and valid-time evidence beside the returned preference.

Open full-size image

Giving the experiment a deliberately small language

I generated 100 messages and 100 questions across twenty conversations. Conversation and person identities stay separate across twelve training, four validation and four test groups. The extractor recognizes four controlled coffee assertions and four query patterns. The fixture reuses five assertion and five question templates, including unsupported material, across its scenarios.

That repetition makes the experiment useful for checking declared behavior, but leaves unfamiliar wording as a separate question. I fit lexical preprocessing on the sixty training messages only. Messages from held-out conversations are still available as inference evidence: a memory system needs the history it is asked about. Expected answers stay outside retrieval and enter only when I score the saved predictions.

Keeping original messages and derived facts apart

I store original messages as evidence and derive facts from them. Each fact belongs to a conversation, person, predicate and scope. Its validity begins at the assertion time and ends when a later correction supersedes it. I use half-open intervals, so the new value applies exactly when the correction starts, without an ambiguous instant shared by two consecutive values.

Timestamp validation normalizes values to UTC. Structured person, scope and cutoff fields are authoritative; question wording does not silently change them. If the cutoff is blank, I use the latest message in the requested conversation, including unsupported messages. The CLI and interface call the same core functions, keeping those rules consistent across both ways of using the application.

Measuring what text similarity can retrieve

My lexical baseline uses TF-IDF, a representation that weights words or character fragments according to their frequency. I average word and character cosine similarity, which compares the direction of those representations, to rank eligible messages. Saved vocabulary and weights are fitted on training text and remain frozen during prediction.

The baseline already excludes other conversations, other people and future sources. It deliberately lacks active-interval resolution, allowing me to examine what similarity alone misses after a correction. Validation selected its abstention threshold before test scoring. Keeping these shared guards matters when interpreting the comparison: a difference between methods should come from their treatment of applicable evidence, not accidental access to another person's history.

Resolving applicable evidence before answering

The temporal method selects facts whose intervals contain the requested cutoff. A weekend question uses an applicable weekend preference when one exists; otherwise it falls back to the default. A default question excludes weekend facts. Repeating the same value can add corroborating sources without making them visible before their own timestamps.

I preserve incompatible statements at the same valid time as a conflict with both sources. File order cannot choose which one wins. A later correction can close that state through the same interval rules. Answers therefore have distinct answered, unknown and conflict states. That distinction lets the interface show missing evidence and contradictory evidence accurately, while retaining the original message IDs behind each result.

Adding an encoder with a bounded responsibility

I added an optional pinned CPU sentence encoder after temporal selection. It turns text into numerical vectors and uses cosine similarity to order every applicable source. Loading uses an explicitly located, verified local model. The runtime reuses model instances and computes text vectors for each request.

I gave the encoder a specific job: evidence ordering. It cannot discard a contradictory value to force a single answer, and the policy has neither a similarity threshold nor top-k truncation. Score order appears in the retrieval trace, while final source IDs form a stable set. Missing model files or dependencies produce a named backend error, so selecting this method cannot quietly execute another one.

Understanding why three methods tied

The retained test has twenty questions: sixteen answerable and four unsupported. Lexical, temporal and embedding methods each returned the correct status, value and exact source set on all twenty. The four changed-key questions produced zero stale answers in each method. There were no canonical conflict examples, so conflict precision and recall have no denominator in this run.

Looking at the candidates explains the tie. After interval selection, each of the sixteen answerable questions has exactly one applicable fact. The encoder has nothing to reorder that could improve the answer. The unsupported questions exit through the grammar before encoding. This known-fixture integration run checks execution and contracts; it leaves the benefit of semantic ranking for a differently constructed experiment.

Including the cost of the optional model

I retained the recorded CPU timing boundaries alongside correctness. Twenty warmed batch-one answer operations per method include SQLite access, transformation or encoding, ranking and answer construction. Their medians were 11.788 ms for lexical retrieval, 2.969 ms for temporal retrieval and 20.073 ms for embedding. The mix includes four fast unsupported requests; sixteen requests actually invoke the encoder.

Separate cold encoder initialization took about 7.856 seconds, including local artifact validation and a first probe. These observations describe that machine and workload. With all methods tied on the canonical answers, the model's extra work needs a task where source ordering can matter. I kept the timing and the singleton-candidate finding together when deciding what to test next.

Fixing persistence and stale-screen failures

Review found that rejecting SQLite updates and deletes alone left an ordinary REPLACE path around the evidence invariant. I added duplicate-ID insertion protection while allowing exact API retries. Reusing an ID with changed content now fails. Another reproduced issue involved Windows database locks: the connection helper needed to close the connection as well as commit or roll back its transaction.

I also clear the previous answer before processing a new question. A malformed cutoff now shows a named query error without retaining the earlier success beneath it. The unsupported tea example returns unknown without an encoder call. These interface states make the boundaries of an individual request visible, including when a model was selected but never needed to execute.

Extending the questions before extending the claims

I would next freeze a separate paraphrase set before changing the parser. That would let me measure extraction and abstention on unfamiliar wording, while preserving the canonical experiment as a reference. Natural conversation data would need its own source permissions and conversation, person and time splits.

For the encoder, I need multiple applicable sources with independently specified relevance. Separate conflict diagnostics already show that real scores affect ordering while contradictory sources survive. They do not provide a ranking benchmark. I would build that evaluation before deciding whether embedding earns its additional cost. Mimo taught me to inspect candidate structure as carefully as accuracy: a perfect score can come from a task that gives the new component no useful decision to make.

Available for work