cd /news/ai-products/miktam-bible-part-2-an-ai-study-assi… · home › topics › ai-products › article
[ARTICLE · art-170032] src=dev.to ↗ pub= topic=ai-products verified=true sentiment=↑ positive

Miktam Bible | Part 2 — An AI Study Assistant That Runs on the Phone

Miktam Bible shipped an on-device AI study assistant that runs a 4-bit quantized SmolLM2 model through llama.rn, the React Native binding for llama.cpp, entirely on the phone with no API keys or server. Each question is first matched against an offline FTS5 verse index, and the top 10 verses are injected into the prompt so answers stay grounded, with verse references rendered as tappable links. The pipeline is built for hybrid retrieval via sqlite-vec and reciprocal rank fusion, but currently relies on FTS5 alone until a MiniLM embedding model is added; the app is in Google Play closed testing.

by read2 min views3 publishedNov 15, 2026

Most AI features in apps are a thin wrapper around a cloud API. Miktam Bible's study assistant is different: the language model runs on the phone, and every answer is grounded in verses pulled from the offline database.

The assistant runs a small SmolLM2 model, quantized to 4 bits in GGUF format, through llama.rn, the React Native binding for llama.cpp. The settings are chosen for phones:

context = await initLlama({
  model: nativePath,
  n_ctx: 2048,        // Mobile-safe context window
  n_batch: 256,       // Mobile-safe batch size
  n_threads: 4,       // CPU threads for inference
  n_gpu_layers: 0,    // 0 = CPU only
  use_mlock: false,
  use_mmap: true,     // Memory-map the model file
});

CPU-only with a memory-mapped model file keeps it working across the wide range of Android hardware. If the model has not been downloaded yet, or fails to load, the assistant falls back to showing the most relevant verses for your question directly.

A small model on its own will happily make things up. So every question goes through a retrieval step first:

Your question
  └── 1. Search the Bible (FTS5, with synonym expansion and stop words removed)
        └── 2. Take the 10 most relevant verses
              └── 3. Build the prompt: system prompt + those verses + your question
                    └── 4. Generate the answer on the phone
                          └── 5. Turn verse references in the answer into tappable links

The model is told to answer from the verses it was given, and any reference in its answer (for example John 3:16) becomes a link back into the reader.

Keyword search finds verses that share words with your question, not verses that share its meaning. The pipeline is already shaped for hybrid search: FTS5 results plus vector similarity (sqlite-vec), merged with reciprocal rank fusion. The missing piece is a small on-device embedding model (MiniLM); until it lands, the assistant uses FTS5 alone.

No API keys, no server, no logging of questions. You can put the phone in flight mode and the assistant still works.

Next, Part 3: reading plans and reminders that keep up with you.

Miktam Bible is in Google Play closed testing:

Different Play account? Request access here.

── more in #ai-products 4 stories · sorted by recency
── more on @miktam bible 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/miktam-bible-part-2-…] indexed:0 read:2min 2026-11-15 · —