Golden Dataset Curation
Curate high-quality documents for the golden dataset with multi-agent validation
Overview
This skill provides patterns and workflows for adding new documents to the golden dataset with thorough quality analysis. It complements golden-dataset-management which handles backup/restore.
When to use this skill:
- Adding new documents to the golden dataset
- Classifying content types and difficulty levels
- Generating test queries for new documents
- Running multi-agent quality analysis
Content Types
| Type |
Description |
Quality Focus |
article |
Technical articles, blog posts |
Depth, accuracy, actionability |
tutorial |
Step-by-step guides |
Completeness, clarity, code quality |
research_paper |
Academic papers, whitepapers |
Rigor, citations, methodology |
documentation |
API docs, reference materials |
Accuracy, completeness, examples |
video_transcript |
Transcribed video content |
Structure, coherence, key points |
code_repository |
README, code analysis |
Code quality, documentation |
Difficulty Levels
| Level |
Semantic Complexity |
Expected Score |
Characteristics |
| trivial |
Direct keyword match |
>0.85 |
Technical terms, exact phrases |
| easy |
Common synonyms |
>0.70 |
Well-known concepts, slight variations |
| medium |
Paraphrased intent |
>0.55 |
Conceptual queries, multi-topic |
| hard |
Multi-hop reasoning |
>0.40 |
Cross-domain, comparative analysis |
| adversarial |
Edge cases |
Graceful degradation |
Robustness tests, off-domain |
Quality Dimensions
| Dimension |
Weight |
Perfect |
Acceptable |
Failing |
| Accuracy |
0.25 |
0.95-1.0 |
0.70-0.94 |
<0.70 |
| Coherence |
0.20 |
0.90-1.0 |
0.60-0.89 |
<0.60 |
| Depth |
0.25 |
0.90-1.0 |
0.55-0.89 |
<0.55 |
| Relevance |
0.30 |
0.95-1.0 |
0.70-0.94 |
<0.70 |
Evaluation focuses:
- Accuracy: Technical correctness, code validity, up-to-date info
- Coherence: Logical structure, clear flow, consistent terminology
- Depth: Comprehensive coverage, edge cases, appropriate detail
- Relevance: Alignment with AI/ML, backend, frontend, DevOps domains
Multi-Agent Pipeline
INPUT: URL/Content
|
v
+------------------+
| FETCH AGENT | Extract structure, detect type
+--------+---------+
|
v
+-----------------------------------------------+
| PARALLEL ANALYSIS AGENTS |
| Quality | Difficulty | Domain | Query Gen |
+-----------------------------------------------+
|
v
+------------------+
| CONSENSUS | Weighted score + confidence
| AGGREGATOR | -> include/review/exclude
+--------+---------+
|
v
+------------------+
| USER APPROVAL | Show scores, confirm
+--------+---------+
|
v
OUTPUT: Curated document entry
Decision Thresholds
| Quality Score |
Confidence |
Decision |
| >= 0.75 |
>= 0.70 |
include |
| >= 0.55 |
any |
review |
| < 0.55 |
any |
exclude |
Quality Thresholds
# Recommended thresholds for golden dataset inclusion
minimum_quality_score: 0.70
minimum_confidence: 0.65
required_tags: 2 # At least 2 domain tags
required_queries: 3 # At least 3 test queries
Coverage Balance Guidelines
Maintain balanced coverage across:
- Content types: Don't over-index on articles
- Difficulty levels: Need trivial AND hard queries
- Domains: Spread across AI/ML, backend, frontend, etc.
Duplicate Prevention Checklist
Before adding:
- Check URL against existing
source_url_map.json
- Run semantic similarity against existing document embeddings
- Warn if >80% similar to existing document
Provenance Tracking
Always record:
- Source URL (canonical)
- Curation date
- Agent scores (for audit trail)
- Langfuse trace ID
Langfuse Integration
Trace Structure
trace = langfuse.trace(
name="golden-dataset-curation",
metadata={"source_url": url, "document_id": doc_id}
)
# Log individual dimension scores
trace.score(name="accuracy", value=0.85)
trace.score(name="coherence", value=0.90)
trace.score(name="depth", value=0.78)
trace.score(name="relevance", value=0.92)
# Final aggregated score
trace.score(name="quality_total", value=0.87)
trace.event(name="curation_decision", metadata={"decision": "include"})
Managed Prompts
| Prompt Name |
Purpose |
golden-content-classifier |
Classify content_type |
golden-difficulty-classifier |
Assign difficulty |
golden-domain-tagger |
Extract tags |
golden-query-generator |
Generate test queries |
References
For detailed implementation patterns, see:
references/selection-criteria.md - Content type classification, difficulty stratification, quality evaluation dimensions, and best practices
references/annotation-patterns.md - Multi-agent pipeline architecture, agent specifications, consensus aggregation logic, and Langfuse integration
Related Skills
golden-dataset-management - Backup/restore operations
golden-dataset-validation - Validation rules and checks
langfuse-observability - Tracing patterns
pgvector-search - Duplicate detection
Version: 1.0.0 (December 2025)
Issue: #599
Capability Details
content-classification
Keywords: content type, classification, document type, golden dataset
Solves:
- Classify document content types for golden dataset
- Categorize entries by domain and purpose
- Identify content requiring special handling
difficulty-stratification
Keywords: difficulty, stratification, complexity level, challenge rating
Solves:
- Assign difficulty levels to golden dataset entries
- Ensure balanced difficulty distribution
- Identify edge cases and challenging examples
quality-evaluation
Keywords: quality, evaluation, quality dimensions, quality criteria
Solves:
- Evaluate entry quality against defined criteria
- Score entries on multiple quality dimensions
- Identify entries needing improvement
multi-agent-analysis
Keywords: multi-agent, parallel analysis, consensus, agent evaluation
Solves:
- Run parallel agent evaluations on entries
- Aggregate consensus from multiple analysts
- Resolve disagreements in classifications
1---2name: golden-dataset-curation3description: Use when creating or improving golden datasets for AI evaluation. Defines quality criteria, curation workflows, and multi-agent analysis patterns for test data.4---5
6# Golden Dataset Curation
7
8**Curate high-quality documents for the golden dataset with multi-agent validation**
9
10## Overview
11
12This skill provides patterns and workflows for **adding new documents** to the golden dataset with thorough quality analysis. It complements `golden-dataset-management` which handles backup/restore.
13
14**When to use this skill:**
15- Adding new documents to the golden dataset
16- Classifying content types and difficulty levels
17- Generating test queries for new documents
18- Running multi-agent quality analysis
19
20---
21
22## Content Types
23
24| Type | Description | Quality Focus |
25|------|-------------|---------------|
26| `article` | Technical articles, blog posts | Depth, accuracy, actionability |
27| `tutorial` | Step-by-step guides | Completeness, clarity, code quality |
28| `research_paper` | Academic papers, whitepapers | Rigor, citations, methodology |
29| `documentation` | API docs, reference materials | Accuracy, completeness, examples |
30| `video_transcript` | Transcribed video content | Structure, coherence, key points |
31| `code_repository` | README, code analysis | Code quality, documentation |
32
33---
34
35## Difficulty Levels
36
37| Level | Semantic Complexity | Expected Score | Characteristics |
38|-------|---------------------|----------------|-----------------|
39| **trivial** | Direct keyword match | >0.85 | Technical terms, exact phrases |
40| **easy** | Common synonyms | >0.70 | Well-known concepts, slight variations |
41| **medium** | Paraphrased intent | >0.55 | Conceptual queries, multi-topic |
42| **hard** | Multi-hop reasoning | >0.40 | Cross-domain, comparative analysis |
43| **adversarial** | Edge cases | Graceful degradation | Robustness tests, off-domain |
44
45---
46
47## Quality Dimensions
48
49| Dimension | Weight | Perfect | Acceptable | Failing |
50|-----------|--------|---------|------------|---------|
51| **Accuracy** | 0.25 | 0.95-1.0 | 0.70-0.94 | <0.70 |
52| **Coherence** | 0.20 | 0.90-1.0 | 0.60-0.89 | <0.60 |
53| **Depth** | 0.25 | 0.90-1.0 | 0.55-0.89 | <0.55 |
54| **Relevance** | 0.30 | 0.95-1.0 | 0.70-0.94 | <0.70 |
55
56**Evaluation focuses:**
57- **Accuracy:** Technical correctness, code validity, up-to-date info
58- **Coherence:** Logical structure, clear flow, consistent terminology
59- **Depth:** Comprehensive coverage, edge cases, appropriate detail
60- **Relevance:** Alignment with AI/ML, backend, frontend, DevOps domains
61
62---
63
64## Multi-Agent Pipeline
65
66```
67INPUT: URL/Content
68 |
69 v
70+------------------+
71| FETCH AGENT | Extract structure, detect type
72+--------+---------+
73 |
74 v
75+-----------------------------------------------+
76| PARALLEL ANALYSIS AGENTS |
77| Quality | Difficulty | Domain | Query Gen |
78+-----------------------------------------------+
79 |
80 v
81+------------------+
82| CONSENSUS | Weighted score + confidence
83| AGGREGATOR | -> include/review/exclude
84+--------+---------+
85 |
86 v
87+------------------+
88| USER APPROVAL | Show scores, confirm
89+--------+---------+
90 |
91 v
92OUTPUT: Curated document entry
93```
94
95### Decision Thresholds
96
97| Quality Score | Confidence | Decision |
98|---------------|------------|----------|
99| >= 0.75 | >= 0.70 | **include** |
100| >= 0.55 | any | **review** |
101| < 0.55 | any | **exclude** |
102
103---
104
105## Quality Thresholds
106
107```yaml
108# Recommended thresholds for golden dataset inclusion
109minimum_quality_score: 0.70
110minimum_confidence: 0.65
111required_tags: 2 # At least 2 domain tags
112required_queries: 3 # At least 3 test queries
113```
114
115---
116
117## Coverage Balance Guidelines
118
119Maintain balanced coverage across:
120- **Content types:** Don't over-index on articles
121- **Difficulty levels:** Need trivial AND hard queries
122- **Domains:** Spread across AI/ML, backend, frontend, etc.
123
124### Duplicate Prevention Checklist
125
126Before adding:
1271. Check URL against existing `source_url_map.json`
1282. Run semantic similarity against existing document embeddings
1293. Warn if >80% similar to existing document
130
131### Provenance Tracking
132
133Always record:
134- Source URL (canonical)
135- Curation date
136- Agent scores (for audit trail)
137- Langfuse trace ID
138
139---
140
141## Langfuse Integration
142
143### Trace Structure
144
145```python
146trace = langfuse.trace(
147 name="golden-dataset-curation",
148 metadata={"source_url": url, "document_id": doc_id}
149)
150
151# Log individual dimension scores
152trace.score(name="accuracy", value=0.85)
153trace.score(name="coherence", value=0.90)
154trace.score(name="depth", value=0.78)
155trace.score(name="relevance", value=0.92)
156
157# Final aggregated score
158trace.score(name="quality_total", value=0.87)
159trace.event(name="curation_decision", metadata={"decision": "include"})
160```
161
162### Managed Prompts
163
164| Prompt Name | Purpose |
165|-------------|---------|
166| `golden-content-classifier` | Classify content_type |
167| `golden-difficulty-classifier` | Assign difficulty |
168| `golden-domain-tagger` | Extract tags |
169| `golden-query-generator` | Generate test queries |
170
171---
172
173## References
174
175For detailed implementation patterns, see:
176
177- `references/selection-criteria.md` - Content type classification, difficulty stratification, quality evaluation dimensions, and best practices
178- `references/annotation-patterns.md` - Multi-agent pipeline architecture, agent specifications, consensus aggregation logic, and Langfuse integration
179
180---
181
182## Related Skills
183
184- `golden-dataset-management` - Backup/restore operations
185- `golden-dataset-validation` - Validation rules and checks
186- `langfuse-observability` - Tracing patterns
187- `pgvector-search` - Duplicate detection
188
189---
190
191**Version:** 1.0.0 (December 2025)
192**Issue:** #599
193
194## Capability Details
195
196### content-classification
197**Keywords:** content type, classification, document type, golden dataset
198**Solves:**
199- Classify document content types for golden dataset
200- Categorize entries by domain and purpose
201- Identify content requiring special handling
202
203### difficulty-stratification
204**Keywords:** difficulty, stratification, complexity level, challenge rating
205**Solves:**
206- Assign difficulty levels to golden dataset entries
207- Ensure balanced difficulty distribution
208- Identify edge cases and challenging examples
209
210### quality-evaluation
211**Keywords:** quality, evaluation, quality dimensions, quality criteria
212**Solves:**
213- Evaluate entry quality against defined criteria
214- Score entries on multiple quality dimensions
215- Identify entries needing improvement
216
217### multi-agent-analysis
218**Keywords:** multi-agent, parallel analysis, consensus, agent evaluation
219**Solves:**
220- Run parallel agent evaluations on entries
221- Aggregate consensus from multiple analysts
222- Resolve disagreements in classifications