CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/admin/llm/tests.ts
Views: 687
1
import { History } from "@cocalc/util/types/llm";
2
3
export const PROMPTS: Readonly<
4
{
5
prompt: string;
6
expected: string;
7
history?: Readonly<History>;
8
system?: string;
9
}[]
10
> = [
11
{
12
// This test checks if history and system prompt work
13
prompt: "What's my name?",
14
expected: "STEPHEN",
15
system: "Reply one word in uppercase letters.",
16
history: [
17
{ role: "user", content: "My name is Stephen" },
18
{ role: "assistant", content: "UNDERSTOOD" },
19
],
20
},
21
{ prompt: "What's 9 + 91? Reply only the number!", expected: "100" },
22
{
23
prompt: "Show me the LaTeX Formula for 'a/(b+c). Reply only the formula!",
24
expected: "frac",
25
},
26
] as const;
27
28