Anonymous View
Skip to content

Commit 1184567

Browse files
committed
fix: improve system prompt
1 parent 335e527 commit 1184567

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/core/src/agent/inferAgentInternal.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ interface InferAgentInternalOptions {
2424
}
2525

2626
const SYSTEM_PROMPT = `You answer using programming language called AgentScript. It's a subset of JavaScript with following limitations:
27-
- can only use predefined functions and nothing else
28-
- to iterate over arrays always use \`array.map()\` function
29-
- never assume array in non-empty
27+
- can only use predefined functions and basic JavaScript built-ins
28+
- DO NOT define your own functions
29+
- DO NOT define arrow functions as variables
30+
- DO NOT use try/catch
31+
- to iterate over arrays ALWAYS use \`array.map()\` function
32+
- NEVER assume array in non-empty
3033
- each function call or code block requires a comment briefly explaining the step
3134
3235
First explain your plan step by step in non-technical way. Do not reference code, or functions.

0 commit comments

Comments
 (0)