Skip to content

Commit bd8d5e1

Browse files
committed
Refactor testset management documentation by removing description parameter and updating example outputs. This enhances clarity and consistency in the Jupyter notebook and markdown files related to testset creation.
1 parent ce934da commit bd8d5e1

File tree

2 files changed

+5
-55
lines changed

2 files changed

+5
-55
lines changed

docs/docs/evaluation/evaluation-from-sdk/03-managing-testsets.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ testset = await ag.testsets.acreate(
3333
{"country": "Spain", "capital": "Madrid"}
3434
],
3535
name="Country Capitals",
36-
description="A testset of countries and their capitals",
3736
)
3837

3938
print(f"Created testset with ID: {testset.id}")
@@ -47,7 +46,6 @@ print(f"Slug: {testset.slug}")
4746
**Parameters:**
4847
- `data`: A list of dictionaries containing your test data. Each dictionary represents one testcase.
4948
- `name`: The name of your testset.
50-
- `description` (optional): A description of what this testset contains.
5149

5250
**Returns:** A `TestsetRevision` object containing:
5351
- `id`: The UUID of the created testset
@@ -62,7 +60,6 @@ print(f"Slug: {testset.slug}")
6260
"id": "01963413-3d39-7650-80ce-3ad5d688da6c",
6361
"name": "Country Capitals",
6462
"slug": "3ad5d688da6c",
65-
"description": "A testset of countries and their capitals",
6663
"data": {
6764
"testcases": [
6865
{"data": {"country": "Germany", "capital": "Berlin"}},
@@ -252,7 +249,7 @@ else:
252249
</Tabs>
253250

254251
:::tip Helper Pattern
255-
This pattern shows how you can implement your own helper functions to filter and find testsets based on custom criteria. You can extend this to search by description, tags, or other metadata fields.
252+
This pattern shows how you can implement your own helper functions to filter and find testsets based on custom criteria. You can extend this to search by tags or other metadata fields.
256253
:::
257254

258255
## Working with Test Data

examples/jupyter/evaluation/testset-management.ipynb

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -89,61 +89,14 @@
8989
"execution_count": null,
9090
"id": "e2b89655",
9191
"metadata": {},
92-
"outputs": [
93-
{
94-
"name": "stdout",
95-
"output_type": "stream",
96-
"text": [
97-
"✅ Created testset with ID: 019a11f7-b329-7d50-a256-395834f4864c\n",
98-
" Name: Country Capitals\n",
99-
" Slug: 395834f4864c\n",
100-
" Description: A testset of countries and their capitals for geography evaluation\n"
101-
]
102-
}
103-
],
104-
"source": [
105-
"# Create a testset with simple data\n",
106-
"testset = await ag.testsets.acreate(\n",
107-
" data=[\n",
108-
" {\"country\": \"Germany\", \"capital\": \"Berlin\"},\n",
109-
" {\"country\": \"France\", \"capital\": \"Paris\"},\n",
110-
" {\"country\": \"Spain\", \"capital\": \"Madrid\"},\n",
111-
" {\"country\": \"Italy\", \"capital\": \"Rome\"},\n",
112-
" {\"country\": \"Japan\", \"capital\": \"Tokyo\"},\n",
113-
" ],\n",
114-
" name=\"Country Capitals\",\n",
115-
" description=\"A testset of countries and their capitals for geography evaluation\",\n",
116-
")\n",
117-
"\n",
118-
"print(f\"✅ Created testset with ID: {testset.id}\")\n",
119-
"print(f\" Name: {testset.name}\")\n",
120-
"print(f\" Slug: {testset.slug}\")\n",
121-
"print(f\" Description: {testset.description}\")\n",
122-
"\n",
123-
"# Save the ID for later use\n",
124-
"testset_id = testset.id"
125-
]
92+
"outputs": [],
93+
"source": "# Create a testset with simple data\ntestset = await ag.testsets.acreate(\n data=[\n {\"country\": \"Germany\", \"capital\": \"Berlin\"},\n {\"country\": \"France\", \"capital\": \"Paris\"},\n {\"country\": \"Spain\", \"capital\": \"Madrid\"},\n {\"country\": \"Italy\", \"capital\": \"Rome\"},\n {\"country\": \"Japan\", \"capital\": \"Tokyo\"},\n ],\n name=\"Country Capitals\",\n)\n\nprint(f\"✅ Created testset with ID: {testset.id}\")\nprint(f\" Name: {testset.name}\")\nprint(f\" Slug: {testset.slug}\")\n\n# Save the ID for later use\ntestset_id = testset.id"
12694
},
12795
{
12896
"cell_type": "markdown",
12997
"id": "852d13a8",
13098
"metadata": {},
131-
"source": [
132-
"**Expected Output:**\n",
133-
"```\n",
134-
"✅ Created testset with ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n",
135-
" Name: Country Capitals\n",
136-
" Slug: 3ad5d688da6c\n",
137-
" Description: A testset of countries and their capitals for geography evaluation\n",
138-
"```\n",
139-
"\n",
140-
"The `create_testset` function returns a `SimpleTestset` object with the following fields:\n",
141-
"- `id`: Unique UUID for the testset\n",
142-
"- `name`: The name you provided\n",
143-
"- `slug`: A shortened identifier\n",
144-
"- `description`: Your description\n",
145-
"- `data`: The test data in a structured format\n"
146-
]
99+
"source": "**Expected Output:**\n```\n✅ Created testset with ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n Name: Country Capitals\n Slug: 3ad5d688da6c\n```\n\nThe `acreate` function returns a `TestsetRevision` object with the following fields:\n- `id`: Unique UUID for the testset\n- `name`: The name you provided\n- `slug`: A shortened identifier\n- `data`: The test data in a structured format"
147100
},
148101
{
149102
"cell_type": "markdown",
@@ -540,4 +493,4 @@
540493
},
541494
"nbformat": 4,
542495
"nbformat_minor": 5
543-
}
496+
}

0 commit comments

Comments
 (0)