Skip to main content

Generate Dataset

Start an asynchronous synthetic dataset generation pipeline using the Knowledgator TypeScript SDK.


Example Usage​

import { createClient } from '@knowledgator/typescript-sdk';

const kg = createClient('YOUR_API_KEY');

const pipeline = await kg.datasets.generate({
name: "financial_filings_ner",
prompt: "SEC earnings release snippets with entity annotations",
type: "ner",
num_samples: 500,
entity_types: ["revenue", "operating_income", "reporting_date"]
});

console.log(`Pipeline started with ID: ${pipeline.pipeline_id}`);

Expected Output​

Pipeline started with ID: e128a1c4-9844-4899-88c2-3e289bfca721

Response Object Structure​

{
"pipeline_id": "e128a1c4-9844-4899-88c2-3e289bfca721",
"status": "pending",
"name": "financial_filings_ner",
"num_samples": 500,
"message": "Dataset generation pipeline started successfully."
}