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

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.

Without a proper reference to discrete data I welcome explanation of the different cognitive constructs. Let me say there is a little chaos in creativity.

Also @Tiranyx Welcome to your first post.

If there is a time to share peace it is now.

-Ernst


Edit via ChatGPT:

Me:’
There are many dimensions to philosophies.
There are reasons for every difference.

I think welcoming all philosophies is appropriate.

From a systems approach one system is of study as all systems are of study. We simply lack the time to consider all things so we find attraction to that which is familiar.
I am suggesting such for home-ai

My final comment for the American Audience is we all end our processing at some point and yet there is a greater process we are part of.

GPT

@Tiranyx — welcome, and thank you for sharing this.

I find your mapping between classical Islamic epistemology and AI architecture genuinely interesting, especially the way you treat epistemic labeling as a first-class constraint. The sanad → citation chain analogy is particularly compelling.

I’m curious about something at a more structural level:

Do you see IHOS as encoding a fixed value system into the agent, or as a process that evolves through interaction (for example, through muhasabah and ijtihad loops)?

In my own thinking, I often consider the “observer” not as something external, but as something that emerges from the interaction of information flows. Your muhasabah loop feels very close to that idea — a system evaluating itself before presenting an output.

Also, I appreciate that you are grounding alignment in a specific epistemological tradition rather than presenting it as universal. I would be interested to hear whether you’ve observed differences in how users respond to this compared to more generalized frameworks.

And yes — if there is a time to think carefully about how we build these systems, it is now.

-Ernst

Peace Train:

The following is an example of integrating Chinese’s Daoism with AI epistemological frameworks.
Name, Dao, and Logic: A Scientific Field Theory of Engineered Rationality and Its AGI Implementation (名、道與邏輯:一套可實作的理性場論)
https://osf.io/5bfkh/files/osfstorage/6935c47cbb5827a1378f1ca6

Logic is usually treated as a timeless background structure of the universe. In this paper, we advance a different thesis: logic is an engineered protocol that self-referential organisms construct on top of two more primitive operations—Name (名) and Dao (道)—in order to survive, coordinate, and compress experience. In this framework, an observer first chooses how to name the world (a map from raw states to engineered invariants), then chooses how to walk through those named states (a policy over trajectories). Logic is the meta-level protocol that filters which combinations of naming schemes and policies are admissible, and how strictly they must be enforced.