Text Classification
Transformers
English
Japanese
hallucination-detection
groundedness
rag
guardrails
rule-based
not-a-neural-model
Instructions to use NagaYu/claimcheck-rules with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NagaYu/claimcheck-rules with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NagaYu/claimcheck-rules")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NagaYu/claimcheck-rules", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download rules/quotes.json from NagaYu/claimcheck-rules: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/NagaYu/claimcheck-rules/resolve/main/rules/quotes.json
- Command line
-
hf download hf://NagaYu/claimcheck-rules/rules/quotes.json
-
curl -L -o quotes.json https://huggingface.co/NagaYu/claimcheck-rules/resolve/main/rules/quotes.json
1.08 kB
| { | |
| "rules_version": "1.1.0", | |
| "description": "Quote extraction patterns and similarity thresholds.", | |
| "patterns": { | |
| "bracketed": "[γγβ\\\"]([^γγγγββ\\\"\\n]{4,180})[γγβ\\\"]", | |
| "attribution_marker": "(?:γ«γγγ¨|γ«γγγ°|γ«γ―|γ¨θ¨θΌ(?:γγγ¦)?(?:γ)?(?:γΎγ|γ)?|γ¨ζθ¨|γ¨θΏ°γΉ|γ¨ζΈγγ|γ¨ε ±ε|γ¨ηΊθ‘¨|states?\\s+that|according\\s+to|reported\\s+that|said\\s+that|notes?\\s+that|writes?\\s+that|claims?\\s+that|indicates?\\s+that)" | |
| }, | |
| "thresholds": { | |
| "approx_ratio": 0.82, | |
| "contradiction_floor": 0.65 | |
| }, | |
| "notes": [ | |
| "Similarity is difflib SequenceMatcher over k-gram-anchored windows at several widths.", | |
| "A faithful paraphrase scores ~0.87-0.93 and is reported as approximate: the meaning survived, the quote did not.", | |
| "KNOWN LIMITATION: a one-character semantic reversal in Japanese (ε’ε -> ζΈε°, ζΏθͺ -> ε¦ζ±Ί) keeps similarity above 0.9 and is reported as approximate, not contradicted. Read the NUMERIC and ENTITY claims inside a quote, not only the quote status." | |
| ] | |
| } | |