Ask me anything about your Instagram archive
How a retrieval layer routes your question to one of a fixed set of computable intents, scores them with deterministic matching, runs BM25 over your own text, and returns either the counted number with its working or an honest "I cannot tell from what you have" — with zero generation.
The most dangerous way to describe a search box is as a chatbot. A chatbot that answers
questions about your own archive would have to generate the answer. A number
generated from theme and guess is not a number from your messages. LMKFR's Ask Me
Anything room does the opposite. It routes your question to one of twelve things it
actually knows how to compute. It runs that exact computation over your records, and hands
back the number with its working. Where there is no such computation, it returns a sentence
that says so plainly. This post is the whole agreement the room has with its questions.
LMKFR does not have a model, and it never tries to invent one answer out of
plausible-sounding text. Your question is matched against the registered intents; the
best match runs; the result is a count that cites its records. If the question is outside
those intents, the room says unknown stays unknown and does not dress up a guess in
arithmetic. Every answer shows its working, and the working is the part that is supposed
to satisfy you.1
- 30sthe room is wired to answer a specific set of intents (counts, superlatives, rhythm,
- people, content search, comparisons, advice) and does so only when it can cite records.
- 4minhow matching/scoring works, why BM25 is used for search, and how the honest
- miss behaves.
- afterwards — why "unknown stays unknown" is a class of output, not a disclaimer.
The twelve questions it knows
The room matches a question to one of these and computes it. Nothing else has an answer:
| Intent | What it counts |
|---|---|
| `people.mostActive` | Who you interacted with most |
| `relation.count` | How many are in each relationship list |
| `relation.list` | Who, by name |
| `rhythm.when` | When, day-shaped |
| `rhythm.atHour` | What you were doing at a given hour |
| `self.overview` | The headline about yourself |
| `search.content` | Find the thing you meant in your own words |
| `person.about` | A profile for one person |
| `content.hashtags` | The hashtags you actually used |
| `content.rhythm` | Your posting rhythm |
| `people.unfollow` | Who is no longer following you |
| `compare.months` | Two months side by side |
The twelve are not a list of products. They are the exact set of queries the underlying
evaluators implement; the question you type only ever hires one of them. Anything else
is the answer that it does not know.2
The registry is generated in part. activityKindIntents() produces one "how many <kind>"
intent per ACTIVITY_KINDS entry (about two dozen count intents from a small generator).
It handles noun forms carefully (singular/plural/inflected), so common phrasings
route correctly. Hand-written intents cover superlatives, time-of-day rhythm, people,
content search, comparisons, and advice. Helpers keep answers honest and local. topBy
ranks accounts by a counter over the shared user index. nameOf uses @handle only when
handle-confirmed, and never promotes a bare DM name to an @handle.2
- Your questionnormalised and scored against the twelve intents
- Best scorerruns only if it clears the confidence bar
- The answera counted number that cites its records
- Too weakthe honest miss, never the runner-up
The engine is a scorer and a ranker, not a reasoner
Ask a question and it is normalised, scored for each of the twelve slots, and the best
scorer runs. If the highest scoring slot is too weak to be confident, the room returns
the "I cannot tell from what you have online" shape. It does not hand you the second-best
guess in a larger font. That is the honesty contract in code: the threshold for a known
answer is real, and on the wrong side of it there is only the plain sentence.1
It does not hand you the second-best guess in a larger font.
Scoring prefers longer literal matches and penalizes position slightly ("who did I
unfollow" beats a trailing token buried deep in a sentence). An exact example phrasing
gets a large confidence bump. If an intent requires slots (e.g. needs a query for
search), it is disqualified if any required slot is missing. The registry is scored in
order of best-to-worst by this numeric score, not by declaration order. The intent with
the top score is invoked.1
The twelve are split into two parts. Generated intents come from ACTIVITY_KINDS
(activityKindIntents) and cover "how many <kind>" forms across activity types. Hand-written
intents cover superlatives, time-of-day rhythm, people, content search, comparisons, and
advice. The generated family is derived from the same taxonomy as other
surfaces so labels never drift.2
How the router actually decides
The scoring is small enough to state in full, which is the point. For one intent, the
engine walks every pattern in its list and keeps the single best overlap. A pattern that
does not match at all is skipped. A pattern that matches contributes a score built from
two numbers: how long the literal overlap was, and where in the sentence it landed. The
rule is literal * 10 - min(position, 20) — so a longer phrase always beats a shorter one,
and, between two matches of the same length, the one nearer the start of the question
wins. That single asymmetry is why "who did I unfollow" routes to the unfollow intent
even when the word "unfollow" also appears later in a longer, unrelated sentence.1
Three rules then shape the ranking:
- An exact example phrasing is the strongest signal there is. If your normalised text
equals one of the intent's own example questions, it gets a flat +1000, which no
ordinary overlap can beat. The examples are not decoration; they are the room's
strongest key. - Required slots are a gate, not a bonus. An intent can declare that it needs a piece
of information to run at all — content search needs a
query. If any required slot is
missing, the intent scores zero and is disqualified, so it can never run on a
question that has nothing for it to do. When the slots are present, each one adds a
confidence bump. - Declaration order never matters. The registry is sorted by score, descending, with
the intent's id as a stable tie-breaker. Nothing depends on where an intent sits in the
source file, so adding a new intent cannot silently shadow an old one by accident.1
The winner runs inside a shallow clone of the context that carries only this question's
slots. The clone matters for two reasons. First, the caller's cached context stays
reusable across questions, so the BM25 index is built once and shared. Second, no resolver
can see another question's state. If the winning resolver throws — a malformed record, an
unexpected shape — the error does not become a crash in the chat thread and does not leak
a half-rendered number. It degrades to the honest miss, with one extra line admitting that
the answer failed to compute rather than showing something unchecked.1
The aggregates behind the answers carry their own provenance
A count on screen is only as honest as the metadata attached to it, so the aggregation
layer makes that metadata impossible to forget. Every result is returned in an envelope
whose meta field is required — there is no way to hand back a number without it. That
metadata records the coverage verdict, the observed date range, how many rows the
computation actually walked (scannedRows) versus how many it returned (measuredRows),
whether a time window was applied, and whether the result was capped.3
The cap is deliberately small and deliberately visible. A top-N ranked across thousands of
threads answers nobody's question — nobody reads a 966-row leaderboard — so the row cap is
a fixed, modest number, and when it fires the result says so: it carries a reason string
naming how many rows existed and how many it showed. Truncation is never silent.3
Coverage is the subtler honesty. An empty result is not automatically a zero. The layer
distinguishes a genuine measured zero — you really did send nothing that month — from a
category the export never included, which is absent, and from a category an export of
this shape cannot contain, which is impossible. Conflating those would let the room
report "you have no messages" about someone with thousands, merely because the requested
window excluded them all. So a windowed zero is stamped measured, and the coverage
verdict is decided from data — whether the presence table or the parsed rows back it —
before a single word of the answer is written.3
Two smaller rules in the same layer are worth knowing because they are where a careless
"insights" tool lies. First, the canonical table carries no text column: counts,
distributions, gaps and associations never need your words, so the words are not loaded
for them; full-text search goes through the separate ranking path instead. Second, the
column schema and its units are declared once — timestamps are Unix seconds, everywhere —
which converts an entire class of unit-mismatch bug from a habit into a lookup.3
Associations are the one place a tempting overclaim lives, and the type system closes it.
A correlation result's interpretation is a literal 'association' and nothing else; there
is no causes field to set, so the strongest claim the code can express is "these two move
together". When one side never varies, the coefficient is reported as undefined, not
zero — zero would be a real number stating the opposite of the truth. And below a minimum
paired sample the tone layer refuses to narrate the number at all, because a correlation
over a handful of points is not a correlation.3
Why the answer repeats exactly
The resolver is a pure function of the question and the context. It does not read the
clock, does not use randomness, and does not touch the network, so the same question asked
twice produces a byte-identical answer — a property the test suite asserts directly,
because a number that changes when you ask twice is not a number you can trust. The
"compute time" field is even stamped deterministically rather than measured, so snapshot
tests stay stable.13
There is a second, smaller purity rule with a large effect. When you ask a question that
names a person, the router hands the slot-extractor a list of the archive's own known
handles first, so it does not mistake an ordinary word for a username. Anything it cannot
anchor to a real handle stays a name, and a name is never promoted to an @handle on the
screen.2
"Unknown stays unknown" is not a disclaimer; it is a class of output
A product that searches your messages, your searches and your reactions can only produce
three shapes of answer, and we have a specific page for each:
- The exact match — the answer is a count of the rows that match your condition.
- The weak match — the question is close enough that we will tell you it is close, and
what it is short of.
- The non-answer — nothing in the archive supports the question. There is no fourth
shape, and the room never implies one.
When no intent scores high enough, answerSlots returns the honest miss. If one intent
barely matched, it cites that one to suggest rephrasing. Otherwise it states plainly
that it can only report what it can count from your export, and it never guesses. Followups
come from amaSuggestions to show real questions it can answer.1
Where the question gives enough to compare, the full-text ranking over messages, captions,
hashtags, searches and links uses BM25. The result is the set of records whose relevance
the arithmetic can defend, and the page points at them.4
The honest limit, stated once
This tool is unusually narrow on purpose. A large language model over your own DMs could
feel like it "just knows" who you were close to. It could also write something plausible
that no record supports, and it would look the same on the page. The room is designed so
that everything on it can be traced to a file, an ID and a row. That is the whole of
the honesty claim, and the only reason the room is allowed to exist at all. The contract
is pure: answerQuestion is a pure function of question and context. It is deterministic,
so the same question twice yields a byte-identical answer. There is no Date.now() in the core paths,
no network, and never a number it did not count.1
Questions this comes up
Does LMKFR use an AI model to answer my questions?
Not in local AMA. There is no model in the local room, and no network call leaves your device. A premium user can separately opt in to an AI answer, which is not local and is not blind. The protocol
is score-over-intents with a pure, deterministic resolver pipeline: answerQuestion/answerSlots
route to the best-matching intent and only return a number it actually counted.1
Why does it answer 'I do not know' rather than guess?
Because guessing is the one answer a chatbot can produce for anything, and the one
answer that cannot be verified. The engine returns an honest miss when no intent scores
high enough, with suggestions when a near match exists. Caveats and tone come from the
tone layer rather than a generic disclaimer.15
Can I ask it something it has not listed?
Is the text of my messages ever sent anywhere?
No — not for the local room. The full-text index is built on your device, stored on your device, and every result rendered is rendered for the page that holds the records; there is no upload path in local AMA. The separate premium AI answer is an explicit opt-in, and if you also choose to include messages, bounded matching snippets can be sent to the model provider under that consent. Your archive as a whole is never uploaded.4
Where this was checked
The claims in this post were read out of the room's own source, not summarised from a
README:
- The router, the scoring rule, the honest miss and the degenerate-to-miss error path:
packages/shared/src/ama/engine.ts. - The intent registry and the generated "how many <kind>" family:
packages/shared/src/ama/intents.ts, derived from the activity taxonomy. - The provenance envelope, the row cap, the coverage verdicts and the association type:
packages/shared/src/ama/aggregate.ts. - The full-text ranking used for content search:
packages/shared/src/ama/bm25.ts. - The tone/wording layer that refuses to narrate a number it cannot defend:
packages/shared/src/ama/tone.ts.
Footnotes
For developers — source references
Pointers into the open-source code that implements the behaviour described above.
packages/shared/src/ama/engine.ts—scoreIntent(L34-66): the best overlap
per intent scoredliteral * 10 - Math.min(position, 20)(L45-48), an exact example phrasing
returnsbest + 1000(L52-55), and a missing required slot returns0(L60-64).rankIntentssorts by score desc with an id tie-break (L69-77).noMatchbuilds the
honest miss with suggestions (L87-104).answerSlotsclones the context (L121), runs the
winner, and catches a throwing resolver into a miss plus an explicit "failed to compute"
caveat (L127-133).answerQuestionextracts slots with the archive's known handles
(L113-117). The module header states determinism is a hard requirement (L15-18).↩packages/shared/src/ama/intents.ts— the intent registry and the generatedactivityKindIntents()family derived fromACTIVITY_KINDSinanalytics/activity-taxonomy.ts; the twelve is the set of registered intents the engine
scores. The known-handles list fed into slot extraction lives inengine.ts(L114).↩packages/shared/src/ama/aggregate.ts—AMA_UNITS/MESSAGE_COLUMNS
(L58-93);AMA_ROW_CAPas an honesty limit, not a safety limit (L103).MessageTable
deliberately has no text column, so content search goes through the opt-in BM25 path
instead (L108-150).AggregateMetais required on every result and separatesscannedRows
frommeasuredRows(L160-191).metaForstamps provenance identically for every query
(L318-358).coverageOfseparatesmeasuredfromabsent(L642-658); the structuralimpossibleverdict is decided inpackages/shared/src/ama/context.ts(L138-169) and joins
theAmaCoverageunion intypes.ts(L52).associationreturns the literalinterpretation: 'association', anullr for a constant
column rather than a false0, and carriesAMA_MIN_ASSOCIATION_N = 30(L235, L556-618).timeseriesdensifies interior buckets so a quiet stretch is drawn as a real zero
(L378-421).↩packages/shared/src/ama/bm25.ts— BM25 full-text ranking over messages,
captions, hashtags, searches and links, used where the question supports a search rather
than a count.↩packages/shared/src/ama/tone.ts— the tone/honesty wording layer used for
refusals and caveats;caveatsForlives inpackages/shared/src/ama/context.ts.↩