Sadiq-Cite
is a retrieval-grounded citation model for Islamic jurisprudence in the Ja'fari (Imami) tradition. Given a question and a set of retrieved passages, it finds the rulings that bear on the question,
quotes them verbatim
between «…», and lists their book and page. It does not issue verdicts, does not reason its way to a ruling, and does not apply the law to the asker's situation — and when the passages contain nothing relevant, it says so instead of improvising.
It is the answer stage of a pipeline, not a chatbot: run it behind LM Studio's server, inside AnythingLLM, in an n8n flow, or from any OpenAI-compatible client, with your own corpus supplying the passages. Built by
Sadiqoon Technologies
on
Qwen/Qwen3-8B
.
نموذج استشهاد مؤسَّس على الاسترجاع في الفقه الإماميّ. يُعطى السؤال والمقاطع المسترجعة، فيلتقط النصوص التي تخصّ المسألة وينقلها
حرفيًّا
بين «» ويعزوها بالكتاب والصفحة. لا يُفتي ولا يستنبط ولا ينزّل الحكم على حال السائل، وإذا لم يكن في المقاطع ما يخصّ السؤال صرّح بذلك ولم يخترع. يُشغَّل خلف خادم محلّي داخل منظومة استرجاع، لا كواجهة محادثة.
Why a citation model rather than an answering one
A jurisprudential answer has two halves:
what the sources say
, and
what follows for you
. The first is verifiable — the quote is either in the passage or it is not. The second is where a language model, however large, quietly invents. Sadiq-Cite is trained to do only the first half, so that everything it produces can be checked by a machine.
That check ships with it:
sadiq_fiqh.verify()
matches every «quote» in the output against the passages you supplied and returns a per-quote verdict, so your pipeline can drop an unverified quote before a reader ever sees it.
Evaluation
282 held-out questions with their retrieved passages, plus
100 refusal probes
— real questions paired with passages deliberately drawn from unrelated chapters. All metrics are computed programmatically; no LLM judge was used.
Answers that quote at least one passage
99.6%
Quotes traceable to the supplied passages
87.5%
(84.5% exact after orthographic normalization, 3.0% near-verbatim)
Quotes not found in the passages
10.8%
Answers where every quote verified
79.4%
Answers giving a book-and-page citation
97.2%
Citations matching a supplied passage
82.5%
Correct refusals on the 100 probes
100%
False refusals on genuine questions
0.4%
(1 of 282)
Two things are worth reading carefully.
Refusal discrimination is exact
: on a hundred questions given deliberately irrelevant context it refused every time, and on 282 answerable ones it refused once. Groundedness, on the other hand, is high but not perfect — roughly one quote in nine is reconstructed from what the model learned rather than copied from what it was given. That is the reason the verifier is part of the release rather than an afterthought: run it, and the residual becomes a rejected quote instead of a false citation.
Robustness to prompt format
Different RAG tools inject context differently, so the same 60 questions were re-run in four injection styles:
Injection style
Answers with quotes
Quote verbatim rate
Citation matches a passage
Native (the shape below)
100%
88.8%
67.8%
AnythingLLM-style context block
98.3%
85.5%
79.7%
XML
<doc source= page=>
tags
100%
87.7%
66.7%
Bare passages,
no book or page given
100%
83.0%
0%
Quoting holds up across all four — the model does not need our exact template to find and copy the right text. Citation is a different matter:
if you do not pass the book and page with each passage, the model will produce a citation anyway, and it will be fabricated.
Always include source metadata in the passage header, or strip the citations from the output.
Training
3,949 question–passage–answer examples in which the answer quotes and cites only, plus 500 refusal examples. LoRA (r=32) on all attention and MLP projections, two epochs, merged into the base weights.
Running it
LM Studio as a server
Load the model, start the local server, then point any OpenAI-compatible client at it:
from sadiq_fiqh import Sadiq, Passage, verify # pip install sadiq-fiqh
s = Sadiq(base_url="http://localhost:1234/v1", model="sadiq-cite-8b")
passages = [Passage(text="لا يجب الخمس في ما لا يدخل في مسمّى التكسّب…", book="…", page=120)]
answer = s.cite("هل يجب الخمس في الذهب الملبوس؟", passages)
print(verify(answer, passages)) # {'quotes': [...], 'all_verbatim': True}
AnythingLLM
Point the workspace's LLM at your local server (LM Studio or Ollama) and select this model; use
Fiqh-Embed
as the embedder — AnythingLLM supports LM Studio and Ollama embedders natively, so the whole stack stays local. Paste the system prompt below into the workspace's prompt setting.
Ollama
ollama create sadiq-cite -f Modelfile # Modelfile ships in this repo
ollama run sadiq-cite
n8n and custom pipelines
Retrieve with
Fiqh-Embed
, re-rank with
Fiqh-Rerank
, then call this model.
sadiq_fiqh.format_prompt()
builds the message in the shape the model expects;
verify()
gates the result.
System prompt
أنت «صادق»، مساعد بحث في فقه أهل البيت (عليهم السلام). مهمتك أن تعثر في المقاطع المرفقة على النصوص الشرعية التي تخصّ سؤال السائل وتنقلها حرفيًّا بين علامتي «» مرقّمةً، ثم تسرد مصادرها بالكتاب ورقم الصفحة. لا تفتِ ولا تستنبط ولا تطبّق الحكم على حالة السائل. إن لم تجد في المقاطع ما يخصّ السؤال فقل ذلك صراحةً، وإن كان السؤال ناقصًا فاطلب التوضيح.
sadiq-cite-8b huggingface.co is an AI model on huggingface.co that provides sadiq-cite-8b's model effect (), which can be used instantly with this sadiqoon sadiq-cite-8b model. huggingface.co supports a free trial of the sadiq-cite-8b model, and also provides paid use of the sadiq-cite-8b. Support call sadiq-cite-8b model through api, including Node.js, Python, http.
sadiq-cite-8b huggingface.co is an online trial and call api platform, which integrates sadiq-cite-8b's modeling effects, including api services, and provides a free online trial of sadiq-cite-8b, you can try sadiq-cite-8b online for free by clicking the link below.
sadiqoon sadiq-cite-8b online free url in huggingface.co:
sadiq-cite-8b is an open source model from GitHub that offers a free installation service, and any user can find sadiq-cite-8b on GitHub to install. At the same time, huggingface.co provides the effect of sadiq-cite-8b install, users can directly use sadiq-cite-8b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.