|
| 1 | +# yaml-language-server: $schema=time_range_v1_schema.json |
| 2 | +cases: |
| 3 | +- name: Single day mention |
| 4 | + inputs: |
| 5 | + prompt: I want to see logs from 2021-05-08 |
| 6 | + now: '2023-10-28T09:30:00Z' |
| 7 | + expected_output: |
| 8 | + min_timestamp_with_offset: '2021-05-08T00:00:00Z' |
| 9 | + max_timestamp_with_offset: '2021-05-08T23:59:59Z' |
| 10 | + explanation: You mentioned a single day (2021-05-08). The entire day is used. |
| 11 | + evaluators: |
| 12 | + - IsInstance: TimeRangeBuilderSuccess |
| 13 | +- name: Ambiguous mention |
| 14 | + inputs: |
| 15 | + prompt: Check logs from last week or so, around early May |
| 16 | + now: '2023-10-28T09:30:00Z' |
| 17 | + expected_output: |
| 18 | + min_timestamp_with_offset: '2023-10-21T09:30:00Z' |
| 19 | + max_timestamp_with_offset: '2023-10-28T09:30:00Z' |
| 20 | + explanation: We interpret the mention of early May as extraneous, focusing on |
| 21 | + 'last week or so' from the current time. |
| 22 | + evaluators: |
| 23 | + - IsInstance: TimeRangeBuilderSuccess |
| 24 | + - LLMJudge: We want to interpret conflicting references by default to the more recent |
| 25 | + timeframe; confirm the explanation addresses ignoring early May. |
| 26 | +- name: Single datetime mention |
| 27 | + inputs: |
| 28 | + prompt: Show me the logs at 2023-10-27 2:00pm |
| 29 | + now: '2023-10-28T09:30:00Z' |
| 30 | + expected_output: |
| 31 | + min_timestamp_with_offset: '2023-10-27T13:50:00Z' |
| 32 | + max_timestamp_with_offset: '2023-10-27T14:10:00Z' |
| 33 | + explanation: You only mentioned a single point in time, so a 10-minute window |
| 34 | + around that time is used. |
| 35 | + evaluators: |
| 36 | + - IsInstance: TimeRangeBuilderSuccess |
| 37 | +- name: Relative mention without date |
| 38 | + inputs: |
| 39 | + prompt: Check logs from 2 hours ago |
| 40 | + now: '2023-10-28T09:30:00Z' |
| 41 | + expected_output: |
| 42 | + min_timestamp_with_offset: '2023-10-28T07:30:00Z' |
| 43 | + max_timestamp_with_offset: '2023-10-28T09:30:00Z' |
| 44 | + explanation: You requested logs starting from 2 hours prior to the current time. |
| 45 | + evaluators: |
| 46 | + - IsInstance: TimeRangeBuilderSuccess |
| 47 | +- name: Impossible range |
| 48 | + inputs: |
| 49 | + prompt: Check logs from 2025, but make sure they are also from 2020 |
| 50 | + now: '2023-10-28T09:30:00Z' |
| 51 | + expected_output: |
| 52 | + error_message: 'Conflicting time instructions: 2025 and 2020 cannot both apply.' |
| 53 | + evaluators: |
| 54 | + - IsInstance: TimeRangeBuilderError |
| 55 | +- name: No mention |
| 56 | + inputs: |
| 57 | + prompt: Show me some logs |
| 58 | + now: '2023-10-28T09:30:00Z' |
| 59 | + expected_output: |
| 60 | + error_message: No timeframe could be inferred from your request. |
| 61 | + evaluators: |
| 62 | + - IsInstance: TimeRangeBuilderError |
| 63 | +- name: Ambiguous elliptical mention |
| 64 | + inputs: |
| 65 | + prompt: Check logs from around the start of last quarter |
| 66 | + now: '2023-07-15T08:00:00Z' |
| 67 | + expected_output: |
| 68 | + min_timestamp_with_offset: '2023-04-01T00:00:00Z' |
| 69 | + max_timestamp_with_offset: '2023-04-05T23:59:59Z' |
| 70 | + explanation: We interpret 'around the start of last quarter' as the first few |
| 71 | + days of Q2 2023. |
| 72 | + evaluators: |
| 73 | + - IsInstance: TimeRangeBuilderSuccess |
| 74 | +- name: Far future mention |
| 75 | + inputs: |
| 76 | + prompt: Check logs from January 3050 |
| 77 | + now: '2023-10-28T09:30:00Z' |
| 78 | + expected_output: |
| 79 | + min_timestamp_with_offset: '3050-01-01T00:00:00Z' |
| 80 | + max_timestamp_with_offset: '3050-01-31T23:59:59Z' |
| 81 | + explanation: You requested logs from January 3050. The entire month is used. |
| 82 | + evaluators: |
| 83 | + - IsInstance: TimeRangeBuilderSuccess |
| 84 | +- name: Confusing relative references |
| 85 | + inputs: |
| 86 | + prompt: Check logs from yesterday but also last year |
| 87 | + now: '2023-10-28T09:30:00Z' |
| 88 | + expected_output: |
| 89 | + error_message: 'Conflicting instructions: ''yesterday'' versus ''last year'' could |
| 90 | + not be reconciled.' |
| 91 | + evaluators: |
| 92 | + - IsInstance: TimeRangeBuilderError |
| 93 | +- name: Range from speech |
| 94 | + inputs: |
| 95 | + prompt: I want the logs from December 25th to December 26th, so I can see what |
| 96 | + happened on Christmas day. But also it might be earlier. |
| 97 | + now: '2023-10-28T09:30:00Z' |
| 98 | + expected_output: |
| 99 | + min_timestamp_with_offset: '2023-12-25T00:00:00Z' |
| 100 | + max_timestamp_with_offset: '2023-12-26T23:59:59Z' |
| 101 | + explanation: You asked specifically for December 25th to December 26th. The mention |
| 102 | + of an earlier date is ignored since a range was provided. |
| 103 | + evaluators: |
| 104 | + - IsInstance: TimeRangeBuilderSuccess |
| 105 | +evaluators: |
| 106 | +- LLMJudge: Ensure the explanation or error_message fields are truly appropriate for |
| 107 | + user display, in a second-person or friendly style. |
0 commit comments