Proof of concept — an Expert System paired with a modern LLM

A ruling should be proven, not predicted.

An LLM turns your question into a formal goal; a symbolic expert system proves it against reviewed evidence and weighs conflicts by explicit rule, not probability — then the LLM narrates the decided result, with reasons you can inspect.

Tarjih Authentic Stamp

Every citation carries a real authenticity grade. Formalized clauses stay marked unreviewed until a human checks them — nothing enters a live answer unvetted.

Q

Can I eat carrion if I’m starving?

Grounded asruling(consume(carrion), H)
2 derivations
Qur'an 5:3 — forbidden foods
Qur'an 2:173 — necessity
al-darurat tubih al-mahzurat
Specific over general
Tarjih Evidence Weighing Scale
Permitted55%
Forbidden100%

2:173 is specific (khass) to the compelled person, qualifying the general prohibition rather than being overridden by it.

Tarjih Ruling Rosette Emblem
Verdict
Permissible (مباح)
Permitted55% confidence
[1] Qur'an 5:3[2] Qur'an 2:173[3] al-darurat tubih al-mahzurat (usul al-fiqh)

Two systems, one answer

Neither half of this works alone. An LLM by itself will happily invent a citation; a symbolic reasoner by itself can’t parse a freeform question. Tarjih splits the job between them on purpose.

Modern LLM

Language in, language out

Reads your freeform question and grounds it into a formal goal the reasoner can act on, then turns the engine’s verdict back into a readable explanation. It never decides the ruling itself.

Expert System

A hand-authored knowledge base

A Prolog-style engine derives the ruling by explicit rule against a knowledge base of citable facts — deterministic and inspectable, so every step of the proof tree traces back to a real source.

How Tarjih reasons

Ground

Clarify the question and define the goal.

Prove

Build a transparent proof from sources.

Weigh

Resolve conflicts using established principles.

Narrate

Deliver a verdict with reasons and citations.

Small reviewed knowledge base — gaps are reported, never guessed.

94

Core clauses

0

Formalized clauses reviewed

Editor’s note

If evidence is missing or the knowledge base has no rule covering a question, Tarjih reports the gap instead of guessing an answer.

Not another chatbot

A generic LLM chatbotTarjih
How a ruling is reachedPredicted from training dataDerived by explicit rule against a cited knowledge base
CitationsCan be invented, wrong, or unverifiableEvery clause traces to a real, graded source
Missing coverageGuesses an answer anywayReports the gap instead of guessing
Conflicting opinionsPicks one, usually without saying whyShows both paths and the rule that weighed them
Can you check its work?Only by asking it to explain itselfYes — an inspectable reasoning tree, every time