Skip to content

Commit ca636ad

Browse files
Add accuracy tests
1 parent e774083 commit ca636ad

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
2+
3+
describeAccuracyTests([
4+
{
5+
prompt: "Setup a local MongoDB cluster",
6+
expectedToolCalls: [
7+
{
8+
toolName: "atlas-local-create-deployment",
9+
parameters: {},
10+
},
11+
],
12+
},
13+
{
14+
prompt: "Create a local MongoDB instance",
15+
expectedToolCalls: [
16+
{
17+
toolName: "atlas-local-create-deployment",
18+
parameters: {},
19+
},
20+
],
21+
},
22+
{
23+
prompt: "Setup a local MongoDB database",
24+
expectedToolCalls: [
25+
{
26+
toolName: "atlas-local-create-deployment",
27+
parameters: {},
28+
},
29+
],
30+
},
31+
{
32+
prompt: "Create a local MongoDB database named 'local-mflix'",
33+
expectedToolCalls: [
34+
{
35+
toolName: "atlas-local-create-deployment",
36+
parameters: {
37+
deploymentName: "local-mflix",
38+
},
39+
},
40+
],
41+
},
42+
{
43+
prompt: "If and only if, the local MongoDB deployment 'this-database' does not exist, then create it",
44+
expectedToolCalls: [
45+
{
46+
toolName: "list-collections",
47+
parameters: {},
48+
},
49+
{
50+
toolName: "create-collection",
51+
parameters: {
52+
deploymentName: "this-database",
53+
},
54+
},
55+
],
56+
},
57+
]);
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
2+
3+
describeAccuracyTests([
4+
{
5+
prompt: "Delete the local MongoDB cluster called 'my-database'",
6+
expectedToolCalls: [
7+
{
8+
toolName: "atlas-local-delete-deployment",
9+
parameters: {
10+
deploymentName: "my-database",
11+
},
12+
},
13+
],
14+
},
15+
{
16+
prompt: "Delete the local MongoDB database called 'my-instance'",
17+
expectedToolCalls: [
18+
{
19+
toolName: "atlas-local-delete-deployment",
20+
parameters: {
21+
deploymentName: "my-instance",
22+
},
23+
},
24+
],
25+
},
26+
{
27+
prompt: "Delete all my local MongoDB instances",
28+
expectedToolCalls: [
29+
{
30+
toolName: "atlas-local-list-deployments",
31+
parameters: {},
32+
},
33+
{
34+
toolName: "atlas-local-delete-deployment",
35+
parameters: {},
36+
},
37+
],
38+
},
39+
{
40+
prompt: "If and only if, the local MongoDB deployment 'local-mflix' exists, then delete it",
41+
expectedToolCalls: [
42+
{
43+
toolName: "atlas-local-list-deployments",
44+
parameters: {},
45+
},
46+
{
47+
toolName: "atlas-local-delete-deployment",
48+
parameters: {
49+
deploymentName: "local-mflix",
50+
},
51+
},
52+
],
53+
},
54+
{
55+
prompt: "If and only if, the local MongoDB deployment 'new-database' does not exist, then create it",
56+
expectedToolCalls: [
57+
{
58+
toolName: "list-collections",
59+
parameters: {},
60+
},
61+
{
62+
toolName: "create-collection",
63+
parameters: {
64+
deploymentName: "new-database",
65+
},
66+
},
67+
],
68+
},
69+
]);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
2+
3+
describeAccuracyTests([
4+
{
5+
prompt: "What MongoDB clusters do I have running?",
6+
expectedToolCalls: [
7+
{
8+
toolName: "atlas-local-list-deployments",
9+
parameters: {},
10+
},
11+
],
12+
},
13+
{
14+
prompt: "What MongoDB databases do I have running?",
15+
expectedToolCalls: [
16+
{
17+
toolName: "atlas-local-list-deployments",
18+
parameters: {},
19+
},
20+
],
21+
},
22+
{
23+
prompt: "What MongoDB instances do I have running?",
24+
expectedToolCalls: [
25+
{
26+
toolName: "atlas-local-list-deployments",
27+
parameters: {},
28+
},
29+
],
30+
},
31+
{
32+
prompt: "How many MongoDB clusters are running?",
33+
expectedToolCalls: [
34+
{
35+
toolName: "atlas-local-list-deployments",
36+
parameters: {},
37+
},
38+
],
39+
},
40+
]);

0 commit comments

Comments
 (0)