External Publication
Visit Post

IHOS: Mapping 1,400-Year-Old Islamic Epistemology to AI Agent Architecture

Hugging Face Forums [Unofficial] April 21, 2026
Source

Background

Most AI agent frameworks draw from Western analytic philosophy or cognitive science. We took a different source: classical Islamic epistemology , specifically the methodology developed by scholars across 1,400 years from al-Ghazali to Ibn Khaldun.

The result is IHOS (Islamic Holistic Ontological System) — a framework we’re using to build SIDIX, a free open-source AI agent running 100% locally on Qwen2.5-7B + LoRA.


The Mappings

Islamic Concept AI Architecture Equivalent
Sanad (chain of transmission) Citation chain — every output tagged [FACT]/[OPINION]/[UNKNOWN] with source
Maqashid al-Shariah (5 objectives: life, intellect, faith, lineage, wealth) Objective function filter gates — blocks outputs that violate any of 5 core values
Muhasabah (self-accounting/reflection) Self-refinement loop: Niyah → Amal → Muhasabah, requires CQF ≥ 7.0 before output
Ijtihad (independent legal reasoning under uncertainty) ReAct agentic reasoning loop — agent reasons with incomplete information
Tadrij (gradual progression in learning) Curriculum learning — corpus ingested in structured stages, not random
Ijma (consensus of scholars) Multi-agent debate + consensus scoring

Why This Is Interesting (From an ML Perspective)

1. Epistemic labeling as a first-class output constraint

Islamic hadith methodology has a 5-tier reliability classification (sahih , hasan , da’if , munkar , mawdu). We simplified this to 4 labels and made it mandatory — the model cannot output a claim without labeling its epistemic status. This is different from typical confidence scores because it’s:

  • Human-readable

  • Enforced at generation time (not post-hoc)

  • Part of the training objective (LoRA fine-tuned on labeled pairs)

2. Maqashid as a value alignment framework

Rather than RLHF or Constitutional AI’s “helpful/harmless/honest” framing, we use 5 objective gates derived from Islamic jurisprudence. These gates operate as hard filters in the agent pipeline. We’re curious whether culturally-grounded value frameworks generalize better for certain demographics than universal-sounding principles.

3. Muhasabah loop vs RLHF

Self-refinement in our system is architectural, not learned. The agent is forced to evaluate its own output against the CQF (Content Quality Framework) score before returning. Similar in spirit to Self-RAG or Reflexion, but triggered by a domain-specific quality signal rather than a learned critic.


Current State

  • Model : Tiranyx/sidix-lora — LoRA adapter on Qwen2.5-7B-Instruct (QLoRA NF4, rank 64, alpha 128)

  • Training data : ~1,182 documents, trilingual (Indonesian/English/Arabic), domains: Islamic epistemology, coding, creative, brand strategy

  • Agent tools : 35 active tools, ReAct loop

  • License : MIT, fully self-hostable


Open Questions for the Community

  1. Has anyone studied whether culturally-specific epistemological frameworks (Islamic, Buddhist, Confucian, Ubuntu) produce different alignment properties vs universal frameworks?

  2. Mandatory epistemic labeling at generation time — has this been explored systematically? We found it reduces hallucination perception even when underlying accuracy is similar.

  3. For low-resource languages (Indonesian, Arabic dialects), do domain-specific LoRA adapters outperform general instruction tuning on cross-cultural reasoning tasks?

Model : Tiranyx/sidix-lora

Interested in collaboration, critique, or parallel work in non-Western epistemological frameworks for AI.

Discussion in the ATmosphere

Loading comments...