Skip to main content

Generate Dataset

The start_dataset_generation tool launches an asynchronous synthetic dataset generation pipeline on the Knowledgator platform.


Tool Overview​

  • Tool Name: start_dataset_generation
  • Underlying Endpoint: POST /datasets/generate/
  • SDK Methods: kg.datasets.generate (Python) / kg.datasets.generate (TypeScript)

Parameters​

ParameterTypeRequiredDescription
nameStringYesName for the dataset (alphanumeric with hyphens/underscores).
dataset_typeStringYesService task type: ner, text-classification, classification, relation-extraction, or instruct-it.
promptStringNoTask prompt describing data to generate (falls back to description/name).
descriptionStringNoOptional description of the dataset purpose and prompt specifications.
num_samplesIntegerNoNumber of samples to generate (default: 100).
domainsArray of StringsNoOptional domain context tags (e.g. ["e-commerce", "finance"]).
classesArray of StringsNoTarget classification categories (for classification tasks).
entity_typesArray of StringsNoEntity tags to annotate (for NER tasks).
json_templateStringNoOptional JSON schema template for structured generation.
ner_output_formatStringNoNER annotation format (simple or tokenized, default: simple).

Example Usage​

Natural Language Prompt to Agent​

"Generate 250 synthetic NER examples for e-commerce product reviews extracting 'product_name', 'rating', and 'defect_type'."

Tool Call Arguments​

{
"name": "start_dataset_generation",
"arguments": {
"name": "ecommerce_reviews_ner",
"dataset_type": "ner",
"prompt": "Customer product reviews annotated with product names, sentiment ratings, and defects",
"num_samples": 250,
"domains": ["e-commerce", "retail"],
"entity_types": ["product_name", "rating", "defect_type"]
}
}

Tool Response​

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