54 AI calls, zero answers, one bad prompt
NVX Ancile is the AI desktop app I'm building, where answers cite their sources and a second model fact-checks them. The fact-check once burned 54 model calls in 5 minutes and never answered. Plus a 'flaky' test that was hiding lost writes.
By Ojas KekreCyber security, Monash University
One fact-check in NVX Ancile made 54 model calls in 5 minutes and never returned a verdict. Ancile is a desktop app for working with AI models for hours at a time. It is all local, open source (GPL-3.0) and Windows first, and the first release is in the works.
| What Ancile does | How |
|---|---|
| Model swapping | Swap models mid-chat without losing context |
| Citations | Answers cite the exact passage they came from |
| Fact-checking | A second model from a different family checks the claims |
| Memory | Whatever the AI remembers about you is plain markdown in git, which you can read and edit |
The fact-check that never finished
- Model calls
- 54
- For a 5-claim answer
- 5 min
- Verdicts
- 0
- 01
Split the answer into claims
- 02
Check each claim
Against your sources, then the web
- 03
Fallback model if one fails
This is where it looped
- 04
Verdict per claim
My first guess was that the models were bad. The trace said otherwise.
- 01chk to mdl: Prompt. The prompt ends with
Return JSON matching ClaimVerdictand never names a field. - 02mdl to sch: Plausible JSON. Each model sends back 200 to 260 characters of plausible JSON, and each one guessed a different shape. Models: 200-260 chars each.
- 03The schema rejects every one. Each rejection counts as "model failed". Fact-check loop: model failed; Schema: rejected.
- 04chk to mdl: Next model. So the loop walks the whole fallback chain, then goes round again, and again. Models: 4 of 4 rejected.
- 05That makes 54 calls in 5 minutes for a 5-claim answer, and no verdict. Fact-check loop: 54 calls, 0 verdicts.
Names every field with its type and an example, asks the provider for JSON mode with the schema, and reads replies tolerantly ("85%" is fine for 0.85).
| Limit | Value |
|---|---|
| Calls per claim | 3 |
| Calls per answer | 20 |
| Time | 6 minutes |
| Money | $0.50 |
| When a claim hits one | It says "not checked" and why, and the rest carry on |
| Label | Calls |
|---|---|
| The run that never finished | 54calls |
"grass is green." unverified (evidence: a passage about invoices)1 same answer, run twice 4 claims, then 62 web check 3 results, 0 quotes, so nothing to judge3 "everest is 8,849 m" blocked: the permission gate wanted to ask first4
- 1L1Fix: drop weak passages
- 2L2Fix: cache claims by answer hash
- 3L3Fix: require a quoted snippet
- 4L4Fix: let fact-check lookups skip the ask
The flaky test that was eating writes
Two tests about approving suggested memories failed now and then.
- 92%Same millisecond
- 8%Different
- 01cor to old: Two suggestions. Ancile's memory is its own git repo of markdown files. One correction creates two suggestions back to back.
- 02Both get the same millisecond. The ids are ULIDs, which break same-millisecond ties at random. Newer suggestion: same ms; Older suggestion: same ms.
- 03About 1 time in 4, the older one sorts as newest. Newer suggestion: sorts as older; Older suggestion: sorts as newest.
- 04apr to old: Approved. "Approve newest" approves the wrong one. The edit lands in the wrong file while the API says success. Approve newest: API: success.
| Where | What it did | Now |
|---|---|---|
| Same-millisecond ids | The older suggestion could sort as newest | Monotonic ULIDs fixed the order |
| Two writers to one file | A write could be lost | Everything goes through one write queue |
| A write git refused | Its text stayed on disk, and the next writer could commit it by accident | Everything goes through one write queue |
| Reading text before version | A save could silently undo someone else's commit | Everything goes through one write queue |
The regression test hammers the queue with simultaneous approvals and hand edits against a git repo on disk. Every check fails on the old code.
Emoji broke every citation highlight after them
| Python | JavaScript | |
|---|---|---|
| Where it lives | The part that chops sources into passages, and stores character offsets | The app |
| Counts | Code points | UTF-16 units |
| An emoji is | 1 | 2 |
So every highlight after an emoji landed a little early. I fixed it at the API boundary with a UTF-16 map per source version. If you pass string offsets between Python and JS, check this today.
Retrieval recall
| Label | recall@10 |
|---|---|
| Vectors only | 0.88 |
| Hybrid + rerank | 0.99 |
The local API answered every program
It only answers you. A browser is paired once. An approval is bound to a hash of the exact arguments you saw, so "delete this file" can't stretch into "delete this folder".
Free and Pro
| Free | Pro | |
|---|---|---|
| Covers | The whole product: notebooks, cited answers, branching, the second-model check, memory in git, flows, one GPU node of your own, every admin view | Work that outgrows one person or one machine: teams, sync, a GPU fleet |
| Lives in | The free build | A separate private module |
Because Pro lives in a separate module, there is no hidden trial in the free build. No pop-ups, no countdowns. Pro isn't on sale yet.