File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js" ;
2
+ import { Matcher } from "./sdk/matcher.js" ;
3
+
4
+ describeAccuracyTests ( [
5
+ {
6
+ prompt : "Export all the movies in 'mflix.movies' namespace." ,
7
+ expectedToolCalls : [
8
+ {
9
+ toolName : "export" ,
10
+ parameters : {
11
+ database : "mflix" ,
12
+ collection : "movies" ,
13
+ filter : Matcher . emptyObjectOrUndefined ,
14
+ limit : Matcher . undefined ,
15
+ } ,
16
+ } ,
17
+ ] ,
18
+ } ,
19
+ {
20
+ prompt : "Export all the movies in 'mflix.movies' namespace with runtime less than 100." ,
21
+ expectedToolCalls : [
22
+ {
23
+ toolName : "export" ,
24
+ parameters : {
25
+ database : "mflix" ,
26
+ collection : "movies" ,
27
+ filter : {
28
+ runtime : { $lt : 100 } ,
29
+ } ,
30
+ } ,
31
+ } ,
32
+ ] ,
33
+ } ,
34
+ {
35
+ prompt : "Export all the movie titles available in 'mflix.movies' namespace" ,
36
+ expectedToolCalls : [
37
+ {
38
+ toolName : "export" ,
39
+ parameters : {
40
+ database : "mflix" ,
41
+ collection : "movies" ,
42
+ projection : {
43
+ title : 1 ,
44
+ _id : Matcher . anyOf (
45
+ Matcher . undefined ,
46
+ Matcher . number ( ( value ) => value === 0 )
47
+ ) ,
48
+ } ,
49
+ filter : Matcher . emptyObjectOrUndefined ,
50
+ } ,
51
+ } ,
52
+ ] ,
53
+ } ,
54
+ {
55
+ prompt : "From the mflix.movies namespace, export the first 2 movies of Horror genre sorted ascending by their runtime" ,
56
+ expectedToolCalls : [
57
+ {
58
+ toolName : "export" ,
59
+ parameters : {
60
+ database : "mflix" ,
61
+ collection : "movies" ,
62
+ filter : { genres : "Horror" } ,
63
+ sort : { runtime : 1 } ,
64
+ limit : 2 ,
65
+ } ,
66
+ } ,
67
+ ] ,
68
+ } ,
69
+ ] ) ;
You can’t perform that action at this time.
0 commit comments