This commit is contained in:
duanfuxiang
2025-01-05 11:51:39 +08:00
commit 0c7ee142cb
215 changed files with 20611 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import Context from "../../../../core/autocomplete/context-detection";
import { FewShotExample } from "../../index";
const example: FewShotExample = {
context: Context.NumberedList,
input: `# Binary search
Binary is a sorting O(log(n)) searching algorithm. It works as follows:
1. Ensure you have a sorted array.
2. Check the middle element in the list:
3. Return the index if this is the item you are looking for.
4. <mask/>
5. Go to step 2 with the remaining left half if the item is larger than the target.
6. If there are no more elements to check, the return indicates that the item is not in the list.
`,
answer: `THOUGHT: The list contains steps of the binary search algorithm. It is missing the decision to split right if item < target.
LANGUAGE: English
ANSWER: Go to step 2 with the remaining right half if the item is smaller than the target.`,
};
export default example;