org.llm4s.rag.evaluation.TestDataset
See theTestDataset companion object
Test dataset for RAG evaluation.
Supports loading from JSON files and generating synthetic test cases from documents using LLM.
Value parameters
- metadata
-
Additional metadata for tracking/filtering
- name
-
Name identifier for this dataset
- samples
-
The evaluation samples
Attributes
- Example
-
{ // Load from file val dataset = TestDataset.fromJsonFile("test_cases.json") // Generate synthetic test cases val generated = TestDataset.generateFromDocuments( documents = Seq("Paris is the capital of France...", "Tokyo is the capital of Japan..."), llmClient = client, samplesPerDoc = 3 ) // Save to file TestDataset.save(dataset, "output.json")}
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article