Skip to main content

Documentation Index

Fetch the complete documentation index at: https://chainlit-5-wd-prompt.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

A dataset is an essential component in refining your LLM application’s performance. It comprises a collection of input/output samples for conducting tests and validations. Our SDK facilitates dataset management, enabling both manual handling and the transformation of existing steps into actionable samples. This feature is designed for iterative development and fine-tuning of your application.

Create a dataset

dataset = await sdk.api.create_dataset(
  name="Foo", description="A dataset to store samples.", metadata={"isDemo": True}
)

Create a dataset item

dataset_item = await dataset.create_dataset_item(
  dataset_id=dataset.id,
  input={ "content": "What is literal?" },
  output={ "content": "Literal is an observability solution." }
)

step_item = await dataset.add_step_to_dataset(dataset.id, step.id)

Get a dataset

dataset = await sdk.api.get_dataset(id="dataset_id")

for item in dataset.items:
  pass