Skip to content

Commit a43db21

Browse files
authored
feat: add clawhub skill badge (MigoXLab#374)
* fix: update agent artical fact check example * add clawhub skill badge
1 parent 5fdbd36 commit a43db21

File tree

6 files changed

+35
-232
lines changed

6 files changed

+35
-232
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<a href="https://mseep.ai/app/dataeval-dingo"><img src="https://mseep.net/pr/dataeval-dingo-badge.png" alt="MseeP.ai Security Assessment Badge" height="20"></a>
2828
<a href="https://deepwiki.com/MigoXLab/dingo"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
2929
<a href="https://archestra.ai/mcp-catalog/dataeval__dingo"><img src="https://archestra.ai/mcp-catalog/api/badge/quality/DataEval/dingo" alt="Trust Score"></a>
30+
<a href="https://clawhub.ai/e06084/dingo"><img src="https://img.shields.io/badge/ClawHub-Skill-orange?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHRleHQgeT0iMTgiIGZvbnQtc2l6ZT0iMTYiPvCfpp48L3RleHQ+PC9zdmc+" alt="ClawHub Skill"></a>
3031
</p>
3132

3233
</div>

README_ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<a href="https://mseep.ai/app/dataeval-dingo"><img src="https://mseep.net/pr/dataeval-dingo-badge.png" alt="MseeP.ai Security Assessment Badge" height="20"></a>
2828
<a href="https://deepwiki.com/MigoXLab/dingo"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
2929
<a href="https://archestra.ai/mcp-catalog/dataeval__dingo"><img src="https://archestra.ai/mcp-catalog/api/badge/quality/DataEval/dingo" alt="Trust Score"></a>
30+
<a href="https://clawhub.ai/e06084/dingo"><img src="https://img.shields.io/badge/ClawHub-Skill-orange?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHRleHQgeT0iMTgiIGZvbnQtc2l6ZT0iMTYiPvCfpp48L3RleHQ+PC9zdmc+" alt="ClawHub Skill"></a>
3031
</p>
3132

3233
</div>

README_zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<a href="https://mseep.ai/app/dataeval-dingo"><img src="https://mseep.net/pr/dataeval-dingo-badge.png" alt="MseeP.ai 安全评估徽章" height="20"></a>
2828
<a href="https://deepwiki.com/MigoXLab/dingo"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
2929
<a href="https://archestra.ai/mcp-catalog/dataeval__dingo"><img src="https://archestra.ai/mcp-catalog/api/badge/quality/DataEval/dingo" alt="Trust Score"></a>
30+
<a href="https://clawhub.ai/e06084/dingo"><img src="https://img.shields.io/badge/ClawHub-Skill-orange?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHRleHQgeT0iMTgiIGZvbnQtc2l6ZT0iMTYiPvCfpp48L3RleHQ+PC9zdmc+" alt="ClawHub Skill"></a>
3031
</p>
3132

3233
</div>

examples/agent/agent_article_fact_checking_example.py

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
- TAVILY_API_KEY: (Optional) For web search verification
1010
"""
1111

12-
import json
1312
import os
14-
import tempfile
1513

1614
from dingo.config import InputArgs
1715
from dingo.exec import Executor
@@ -33,23 +31,14 @@ def main() -> int:
3331
print("WARNING: TAVILY_API_KEY not set - web search verification will be limited")
3432
print(" Set it with: export TAVILY_API_KEY='your-api-key'")
3533

36-
# Read the complete article (Markdown input)
37-
article_path = "test/data/blog_article_full.md"
34+
article_path = "test/data/factcheck_article.jsonl"
3835
if not os.path.exists(article_path):
3936
print(f"ERROR: Article file not found: {article_path}")
4037
return 1
4138

42-
with open(article_path, 'r', encoding='utf-8') as f:
43-
article_content = f.read()
44-
45-
# Wrap article in JSONL so Executor treats it as a single Data object.
46-
temp_jsonl = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False, encoding='utf-8')
47-
temp_jsonl.write(json.dumps({"content": article_content}, ensure_ascii=False) + '\n')
48-
temp_jsonl.close()
49-
5039
# Configuration for ArticleFactChecker
5140
config = {
52-
"input_path": temp_jsonl.name,
41+
"input_path": article_path,
5342
"dataset": {
5443
"source": "local",
5544
"format": "jsonl"
@@ -113,49 +102,38 @@ def main() -> int:
113102
print("Artifact output: outputs/article_factcheck_<timestamp>/")
114103
print("=" * 70)
115104

116-
# Create input args and executor
117105
input_args = InputArgs(**config)
118106
executor = Executor.exec_map["local"](input_args)
119107

120-
try:
121-
# Execute fact-checking
122-
print("\nExecuting agent-based fact-checking...\n")
123-
124-
result = executor.execute()
125-
126-
# Display results
127-
print("\n" + "=" * 70)
128-
print("FACT-CHECKING RESULTS")
129-
print("=" * 70)
130-
131-
if result:
132-
print(f"\nTotal items evaluated: {result.total}")
133-
print(f"Passed: {result.num_good} | Issues found: {result.num_bad}")
134-
if result.score:
135-
print(f"Overall score: {result.score:.2%}")
136-
if result.type_ratio:
137-
print("\nIssue breakdown:")
138-
for field_key, type_counts in result.type_ratio.items():
139-
for label, count in type_counts.items():
140-
print(f" [{field_key}] {label}: {count}")
141-
142-
print("\nFact-checking complete!")
143-
print(f"\nDingo standard output: {input_args.output_path}/")
144-
print(" |-- summary.json (aggregated statistics)")
145-
print(" +-- content/<LABEL>.jsonl (results grouped by quality label)")
146-
147-
print("\nIntermediate artifacts: outputs/article_factcheck_<timestamp>_<uuid>/")
148-
print(" |-- article_content.md (original Markdown article)")
149-
print(" |-- claims_extracted.jsonl (extracted claims, one per line)")
150-
print(" |-- claims_verification.jsonl (per-claim verification details)")
151-
print(" +-- verification_report.json (full structured report)")
152-
print("\nNote: Override artifact path with agent_config.output_path in config")
153-
154-
finally:
155-
try:
156-
os.unlink(temp_jsonl.name)
157-
except OSError:
158-
pass
108+
print("\nExecuting agent-based fact-checking...\n")
109+
result = executor.execute()
110+
111+
print("\n" + "=" * 70)
112+
print("FACT-CHECKING RESULTS")
113+
print("=" * 70)
114+
115+
if result:
116+
print(f"\nTotal items evaluated: {result.total}")
117+
print(f"Passed: {result.num_good} | Issues found: {result.num_bad}")
118+
if result.score:
119+
print(f"Overall score: {result.score:.2%}")
120+
if result.type_ratio:
121+
print("\nIssue breakdown:")
122+
for field_key, type_counts in result.type_ratio.items():
123+
for label, count in type_counts.items():
124+
print(f" [{field_key}] {label}: {count}")
125+
126+
print("\nFact-checking complete!")
127+
print(f"\nDingo standard output: {input_args.output_path}/")
128+
print(" |-- summary.json (aggregated statistics)")
129+
print(" +-- content/<LABEL>.jsonl (results grouped by quality label)")
130+
131+
print("\nIntermediate artifacts: outputs/article_factcheck_<timestamp>_<uuid>/")
132+
print(" |-- article_content.md (original Markdown article)")
133+
print(" |-- claims_extracted.jsonl (extracted claims, one per line)")
134+
print(" |-- claims_verification.jsonl (per-claim verification details)")
135+
print(" +-- verification_report.json (full structured report)")
136+
print("\nNote: Override artifact path with agent_config.output_path in config")
159137

160138
return 0
161139

0 commit comments

Comments
 (0)