Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions generate_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import json
from scorer import QualityScorer

samples = [
{"type": "json", "content": '{"name": "test"}'},
{"type": "json", "content": '{"title": "Full Analysis", "body": "Long body text...", "meta": {"a": 1, "b": 2, "c": 3}, "extra": [1,2,3,4,5,6,7,8,9,0]}'},
{"type": "markdown", "content": "# Header\nContent"},
{"type": "markdown", "content": "# Big Report\n## Section 1\nDetailed content about agents and revenue models for 2026."}
] * 5 # Duplicate to get 20

scorer = QualityScorer()
results = []
for i, s in enumerate(samples):
results.append({
"submission_id": i + 1,
"result": scorer.score_submission(s["content"], s["type"])
})

with open("scorecards.json", "w") as f:
json.dump(results, f, indent=2)
print(f"Generated {len(results)} scorecards.")
367 changes: 367 additions & 0 deletions scorecards.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,367 @@
[
{
"submission_id": 1,
"result": {
"weighted_score": 0.4813,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.12,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 2,
"result": {
"weighted_score": 0.6687,
"quality_rating": "Fair",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.88,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 3,
"result": {
"weighted_score": 0.33,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 0.5,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Weak Markdown structure.",
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 4,
"result": {
"weighted_score": 0.43,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 5,
"result": {
"weighted_score": 0.4813,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.12,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 6,
"result": {
"weighted_score": 0.6687,
"quality_rating": "Fair",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.88,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 7,
"result": {
"weighted_score": 0.33,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 0.5,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Weak Markdown structure.",
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 8,
"result": {
"weighted_score": 0.43,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 9,
"result": {
"weighted_score": 0.4813,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.12,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 10,
"result": {
"weighted_score": 0.6687,
"quality_rating": "Fair",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.88,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 11,
"result": {
"weighted_score": 0.33,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 0.5,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Weak Markdown structure.",
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 12,
"result": {
"weighted_score": 0.43,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 13,
"result": {
"weighted_score": 0.4813,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.12,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 14,
"result": {
"weighted_score": 0.6687,
"quality_rating": "Fair",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.88,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 15,
"result": {
"weighted_score": 0.33,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 0.5,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Weak Markdown structure.",
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 16,
"result": {
"weighted_score": 0.43,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 17,
"result": {
"weighted_score": 0.4813,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.12,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 18,
"result": {
"weighted_score": 0.6687,
"quality_rating": "Fair",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.88,
"clarity": 1.0,
"validity": 1.0
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 19,
"result": {
"weighted_score": 0.33,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 0.5,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Weak Markdown structure.",
"Content is too brief."
],
"pass_threshold": false
}
},
{
"submission_id": 20,
"result": {
"weighted_score": 0.43,
"quality_rating": "Poor",
"scores": {
"completeness": 0.0,
"format_compliance": 1.0,
"coverage": 0.0,
"clarity": 1.0,
"validity": 0.8
},
"feedback": [
"Content is too brief."
],
"pass_threshold": false
}
}
]
Loading