dakheel commited on
Commit
3ecf693
·
verified ·
1 Parent(s): 22504be

fix: validate compare mode with grounded generic evidence

Browse files

Fixed HUDA-Net v38.0.2 compare-mode audit failure.

Changes:
- Replaced invalid placeholder-based compare tests with grounded generic evidence.
- Added realistic query and evidence structures for Compare ON and Compare OFF validation.
- Compare ON now verifies multi-source synthesis.
- Compare OFF now verifies primary-source-only synthesis.
- Added compare-mode validation to the lightweight preflight before downloading the full runtime.
- Preserved the complete query-conditioned proposition pipeline.
- Preserved fail-closed behavior for weak or incompatible evidence.
- Added updated regression tests, validation reports, and deployment documentation.

DEPLOY_HUDANET_V38_0_2.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Deploy HUDA-Net v38.0.2
2
+
3
+ Upload every file and preserve the `hudanet_core/` directory tree.
4
+
5
+ ## Commit title
6
+ `fix: validate compare mode with grounded generic evidence`
7
+
8
+ ## Expected startup markers
9
+ 1. `✅ HUDA-Net v38.0.2 lightweight proposition and compare-mode preflight passed before runtime download`
10
+ 2. `HUDA-Net Smart All-in-One v38.0.2`
11
+ 3. `✅ HUDA-Net v38.0.2 generic proposition self-test passed`
12
+ 4. `✅ Intensive filter audit passed`
13
+ 5. Gradio launch without a traceback.
14
+
15
+ This release does not disable or weaken the filter audit. It repairs the invalid placeholder fixture and tests compare mode using coherent, topic-aligned evidence.
app.py CHANGED
@@ -1,6 +1,6 @@
1
  # -*- coding: utf-8 -*-
2
  """
3
- HUDA-Net Query-Conditioned Proposition Graph v38.0.1 Academic Integrated — Gradio Stable
4
  =============================
5
  Deploy this file as app.py in a Hugging Face Space and add HF_TOKEN as a
6
  read-only Space secret.
@@ -257,7 +257,7 @@ def _generic_proposition_preflight() -> None:
257
  )
258
  if not unrelated_rejected or not required_roles.issubset(roles):
259
  raise RuntimeError(
260
- "HUDA-Net v38.0.1 preflight failed before runtime download: "
261
  + json.dumps(
262
  {
263
  "unrelated_rejected": unrelated_rejected,
@@ -268,9 +268,55 @@ def _generic_proposition_preflight() -> None:
268
  ensure_ascii=False,
269
  )
270
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  print(
272
- "✅ HUDA-Net v38.0.1 lightweight proposition preflight passed "
273
- "before runtime download"
274
  )
275
 
276
 
@@ -286,7 +332,7 @@ def _zerogpu_registration_only():
286
 
287
  _download_hudanet_private_datasets()
288
 
289
- VERSION = "38.0.1"
290
  CONFIG = {
291
  "INPUT_ROOT": "/kaggle/input",
292
  "WORK_ROOT": "/tmp/hudanet_v27",
@@ -3076,7 +3122,7 @@ import pandas as pd
3076
  from scipy import sparse
3077
  import joblib
3078
 
3079
- UI_VERSION = "38.0.1"
3080
  UI_CONFIG = {
3081
  "INPUT_ROOT": "/kaggle/input",
3082
  "RUNTIME_DATASET_SLUG": "hudanet-bilingual-certified-runtime",
@@ -5528,8 +5574,8 @@ def validate_answer_quality_v36_4() -> dict:
5528
 
5529
  failed=[item for item in checks if not item["passed"]]
5530
  if failed:
5531
- raise RuntimeError("HUDA-Net v38.0.1 generic proposition self-test failed: "+json.dumps(failed,ensure_ascii=False))
5532
- print(f"✅ HUDA-Net v38.0.1 generic proposition self-test passed: {len(checks)} checks")
5533
  return {"passed":True,"tested":len(checks),"checks":checks}
5534
 
5535
  def validate_specificity_guard_v33(engine: ProfessionalEvidenceEngine) -> dict:
@@ -5728,26 +5774,55 @@ def validate_filter_engine(engine: ProfessionalEvidenceEngine) -> dict:
5728
  actual = [x["record_id"] for x in engine._sort_items(items, mode)]
5729
  add(f"sort_{mode}", actual == ids, actual=actual, expected=ids)
5730
 
5731
- # Answer-format fallback and a comparison toggle that visibly changes output.
 
 
 
5732
  source = {"answer_short":"SHORT", "answer_detailed":"DETAIL", "answer":"FULL", "evidence":"EVIDENCE"}
5733
  for style, expected_value in (("short","SHORT"),("detailed","DETAIL"),("full","FULL"),("evidence","EVIDENCE")):
5734
  add(f"answer_style_{style}", engine._select_answer(source, style) == expected_value)
 
 
5735
  support = [
5736
- {"book_id":"b1","book":"Book 1", **source, "ruling":"permissible"},
5737
- {"book_id":"b2","book":"Book 2", **source, "ruling":"permissible"},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5738
  ]
5739
  consensus = {"state":"agreement", "books":2, "agreement_ratio":1.0}
5740
- compared = compose_answer_for_filter_preferences_ui(engine, support, "detailed", "en", True, consensus)
5741
- single = compose_answer_for_filter_preferences_ui(engine, support, "detailed", "en", False, {})
 
 
 
 
5742
  add(
5743
  "compare_toggle_on_synthesizes",
5744
  "Book 1" in compared and "Book 2" in compared,
5745
- output=compared[:300],
5746
  )
5747
  add(
5748
  "compare_toggle_off_primary_only",
5749
  "Book 1" in single and "Book 2" not in single and single != compared,
5750
- output=single[:300],
5751
  )
5752
 
5753
  failed = [x for x in checks if not x.get("passed")]
 
1
  # -*- coding: utf-8 -*-
2
  """
3
+ HUDA-Net Query-Conditioned Proposition Graph v38.0.2 Academic Integrated — Gradio Stable
4
  =============================
5
  Deploy this file as app.py in a Hugging Face Space and add HF_TOKEN as a
6
  read-only Space secret.
 
257
  )
258
  if not unrelated_rejected or not required_roles.issubset(roles):
259
  raise RuntimeError(
260
+ "HUDA-Net v38.0.2 preflight failed before runtime download: "
261
  + json.dumps(
262
  {
263
  "unrelated_rejected": unrelated_rejected,
 
268
  ensure_ascii=False,
269
  )
270
  )
271
+
272
+ # Validate the compare-sources contract with coherent generic evidence before
273
+ # downloading the multi-gigabyte runtime. This catches audit-fixture regressions
274
+ # immediately and verifies real synthesis rather than bypassing the gate.
275
+ compare_query = "Is operation alpha permissible?"
276
+ compare_sources = [
277
+ {
278
+ "record_id":"preflight-compare-1", "book_id":"preflight-book-1",
279
+ "book":"Book 1", "title":"Ruling on operation alpha",
280
+ "question":compare_query, "ruling":"permissible",
281
+ "answer":"Operation alpha is permissible when its stated conditions are met.",
282
+ "source_kind":"clean certified source", "direct_probability":0.92,
283
+ "score":0.90, "dense_score":0.90, "cross_encoder_score":0.90,
284
+ "bm25_score":0.90,
285
+ },
286
+ {
287
+ "record_id":"preflight-compare-2", "book_id":"preflight-book-2",
288
+ "book":"Book 2", "title":"Ruling on operation alpha",
289
+ "question":compare_query, "ruling":"permissible",
290
+ "answer":"Operation alpha is allowed under the stated conditions.",
291
+ "source_kind":"clean certified source", "direct_probability":0.90,
292
+ "score":0.88, "dense_score":0.90, "cross_encoder_score":0.90,
293
+ "bm25_score":0.90,
294
+ },
295
+ ]
296
+ compared = pipeline.resolve(
297
+ compare_query, compare_sources, "en", style="detailed", compare_sources=True
298
+ )
299
+ primary_only = pipeline.resolve(
300
+ compare_query, compare_sources, "en", style="detailed", compare_sources=False
301
+ )
302
+ compare_ok = "Book 1" in compared.answer and "Book 2" in compared.answer
303
+ primary_ok = ("Book 1" in primary_only.answer) ^ ("Book 2" in primary_only.answer)
304
+ if not compare_ok or not primary_ok or compared.answer == primary_only.answer:
305
+ raise RuntimeError(
306
+ "HUDA-Net v38.0.2 compare-mode preflight failed before runtime download: "
307
+ + json.dumps(
308
+ {
309
+ "compare_ok": compare_ok,
310
+ "primary_ok": primary_ok,
311
+ "compared": compared.answer,
312
+ "primary_only": primary_only.answer,
313
+ },
314
+ ensure_ascii=False,
315
+ )
316
+ )
317
  print(
318
+ "✅ HUDA-Net v38.0.2 lightweight proposition and compare-mode preflight "
319
+ "passed before runtime download"
320
  )
321
 
322
 
 
332
 
333
  _download_hudanet_private_datasets()
334
 
335
+ VERSION = "38.0.2"
336
  CONFIG = {
337
  "INPUT_ROOT": "/kaggle/input",
338
  "WORK_ROOT": "/tmp/hudanet_v27",
 
3122
  from scipy import sparse
3123
  import joblib
3124
 
3125
+ UI_VERSION = "38.0.2"
3126
  UI_CONFIG = {
3127
  "INPUT_ROOT": "/kaggle/input",
3128
  "RUNTIME_DATASET_SLUG": "hudanet-bilingual-certified-runtime",
 
5574
 
5575
  failed=[item for item in checks if not item["passed"]]
5576
  if failed:
5577
+ raise RuntimeError("HUDA-Net v38.0.2 generic proposition self-test failed: "+json.dumps(failed,ensure_ascii=False))
5578
+ print(f"✅ HUDA-Net v38.0.2 generic proposition self-test passed: {len(checks)} checks")
5579
  return {"passed":True,"tested":len(checks),"checks":checks}
5580
 
5581
  def validate_specificity_guard_v33(engine: ProfessionalEvidenceEngine) -> dict:
 
5774
  actual = [x["record_id"] for x in engine._sort_items(items, mode)]
5775
  add(f"sort_{mode}", actual == ids, actual=actual, expected=ids)
5776
 
5777
+ # Answer-format fallback and a semantically grounded comparison-toggle audit.
5778
+ # The earlier fixture used placeholders such as DETAIL/FULL with no question topic.
5779
+ # The generic evidence gate correctly rejected those strings, so the audit itself
5780
+ # was invalid. This fixture now tests the real contract with topic-aligned evidence.
5781
  source = {"answer_short":"SHORT", "answer_detailed":"DETAIL", "answer":"FULL", "evidence":"EVIDENCE"}
5782
  for style, expected_value in (("short","SHORT"),("detailed","DETAIL"),("full","FULL"),("evidence","EVIDENCE")):
5783
  add(f"answer_style_{style}", engine._select_answer(source, style) == expected_value)
5784
+
5785
+ compare_query = "Is operation alpha permissible?"
5786
  support = [
5787
+ {
5788
+ "record_id":"compare-1", "book_id":"b1", "book":"Book 1",
5789
+ "title":"Ruling on operation alpha", "question":compare_query,
5790
+ "answer_short":"Operation alpha is permissible.",
5791
+ "answer_detailed":"Operation alpha is permissible when its stated conditions are met.",
5792
+ "answer":"Operation alpha is permissible when its stated conditions are met.",
5793
+ "evidence":"The source states that operation alpha is permissible.",
5794
+ "ruling":"permissible", "source_kind":"clean certified source",
5795
+ "direct_probability":0.92, "score":0.90, "dense_score":0.90,
5796
+ "cross_encoder_score":0.90, "bm25_score":0.90,
5797
+ },
5798
+ {
5799
+ "record_id":"compare-2", "book_id":"b2", "book":"Book 2",
5800
+ "title":"Ruling on operation alpha", "question":compare_query,
5801
+ "answer_short":"Operation alpha is permissible.",
5802
+ "answer_detailed":"Operation alpha is allowed under the stated conditions.",
5803
+ "answer":"Operation alpha is allowed under the stated conditions.",
5804
+ "evidence":"The text permits operation alpha.",
5805
+ "ruling":"permissible", "source_kind":"clean certified source",
5806
+ "direct_probability":0.90, "score":0.88, "dense_score":0.90,
5807
+ "cross_encoder_score":0.90, "bm25_score":0.90,
5808
+ },
5809
  ]
5810
  consensus = {"state":"agreement", "books":2, "agreement_ratio":1.0}
5811
+ compared = compose_answer_for_filter_preferences_ui(
5812
+ engine, support, "detailed", "en", True, consensus, compare_query
5813
+ )
5814
+ single = compose_answer_for_filter_preferences_ui(
5815
+ engine, support, "detailed", "en", False, {}, compare_query
5816
+ )
5817
  add(
5818
  "compare_toggle_on_synthesizes",
5819
  "Book 1" in compared and "Book 2" in compared,
5820
+ output=compared[:500],
5821
  )
5822
  add(
5823
  "compare_toggle_off_primary_only",
5824
  "Book 1" in single and "Book 2" not in single and single != compared,
5825
+ output=single[:500],
5826
  )
5827
 
5828
  failed = [x for x in checks if not x.get("passed")]
hudanet_core/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # HUDA-Net Query-Conditioned Proposition Graph v38.0.1
2
 
3
  This library builds answers from the current question and accepted source text. It contains no topic-entity dictionary, named question scenario, or stored fiqh answer.
4
 
@@ -25,3 +25,9 @@ This library builds answers from the current question and accepted source text.
25
  - Every displayed proposition records its source, page, and contributing record IDs.
26
  - If evidence conflicts strongly, the views are separated instead of silently merged.
27
  - If clean matching evidence is insufficient, the system abstains instead of dumping raw fragments.
 
 
 
 
 
 
 
1
+ # HUDA-Net Query-Conditioned Proposition Graph v38.0.2
2
 
3
  This library builds answers from the current question and accepted source text. It contains no topic-entity dictionary, named question scenario, or stored fiqh answer.
4
 
 
25
  - Every displayed proposition records its source, page, and contributing record IDs.
26
  - If evidence conflicts strongly, the views are separated instead of silently merged.
27
  - If clean matching evidence is insufficient, the system abstains instead of dumping raw fragments.
28
+
29
+
30
+ ## v38.0.2
31
+ - Corrected the compare-toggle audit fixture to use semantically grounded evidence.
32
+ - Added compare-mode validation to the lightweight preflight before Runtime download.
33
+ - No retrieval, proposition, grounding, consensus, or synthesis stage was removed.
hudanet_v38_0_2_compare_regression.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "38.0.2",
3
+ "passed": true,
4
+ "purpose": "Verify compare=true cites all compatible sources while compare=false cites only the strongest source.",
5
+ "query": "Is operation alpha permissible?",
6
+ "compare_enabled": {
7
+ "passed": true,
8
+ "required_sources": [
9
+ "Book 1",
10
+ "Book 2"
11
+ ],
12
+ "answer": "**Question:** Is operation alpha permissible?\n\n**Answer:** Operation alpha is permissible\n\n**Sources used for the answer:**\n- Book 1\n- Book 2"
13
+ },
14
+ "compare_disabled": {
15
+ "passed": true,
16
+ "required_exactly_one_source": true,
17
+ "answer": "**Question:** Is operation alpha permissible?\n\n**Answer:** Operation alpha is permissible\n\n**Sources used for the answer:**\n- Book 1"
18
+ },
19
+ "audit_fix": "Replaced ungrounded placeholder evidence (DETAIL/FULL) with coherent topic-aligned generic evidence; no audit was disabled."
20
+ }
hudanet_v38_0_2_generic_tests.json ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "passed": true,
3
+ "tested": 20,
4
+ "checks": [
5
+ {
6
+ "name": "request type mismatch rejected",
7
+ "passed": true,
8
+ "value": null
9
+ },
10
+ {
11
+ "name": "focused source selected",
12
+ "passed": true,
13
+ "value": "**Question:** What are the requirements of the process for the group?\n\n**Answer:**\n1. A qualified companion must be available. _[Source B]_\n2. The required expense is borne by the group. _[Source B]_\n3. If the companion is unavailable, the approved substitute is appointed. _[Source B]_\n\n**Sources used for the answer:**\n- Source B"
14
+ },
15
+ {
16
+ "name": "atomic propositions extracted",
17
+ "passed": true,
18
+ "value": {
19
+ "request_type": "conditions",
20
+ "subject_terms": [
21
+ "process",
22
+ "group"
23
+ ],
24
+ "anchor_terms": [
25
+ "process"
26
+ ],
27
+ "qualifier_terms": [
28
+ "group"
29
+ ],
30
+ "critical_terms": [
31
+ "group",
32
+ "process"
33
+ ],
34
+ "term_document_frequency": {
35
+ "process": 1.0,
36
+ "group": 0.5
37
+ },
38
+ "polarity": "affirmative",
39
+ "accepted": 1,
40
+ "rejected": 1,
41
+ "consensus_state": "single_source",
42
+ "selected_cluster": "conditions",
43
+ "used_record_ids": [
44
+ "focused"
45
+ ],
46
+ "used_book_ids": [
47
+ "Source B"
48
+ ],
49
+ "propositions": [
50
+ {
51
+ "text": "A qualified companion must be available.",
52
+ "score": 0.9079,
53
+ "source_record_ids": [
54
+ "focused"
55
+ ],
56
+ "source_books": [
57
+ "Source B"
58
+ ],
59
+ "source_pages": [],
60
+ "role": "requirement"
61
+ },
62
+ {
63
+ "text": "The required expense is borne by the group.",
64
+ "score": 0.9326,
65
+ "source_record_ids": [
66
+ "focused"
67
+ ],
68
+ "source_books": [
69
+ "Source B"
70
+ ],
71
+ "source_pages": [],
72
+ "role": "assignment"
73
+ },
74
+ {
75
+ "text": "If the companion is unavailable, the approved substitute is appointed.",
76
+ "score": 0.9113,
77
+ "source_record_ids": [
78
+ "focused"
79
+ ],
80
+ "source_books": [
81
+ "Source B"
82
+ ],
83
+ "source_pages": [],
84
+ "role": "consequence"
85
+ }
86
+ ],
87
+ "rejected_fragments": [
88
+ "conditions"
89
+ ]
90
+ }
91
+ },
92
+ {
93
+ "name": "question preserved verbatim",
94
+ "passed": true,
95
+ "value": null
96
+ },
97
+ {
98
+ "name": "source named",
99
+ "passed": true,
100
+ "value": null
101
+ },
102
+ {
103
+ "name": "paraphrases clustered",
104
+ "passed": true,
105
+ "value": [
106
+ {
107
+ "text": "A qualified companion must be available.",
108
+ "score": 0.9079,
109
+ "source_record_ids": [
110
+ "focused"
111
+ ],
112
+ "source_books": [
113
+ "Source B"
114
+ ],
115
+ "source_pages": [],
116
+ "role": "requirement"
117
+ },
118
+ {
119
+ "text": "The required expense is borne by the group.",
120
+ "score": 0.935,
121
+ "source_record_ids": [
122
+ "focused"
123
+ ],
124
+ "source_books": [
125
+ "Source B"
126
+ ],
127
+ "source_pages": [],
128
+ "role": "assignment"
129
+ },
130
+ {
131
+ "text": "If the companion is unavailable, the approved substitute is appointed.",
132
+ "score": 0.9113,
133
+ "source_record_ids": [
134
+ "focused"
135
+ ],
136
+ "source_books": [
137
+ "Source B"
138
+ ],
139
+ "source_pages": [],
140
+ "role": "consequence"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "name": "boilerplate not displayed",
146
+ "passed": true,
147
+ "value": "**Question:** What are the requirements of the process for the group?\n\n**Answer:**\n1. A qualified companion must be available. _[Source B]_\n2. A verified permit is required. _[Source D]_\n3. The required expense is borne by the group. _[Source B]_\n4. If the companion is unavailable, the approved substitute is appointed. _[Source B]_\n\n**Sources used for the answer:**\n- Source B\n- Source D"
148
+ },
149
+ {
150
+ "name": "incomplete conditional removed",
151
+ "passed": true,
152
+ "value": "**Question:** What are the requirements of the process for the group?\n\n**Answer:**\n1. A qualified companion must be available. _[Source B]_\n2. The required expense is borne by the group. _[Source B]_\n3. If the companion is unavailable, the approved substitute is appointed. _[Source B]_\n\n**Sources used for the answer:**\n- Source B"
153
+ },
154
+ {
155
+ "name": "rationale excluded from condition list",
156
+ "passed": true,
157
+ "value": "**Question:** What are the requirements of the process for the group?\n\n**Answer:**\n1. A qualified companion must be available. _[Source B]_\n2. A verified permit is required. _[Source R]_\n3. The required expense is borne by the group. _[Source B]_\n4. If the companion is unavailable, the approved substitute is appointed. _[Source B]_\n\n**Sources used for the answer:**\n- Source B\n- Source R"
158
+ },
159
+ {
160
+ "name": "explicit source order preserved",
161
+ "passed": true,
162
+ "value": "**Question:** What are the requirements of the process?\n\n**Answer:**\n1. Identity verification. _[Source O]_\n2. financial capacity. _[Source O]_\n3. operational readiness. _[Source O]_\n\n**Sources used for the answer:**\n- Source O"
163
+ },
164
+ {
165
+ "name": "strong conflict detected",
166
+ "passed": true,
167
+ "value": "**Question:** Is the action allowed?\n\n**Answer:** **Result:** The uploaded sources contain strong conflicting outcomes, so they should not be merged into one ruling:\n- The action is prohibited _[Source G]_\n- The action is permissible _[Source F]_"
168
+ },
169
+ {
170
+ "name": "conflict sources separated",
171
+ "passed": true,
172
+ "value": "**Question:** Is the action allowed?\n\n**Answer:** **Result:** The uploaded sources contain strong conflicting outcomes, so they should not be merged into one ruling:\n- The action is prohibited _[Source G]_\n- The action is permissible _[Source F]_"
173
+ },
174
+ {
175
+ "name": "neural score cannot override type gate",
176
+ "passed": true,
177
+ "value": {
178
+ "request_type": "timing",
179
+ "subject_terms": [
180
+ "process"
181
+ ],
182
+ "anchor_terms": [
183
+ "process"
184
+ ],
185
+ "qualifier_terms": [],
186
+ "critical_terms": [
187
+ "process"
188
+ ],
189
+ "term_document_frequency": {
190
+ "process": 0.0
191
+ },
192
+ "polarity": "affirmative",
193
+ "accepted": 0,
194
+ "rejected": 1,
195
+ "consensus_state": "insufficient",
196
+ "selected_cluster": "",
197
+ "used_record_ids": [],
198
+ "used_book_ids": [],
199
+ "propositions": [],
200
+ "rejected_fragments": []
201
+ }
202
+ },
203
+ {
204
+ "name": "compare mode includes multiple sources",
205
+ "passed": true,
206
+ "value": "**Question:** Is the action allowed?\n\n**Answer:** The action is permissible\n\n**Sources used for the answer:**\n- Source I\n- Source J"
207
+ },
208
+ {
209
+ "name": "primary mode uses one source",
210
+ "passed": true,
211
+ "value": "**Question:** Is the action allowed?\n\n**Answer:** The action is permissible\n\n**Sources used for the answer:**\n- Source I"
212
+ },
213
+ {
214
+ "name": "arabic contextual roles retained",
215
+ "passed": true,
216
+ "value": {
217
+ "request_type": "conditions",
218
+ "subject_terms": [
219
+ "موضوع",
220
+ "فية"
221
+ ],
222
+ "anchor_terms": [
223
+ "موضوع",
224
+ "فية"
225
+ ],
226
+ "qualifier_terms": [],
227
+ "critical_terms": [
228
+ "موضوع",
229
+ "فية"
230
+ ],
231
+ "term_document_frequency": {
232
+ "موضوع": 1.0,
233
+ "فية": 1.0
234
+ },
235
+ "polarity": "affirmative",
236
+ "accepted": 1,
237
+ "rejected": 0,
238
+ "consensus_state": "single_source",
239
+ "selected_cluster": "conditions",
240
+ "used_record_ids": [
241
+ "ar-atomic"
242
+ ],
243
+ "used_book_ids": [
244
+ "المصدر العربي"
245
+ ],
246
+ "propositions": [
247
+ {
248
+ "text": "وجود المتطلب الأول.",
249
+ "score": 0.9259,
250
+ "source_record_ids": [
251
+ "ar-atomic"
252
+ ],
253
+ "source_books": [
254
+ "المصدر العربي"
255
+ ],
256
+ "source_pages": [],
257
+ "role": "requirement"
258
+ },
259
+ {
260
+ "text": "يكون المتطلب الثاني متحققًا.",
261
+ "score": 0.9072,
262
+ "source_record_ids": [
263
+ "ar-atomic"
264
+ ],
265
+ "source_books": [
266
+ "المصدر العربي"
267
+ ],
268
+ "source_pages": [],
269
+ "role": "definition"
270
+ },
271
+ {
272
+ "text": "تتحمل الفئة النفقة اللازمة.",
273
+ "score": 0.914,
274
+ "source_record_ids": [
275
+ "ar-atomic"
276
+ ],
277
+ "source_books": [
278
+ "المصدر العربي"
279
+ ],
280
+ "source_pages": [],
281
+ "role": "assignment"
282
+ },
283
+ {
284
+ "text": "إذا تعذر الشرط تستعمل الفئة البديل المقرر.",
285
+ "score": 0.9392,
286
+ "source_record_ids": [
287
+ "ar-atomic"
288
+ ],
289
+ "source_books": [
290
+ "المصدر العربي"
291
+ ],
292
+ "source_pages": [],
293
+ "role": "consequence"
294
+ }
295
+ ],
296
+ "rejected_fragments": [
297
+ "شروط"
298
+ ]
299
+ }
300
+ },
301
+ {
302
+ "name": "complete Arabic conditional retained",
303
+ "passed": true,
304
+ "value": "**السؤال:** ما شروط الموضوع للفئة؟\n\n**الإجابة:**\n1. وجود المتطلب الأول. _[المصدر العربي]_\n2. يكون المتطلب الثاني متحققًا. _[المصدر العربي]_\n3. تتحمل الفئة النفقة اللازمة. _[المصدر العربي]_\n4. إذا تعذر الشرط تستعمل الفئة البديل المقرر. _[المصدر العربي]_\n\n**المصادر التي بُني عليها الجواب:**\n- المصدر العربي"
305
+ },
306
+ {
307
+ "name": "no domain anchor table",
308
+ "passed": true,
309
+ "value": null
310
+ },
311
+ {
312
+ "name": "no entity alias table",
313
+ "passed": true,
314
+ "value": null
315
+ },
316
+ {
317
+ "name": "no named intent table",
318
+ "passed": true,
319
+ "value": null
320
+ }
321
+ ],
322
+ "version": "38.0.2"
323
+ }
hudanet_v38_0_2_manifest.json ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "38.0.2",
3
+ "file_count_including_manifest": 28,
4
+ "files": [
5
+ {
6
+ "path": "DEPLOY_HUDANET_V38_0_2.md",
7
+ "bytes": 652,
8
+ "sha256": "5f22b45f7f800006dee5ac689d008599727c5d1f3b700b0fbcdc3f1af7ef8615"
9
+ },
10
+ {
11
+ "path": "app.py",
12
+ "bytes": 529186,
13
+ "sha256": "516534bede0a7de258179f1558739316083fcb60fefd822d99900c2932698b53"
14
+ },
15
+ {
16
+ "path": "hudanet_core/README.md",
17
+ "bytes": 2222,
18
+ "sha256": "a524058295acbe60afdf99b23b4db231fc3ba7a8681555c5afd42ecc85194696"
19
+ },
20
+ {
21
+ "path": "hudanet_core/__init__.py",
22
+ "bytes": 175,
23
+ "sha256": "c417d4feb14e04c42769554348a0fe5f9cd2764ae29fcce6bca48fb29ce1acb1"
24
+ },
25
+ {
26
+ "path": "hudanet_core/compatibility.py",
27
+ "bytes": 10930,
28
+ "sha256": "16a511011248bd6f97caa6d6866299f55109e3f9d1f33e9db24f4a10f4f56c97"
29
+ },
30
+ {
31
+ "path": "hudanet_core/consensus.py",
32
+ "bytes": 6332,
33
+ "sha256": "8fb742c3c72653d8b813df059d3603dcf10d99e20c80a43777802df50ef97fca"
34
+ },
35
+ {
36
+ "path": "hudanet_core/evidence.py",
37
+ "bytes": 7019,
38
+ "sha256": "95b0d7d3c8bb3d619eae12aeacdb170a65615f0d8e7385f5a8b3e70dd7e82ed1"
39
+ },
40
+ {
41
+ "path": "hudanet_core/grounding.py",
42
+ "bytes": 1108,
43
+ "sha256": "7abe6dd19b685ae687ee1242dd9301306efbe2ecffc160aa26011ea5f206f74a"
44
+ },
45
+ {
46
+ "path": "hudanet_core/pipeline.py",
47
+ "bytes": 7557,
48
+ "sha256": "9cda6b71f3accad63852e13b8b530504dd8976a9dc1a73640be7d115941b3969"
49
+ },
50
+ {
51
+ "path": "hudanet_core/propositions.py",
52
+ "bytes": 23539,
53
+ "sha256": "0255a8d9044d37bc709fa7885e2c6398a8e0ba01ab513a27428900c2027c37e1"
54
+ },
55
+ {
56
+ "path": "hudanet_core/query.py",
57
+ "bytes": 6802,
58
+ "sha256": "98603410213c488852d24adf7d0e9e51154d74c776d75523a488cba95ac0f915"
59
+ },
60
+ {
61
+ "path": "hudanet_core/rendering.py",
62
+ "bytes": 3270,
63
+ "sha256": "6b4abe87f33c0ec491621be8e7ac10c29b3e61ba9473303532c5158c72b589d9"
64
+ },
65
+ {
66
+ "path": "hudanet_core/resources/answer_templates.json",
67
+ "bytes": 4603,
68
+ "sha256": "026d0e2ac95cee78231c7a7000719772c963855d3cae2eb38712be5580f4a850"
69
+ },
70
+ {
71
+ "path": "hudanet_core/resources/evidence_schema.json",
72
+ "bytes": 732,
73
+ "sha256": "522d171dd2b6371a3d9b1d01e9395ab12dcbccbbd96e546dfa965a05c77888a4"
74
+ },
75
+ {
76
+ "path": "hudanet_core/resources/ranking_config.json",
77
+ "bytes": 5172,
78
+ "sha256": "75b91412ec05fe030c1da9de258f5d2d08be6f48f50623749040d2178f389fde"
79
+ },
80
+ {
81
+ "path": "hudanet_core/resources/semantic_rules.json",
82
+ "bytes": 28706,
83
+ "sha256": "f2ed46ece080e76f07212c50dde5ad89150da979b3aa3c29f184cac53a6d427f"
84
+ },
85
+ {
86
+ "path": "hudanet_core/resources.py",
87
+ "bytes": 2268,
88
+ "sha256": "d043d3df9da9ec9c43b9a269f395ba2754f08945a80f98ff6b6516fad3087e1d"
89
+ },
90
+ {
91
+ "path": "hudanet_core/roles.py",
92
+ "bytes": 959,
93
+ "sha256": "d0e0a4b5fb7bb58f44cbbc62f9c0ffcb22628f2bc8811117919c4be7f1a38936"
94
+ },
95
+ {
96
+ "path": "hudanet_core/synthesis.py",
97
+ "bytes": 8722,
98
+ "sha256": "ce980b4ef4fa5bcd67f65b2a812ff12bf36e3014c3b7f07efc2d97c0a6261904"
99
+ },
100
+ {
101
+ "path": "hudanet_core/tests/test_generic_pipeline.py",
102
+ "bytes": 8364,
103
+ "sha256": "a47c1a870c34137685576442557f28b9702fafb4bb34b653391effb379954459"
104
+ },
105
+ {
106
+ "path": "hudanet_core/text.py",
107
+ "bytes": 8583,
108
+ "sha256": "6cddd2c66f98d23357847d506856e41790ba004ef274e3e88f0723425d6db6e7"
109
+ },
110
+ {
111
+ "path": "hudanet_core/types.py",
112
+ "bytes": 3147,
113
+ "sha256": "c6d2f4f0d05ee477ead2b3aa71468122a4032ee8d04ae50a9f145e3a40b5a018"
114
+ },
115
+ {
116
+ "path": "hudanet_dialects.json",
117
+ "bytes": 61047,
118
+ "sha256": "9d73324aa9a53cef401b1b155691c5c594504ef5a89618709856d8ff86032413"
119
+ },
120
+ {
121
+ "path": "hudanet_retrieval_rules.json",
122
+ "bytes": 185,
123
+ "sha256": "cec40429fc82d5234e289a167c9ce8794b36bef7772e2bedb441d1569844e051"
124
+ },
125
+ {
126
+ "path": "hudanet_v38_0_2_compare_regression.json",
127
+ "bytes": 869,
128
+ "sha256": "d1d9dee76958b6a12a864a07cccf166bd2efb1e4c541f96946a75c3f1dfaa99a"
129
+ },
130
+ {
131
+ "path": "hudanet_v38_0_2_generic_tests.json",
132
+ "bytes": 10712,
133
+ "sha256": "aa22e33bcfa32715199f91b460b940b1850a22c4ebdfac93f17edaa1c93097e7"
134
+ },
135
+ {
136
+ "path": "hudanet_v38_0_2_validation_report.json",
137
+ "bytes": 540,
138
+ "sha256": "dd2a374913b5fcb19690ba5097f706e429b1d0d191bfc99175603dab7bf84d05"
139
+ }
140
+ ]
141
+ }
hudanet_v38_0_2_validation_report.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "38.0.2",
3
+ "passed": true,
4
+ "python_files_compiled": 16,
5
+ "json_files_validated": 8,
6
+ "constant_regex_patterns_checked": 172,
7
+ "regex_errors": [],
8
+ "generic_tests_passed": true,
9
+ "generic_tests_count": 20,
10
+ "compare_regression_passed": true,
11
+ "preflight_before_runtime_download": true,
12
+ "filter_audit_disabled": false,
13
+ "pipeline_stages_removed": false,
14
+ "changes": [
15
+ "Grounded compare-toggle audit fixture",
16
+ "Compare-mode lightweight preflight before Runtime download",
17
+ "Version bump to 38.0.2"
18
+ ]
19
+ }