generate-rag-dataset
/generate-rag-dataset
Generuje syntetyczny zbiór ewaluacyjny z bazy wiedzy RAG: zróżnicowane pary pytanie-odpowiedź z kontekstem, gotowe do eksperymentów w LangWatch i importu na platformę.
- Autor
- langwatch ↗
- Repozytorium
- langwatch ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Generuje syntetyczny zbiór ewaluacyjny z bazy wiedzy RAG: zróżnicowane pary pytanie-odpowiedź z kontekstem, gotowe do eksperymentów w LangWatch i importu na platformę.
Oryginalny opis (EN)
Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.
Jak działa
- Step 1: Analyze the Knowledge Base
- Step 2: Generate Diverse Question Types
- Step 3: Include Context Per Row
- Step 4: Export Formats
- Step 5: Validate Dataset Quality
- Common Mistakes
Podgląd SKILL.md
---
name: generate-rag-dataset
description: Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.
license: MIT
compatibility: Requires LangWatch SDK. Works with Claude Code and similar coding agents.
metadata:
category: recipe
---
# Generate a RAG Evaluation Dataset
This recipe analyzes your RAG knowledge base and generates a comprehensive Q\&A evaluation dataset.
## Step 1: Analyze the Knowledge Base
Read the codebase to find the knowledge base:
- Document files (PDFs, markdown, text files)
- Database schemas (if documents are stored in a DB)
- Vector store configuration (what's being embedded)
- Chunking strategy (how documents are split)
Read every document you can access. Understand:
- What topics does the knowledge base cover?
- What's the depth of information?
- What terminology is used?
- What are the boundaries (what's NOT covered)?
## Step 2: Generate Diverse Question Types
Create questions across these categories:
### Factual Recall
Direct questions answerable from a single passage:
- "What is the recommended threshold for X?"
- "When should Y be applied?"
### Multi-Hop Reasoning
Questions requiring information from multiple passages:
- "Given condition A and condition B, what should be done?"
- "How do X and Y interact when Z occurs?"
### Comparison
Questions comparing concepts within the knowledge base:
- "What's the difference between approach A and approach B?"
- "When should you use X instead of Y?"
### Edge Cases
Questions about boundary conditions or unusual scenarios:
- "What happens if the measurement is outside normal range?"
- "What if two recommendations conflict?"
### Negative Cases
Questions about topics NOT covered by the knowledge base:
- "Does the system support Z?" (when it doesn't)
- Questions requiring external knowledge the KB doesn't have
These help test that the agent correctly says "I don't know" rather than hallucinating.
## Step 3: Include Context Per Row
For each Q\&A pair, include the relevant document chunk(s) that contain the answer. This enables:
- Platform experiments without the full RAG pipeline
- Evaluating answer quality independent of retrieval quality
- Testing with different prompts using the same retrieved context
Format:
```python
{
"input": "When should I irrigate apple orchards?",
"expected_output": "Irrigate to maintain soil moisture between 25-35 kPa...",
"context": "## Irrigation Management\nSoil moisture threshold for apple orchards: maintain between 25-35 kPa...",
"question_type": "factual_recall"
}
```
## Step 4: Export Formats
Create both:
### Python DataFrame (for SDK experiments)
```python
import pandas as pd
df = pd.DataFrame(dataset)
df.to_csv("rag_evaluation_dataset.csv", index=False)
```
### Platform-Ready CSV
Export with columns: `input`, `expected_output`, `context`, `question_type`
This can be imported directly into LangWatch platform datasets.
## Step 5: Validate Dataset Quality
Before using the dataset:
1. Check topic coverage: are all knowledge base topics represented?
2. Verify answers are actually in the context, with no hallucinated expected outputs
3. Check question diversity: not all the same type
4. Verify negative cases have appropriate "I don't know" expected outputs
5. Run a quick experiment to baseline accuracy
## Common Mistakes
- Do NOT generate questions without reading the actual knowledge base first
- Do NOT skip negative cases. Testing "I don't know" is crucial for RAG
- Do NOT use the same question pattern for every entry. Diversify types
- Do NOT forget to include the relevant context per row
- Do NOT generate expected outputs that aren't actually in the knowledge base
Wersje
W bazie nie ma innych skilli o nazwie generate-rag-dataset.
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki 1f95b6408fce (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100datasets
Generuje realistyczne syntetyczne zbiory ewaluacyjne na podstawie kodu, promptów, śladów produkcyjnych i materiałów referencyjnych, a gotowy zbiór wgrywa do LangWatch. - 100evaluate-rag
Prowadzi ocenę jakości retrieval i generowania w potoku RAG: jakość wyszukiwania, wierność i trafność odpowiedzi, syntetyczne pary pytanie-odpowiedź i optymalizacja chunkowania. - 100generate-synthetic-data
Tworzy zróżnicowane syntetyczne dane wejściowe do ewaluacji potoków LLM przez generowanie krotek według wymiarów, gdy brakuje danych rzeczywistych lub trzeba przetestować hipotezy awarii. - 100experiments
Tworzy i uruchamia eksperymenty LangWatch do testów wsadowych przed wdrożeniem: testowanie agenta na zbiorze danych, porównanie promptów i modeli, benchmark jakości, regresje i bramka jakości w CI. - 100knowledge-rag
Dodaje i aktualizuje wpisy TerMinal Knowledge Base oparte na lokalnym serwerze MCP knowledge-rag: wyszukiwanie semantyczne po dokumentach, wczytywanie URL i dokumentów oraz konfiguracja typu wpisu RAG. - 100grounded-evals
Generuje zestaw ewaluacyjny z pytaniami, odpowiedziami i cytatami z dokumentów, żeby testować systemy RAG i agentów.