Developer releases askmdb, a local MongoDB CLI assistant built with fine-tuned Qwen models
Reported by r/LocalLLaMA1 source ↓
The askmdb developer introduced a Linux command-line tool that turns plain-language questions into MongoDB aggregation queries. The developer reports that its best model returned correct results for 91.6% of 500 test questions.
Key points
- The tool generates a query and explanation but waits for user confirmation before running it
- The 9B model scored 91.6% on the developer’s 500-question test
- Smaller models scored from 83.6% to 89.6% on the same test
- It runs locally as a Linux binary, with GPU or CPU support
- The code is MIT-licensed; the models are Apache-2.0 GGUFs
Details
The developer describes askmdb as a locally run MongoDB CLI assistant. It uses a fine-tuned model to generate an aggregation pipeline and a one-line explanation; the query does not run until the user confirms it. A built-in C++ verifier checks the pipeline against a whitelist, though the developer advises connecting with a read-only database user.
In the developer’s test of 500 English and Spanish questions over synthetic databases, the 9B model got 458 correct (91.6%), while the 4B, 2B and 0.8B models scored 89.6%, 86.8% and 83.6%. The developer says correctness was determined by whether each generated pipeline returned the same result as a reference query. Stock models tested scored between 6.6% and 47.8%.
The developer says the 0.8B model took a median of 1.18 seconds per answer on an eight-thread desktop CPU after the schema was cached; the first question on a new database took about three seconds. The tool is distributed as a Linux binary with llama.cpp and MongoDB’s C driver built in, and does not require Python, a server or API keys. The developer identifies multi-collection joins using $lookup as the main remaining weakness.
Written from coverage as of
Stocks in this story
Change since open: 20 Nov to 21 Nov 2026
Last refresh