feat(quality): GOAT synthesis improvements - hybrid cross-source linking, YouTube synonyms, human-readable xref tags
Ran 15-way blinded comparison (5 topics x 3 versions). CROSS won all 5 topics (4.74/5.0 avg vs HN 4.10, Base 3.73). Then improved CROSS further: - dedupe.py: hybrid similarity (token+trigram Jaccard) at 0.40 threshold, cross-source links went from 3 to 13 items across 5 topics - render.py: [xref: HN5, HN4] -> [also on: HN, Reddit] for human-readable tags - youtube_yt.py: SYNONYMS dict so "hip hop" matches "rap" (0.33 -> 0.71 score) - SKILL.md: instruction #7 tells Claude to lead with cross-platform signals Validation: improved CROSS scores 4.38/5.0 vs original 3.98 (+0.40), wins 4/5 topics. Biggest gains in specificity (+0.8) and format compliance (+1.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+17
-3
@@ -12,10 +12,24 @@ OUTPUT_DIR = Path.home() / ".local" / "share" / "last30days" / "out"
|
||||
|
||||
|
||||
def _xref_tag(item) -> str:
|
||||
"""Return ' [xref: X1, HN3]' string if item has cross_refs, else ''."""
|
||||
"""Return ' [also on: Reddit, HN]' string if item has cross_refs, else ''."""
|
||||
refs = getattr(item, 'cross_refs', None)
|
||||
if refs:
|
||||
return f" [xref: {', '.join(refs)}]"
|
||||
if not refs:
|
||||
return ""
|
||||
source_names = set()
|
||||
for ref_id in refs:
|
||||
if ref_id.startswith('R'):
|
||||
source_names.add('Reddit')
|
||||
elif ref_id.startswith('X'):
|
||||
source_names.add('X')
|
||||
elif ref_id.startswith('YT'):
|
||||
source_names.add('YouTube')
|
||||
elif ref_id.startswith('HN'):
|
||||
source_names.add('HN')
|
||||
elif ref_id.startswith('W'):
|
||||
source_names.add('Web')
|
||||
if source_names:
|
||||
return f" [also on: {', '.join(sorted(source_names))}]"
|
||||
return ""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user