The pipeline, end to end

Every Hadith you see in Lightio passes through four steps. Three of them happen on your iPhone — only one touches our server.

01 · LOCAL

Capture

You frame an object & tap shutter

02 · LOCAL

Detect

YOLOX-M finds objects on-device

03 · CLOUD

Search

Label sent to find Hadith

04 · LOCAL

Display

Result rendered & saved

The image itself never leaves your device. Only the resulting object label — a short string like "date" or "sheep" — is sent to our search backend.

Object detection

Lightio uses YOLOX-M, an Apache 2.0-licensed object detector compiled to Core ML for Apple's Neural Engine. It recognizes the 80 categories in the COCO vocabulary — a carefully chosen subset that covers most everyday objects relevant to Hadith literature.

We chose YOLOX-M over alternatives for three reasons:

The model returns bounding boxes with confidence scores. We display all detections above the user-configurable confidence threshold (default 50%).

Hadith sources

Lightio's Hadith corpus is built exclusively from Kutub al-Sittah (the Six Canonical Collections) plus two well-regarded supplementary works. Every Hadith you see includes its source collection, narrator chain (isnad), and authenticity grading.

Sahih al-Bukhari

Sahih

The most rigorously authenticated Hadith collection. Compiled by Imam al-Bukhari (d. 870 CE).

~7,275 Hadiths

Sahih Muslim

Sahih

The second of the two "Sahihayn." Compiled by Imam Muslim ibn al-Hajjaj (d. 875 CE).

~7,500 Hadiths

Sunan Abu Dawud

Mixed

Focused on Hadith of legal significance. Compiled by Abu Dawud al-Sijistani (d. 889 CE).

~5,274 Hadiths

Jami at-Tirmidhi

Mixed

Includes notes on grading. Compiled by Imam al-Tirmidhi (d. 892 CE).

~3,956 Hadiths

Sunan al-Nasa'i

Mixed

The most stringent of the four Sunan works. Compiled by Imam al-Nasa'i (d. 915 CE).

~5,761 Hadiths

Sunan Ibn Majah

Mixed

Completes the Kutub al-Sittah. Compiled by Imam Ibn Majah (d. 887 CE).

~4,341 Hadiths

We do not include weak (da'if) or fabricated (mawdu') Hadiths in the corpus. Where a Hadith's grading is contested among scholars, we surface the majority view.

Object → Hadith mapping

This is the part most people are curious about. How does the app know that "date" should bring back a Hadith about Ajwa dates?

  1. Curated keyword sets. Each of the 80 COCO labels is mapped to a hand-curated list of Arabic and English terms relevant to that object (e.g. "date" → tamr, 'ajwa, rutab).
  2. Full-text search. We search the Hadith corpus for matches in the Arabic text and English translations, weighted by how prominent the term is in each Hadith.
  3. AI ranking. A reasoning step ranks candidate Hadiths by topical relevance to the detected object — not just keyword frequency.
  4. Diversity sampling. If you detect the same object twice, you'll get different Hadiths from the candidate set when possible.

AI-generated summaries

The original Arabic text and its scholarly translation are always shown unchanged. We add an AI-generated summary — labeled as such — in English by default, switching to your country's primary language once you verify your phone number (the country is inferred from the dialing code). This helps with comprehension when the Hadith is long or context-heavy.

Summaries are generated by OpenAI's models with prompts engineered to:

Summaries are aids, not replacements. We always recommend reading the source text alongside.

Prayer time calculation

Prayer times use the open-source Adhan algorithm, a widely-trusted implementation by Batoul Apps. Calculations run entirely on-device once you've granted location permission once.

We expose 8 calculation methods:

You can also override the Asr calculation between Standard (Shafi'i) and Hanafi behavior independently of your chosen method.

Sun visuals & weather context (v1.6.1+)

Sunrise, solar noon, and sunset shown beneath Today's Schedule are fetched from Apple WeatherKit using the latitude and longitude already stored in your prayer profile. These values are display-only — actual prayer time calculation remains fully on-device via Adhan. Current weather conditions are also fetched at prayer notifications to enrich hadith reflection search (e.g., surfacing rain-related hadiths when it's raining at your location). No additional personal data is sent to WeatherKit beyond the coordinates already in your profile.

Known limitations

We'd rather you know the limits up front than discover them disappointed.

!

The 80-object ceiling

Lightio can only detect objects in the COCO vocabulary. That means specialized religious items (prayer beads, kufi, qur'an stand) and cultural objects aren't detected. Expanding vocabulary is on our roadmap.

!

Object ≠ Theme

Detecting "cup" surfaces Hadiths about drinking, vessels, and hospitality — but not necessarily the most spiritually significant Hadith for your situation. Lightio is a discovery tool, not a fatwa engine.

!

Translation nuance

English translations of Hadith vary across scholars. We use widely-accepted translations and always show the original Arabic, but for legal/theological matters we recommend consulting qualified scholars and primary sources.

!

AI summaries can drift

Despite careful prompting, AI summaries occasionally introduce subtle inaccuracies. We mark summaries explicitly and treat them as supplementary — always defer to the source text.

How we review

Lightio's Hadith corpus and object mappings are reviewed quarterly. We track every reported correction in a public-feel internal log and fix issues before the next release.

If you spot a mistranslation, misattribution, or questionable mapping, please email us with a screenshot and the correct interpretation. We take corrections seriously.

Found something we should fix?

We treat methodology corrections as the highest-priority bug class. Help us improve Lightio for everyone.

Report a methodology issue