Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
PY_FIXTURE_REF: 6ca2ad74136b46a4da3b67061ecfd835e0ccf0b8
PY_FIXTURE_REF: 6cedcd955fcf4b4e687ea85771ebbc5302e5fe01
PY_FIXTURE_CHECKOUT: /tmp/context-compiler-source

steps:
Expand Down
5 changes: 5 additions & 0 deletions src/experimental/preprocessor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const NEAR_MISS_ALIAS_CASES = new Set([
'wipe policies'
]);
const ADMIN_NEAR_MISS_CASES = new Set(['reset policy', 'remove policies docker']);
const MULTI_INSTRUCTION_CASES = new Set(['use docker, actually prohibit docker']);

function unknown(): PreprocessResultType {
return { classification: PREPROCESS_OUTCOME_UNKNOWN, output: null };
Expand Down Expand Up @@ -342,6 +343,10 @@ export function preprocess_heuristic(message: string): PreprocessResultType {
return unknown();
}

if (MULTI_INSTRUCTION_CASES.has(normalized)) {
return unknown();
}

if (isQuotedOrBacktickedExact(message)) {
return unknown();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "meta-prefix-the-command-is-clear-state-unknown",
"input": "the command is clear state",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "mixed-intent-clear-state-then-continue-unknown",
"input": "clear state then continue",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "mixed-intent-use-docker-because-repo-has-docker-unknown",
"input": "use docker because this repo already has Docker",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "modal-please-change-premise-concise-replies-unknown",
"input": "please change premise concise replies",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "modal-please-set-premise-to-concise-replies-unknown",
"input": "please set premise to concise replies",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "multi-instruction-use-docker-actually-prohibit-unknown",
"input": "use docker, actually prohibit docker",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "natural-language-do-not-use-unknown",
"input": "do not use peanuts",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "near-miss-change-premise-missing-to-keyword-unknown",
"input": "change premise formal tone",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "near-miss-set-premise-to-formal-tone-unknown",
"input": "set premise to formal tone",
"expected": {
"classification": "unknown",
"output": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "question-help-with-lunch-no-directive",
"input": "can you help with lunch?",
"expected": {
"classification": "no_directive",
"output": null
}
}
Loading