System Prompts
System prompts are scripts that are executed and injected before the main prompt output.
system.*.genai.js
are considered system prompt templates- system prompts are unlisted by default
- system prompts must use the
system
instead ofscript
- system prompts are executed with the same environment as the main prompt
To use system prompts in script, populate the system
field with script identifiers.
It is also possible to populate system script by include tool names which will result in importing the tool into the script.
Parameters and variables
System also support parameters as script but the parameter names will automatically be prepended with the script id
- declare and use the parameter in the system script
- override the parameter value in the script script
Builtin System Prompts
GenAIScript comes with a number of system prompt that support features like creating files, extracting diffs or generating annotations. If unspecified, GenAIScript looks for specific keywords to activate the various system prompts.
system
Base system prompt
system.agent_docs
Agent that can query on the documentation.
system.agent_fs
Agent that can find, search or read files to accomplish tasks
system.agent_git
Agent that can query Git to accomplish tasks.
system.agent_github
Agent that can query GitHub to accomplish tasks.
system.agent_interpreter
Agent that can run code interpreters for Python, Math.
system.agent_planner
A planner agent
system.agent_user_input
Agent that can asks questions to the user.
system.agent_web
Agent that can search the web.
system.annotations
Emits annotations compatible with GitHub Actions
GitHub Actions workflows support annotations (Read more…).
system.assistant
Helpful assistant prompt.
A prompt for a helpful assistant from https://medium.com/@stunspot/omni-f3b1934ae0ea.
system.changelog
Generate changelog formatter edits
system.diagrams
Generate diagrams
system.diff
Generates concise file diffs.
system.explanations
Explain your answers
system.files
File generation
Teaches the file format supported by GenAIScripts
system.files_schema
Apply JSON schemas to generated data.
system.fs_ask_file
File Ask File
Run an LLM query against the content of a file.
- tool
fs_ask_file
: Runs a LLM query over the content of a file. Use this tool to extract information from a file.
system.fs_diff_files
File Diff Files
Tool to compute a diff betweeen two files.
- tool
fs_diff_files
: Computes a diff between two different files. Use git diff instead to compare versions of a file.
system.fs_find_files
File find files
Find files with glob and content regex.
- tool
fs_find_files
: Finds file matching a glob pattern. Use pattern to specify a regular expression to search for in the file content. Be careful about asking too many files.
system.fs_read_file
File Read File
Function to read file content as text.
- tool
fs_read_file
: Reads a file as text from the file system. Returns undefined if the file does not exist.
system.git
git read operations
Tools to query a git repository.
- tool
git_branch_default
: Gets the default branch using git. - tool
git_branch_current
: Gets the current branch using git. - tool
git_branch_list
: List all branches using git. - tool
git_diff
: Computes file diffs using the git diff command. If the diff is too large, it returns the list of modified/added files. - tool
git_list_commits
: Generates a history of commits using the git log command. - tool
git_status
: Generates a status of the repository using git. - tool
git_last_tag
: Gets the last tag using git.
system.git_diff
git diff
Tools to query a git repository.
- tool
git_diff
: Computes file diffs using the git diff command. If the diff is too large, it returns the list of modified/added files.
system.git_info
Git repository information
system.github_actions
github workflows
Queries results from workflows in GitHub actions. Prefer using dffs to compare logs.
- tool
github_actions_workflows_list
: List all github workflows. - tool
github_actions_jobs_list
: List all jobs for a github workflow run. - tool
github_actions_job_logs_get
: Download github workflow job log. If the log is too large, use ‘github_actions_job_logs_diff’ to compare logs. - tool
github_actions_job_logs_diff
: Diffs two github workflow job logs.
system.github_files
Tools to query GitHub files.
- tool
github_files_get
: Get a file from a repository. - tool
github_files_list
: List all files in a repository.
system.github_info
General GitHub information.
system.github_issues
Tools to query GitHub issues.
- tool
github_issues_list
: List all issues in a repository. - tool
github_issues_get
: Get a single issue by number. - tool
github_issues_comments_list
: Get comments for an issue.
system.github_pulls
Tools to query GitHub pull requests.
- tool
github_pulls_list
: List all pull requests in a repository. - tool
github_pulls_get
: Get a single pull request by number. - tool
github_pulls_review_comments_list
: Get review comments for a pull request.
system.math
Math expression evaluator
Register a function that evaluates math expressions
- tool
math_eval
: Evaluates a math expression. Do NOT try to compute arithmetic operations yourself, use this tool.
system.md_find_files
Tools to help with documentation tasks
- tool
md_find_files
: Get the file structure of the documentation markdown/MDX files. Retursn filename, title, description for each match. Use pattern to specify a regular expression to search for in the file content.
system.md_frontmatter
Markdown frontmatter reader
Register tool that reads the frontmatter of a markdown or MDX file.
- tool
md_read_frontmatter
: Reads the frontmatter of a markdown or MDX file.
system.meta_prompt
Tool that applies OpenAI’s meta prompt guidelines to a user prompt
Modified meta-prompt tool from https://platform.openai.com/docs/guides/prompt-generation?context=text-out.
- tool
meta_prompt
: Tool that applies OpenAI’s meta prompt guidelines to a user prompt. Modified from https://platform.openai.com/docs/guides/prompt-generation?context=text-out.
system.meta_schema
Tool that generate a valid schema for the described JSON
OpenAI’s meta schema generator from https://platform.openai.com/docs/guides/prompt-generation?context=structured-output-schema.
- tool
meta_schema
: Generate a valid JSON schema for the described JSON. Source https://platform.openai.com/docs/guides/prompt-generation?context=structured-output-schema.
system.node_info
Information about the current project
system.node_test
Tools to run node.js test script
- tool
node_test
: build and test current project usingnpm test
system.planner
Instruct to make a plan
system.python
Expert at generating and understanding Python code.
system.python_code_interpreter
Python Dockerized code execution for data analysis
- tool
python_code_interpreter_run
: Executes python 3.12 code for Data Analysis tasks in a docker container. The process output is returned. Do not generate visualizations. The only packages available are numpy===2.1.3, pandas===2.2.3, scipy===1.14.1, matplotlib===3.9.2. There is NO network connectivity. Do not attempt to install other packages or make web requests. You must copy all the necessary files or pass all the data because the python code runs in a separate container. - tool
python_code_interpreter_copy_files_to_container
: Copy files from the workspace file system to the container file system. NO absolute paths. Returns the path of each file copied in the python container. - tool
python_code_interpreter_read_file
: Reads a file from the container file system. No absolute paths.
system.python_types
Python developer that adds types.
system.retrieval_fuzz_search
Full Text Fuzzy Search
Function to do a full text fuzz search.
- tool
retrieval_fuzz_search
: Search for keywords using the full text of files and a fuzzy distance.
system.retrieval_vector_search
Embeddings Vector Search
Function to do a search using embeddings vector similarity distance.
- tool
retrieval_vector_search
: Search files using embeddings and similarity distance.
system.retrieval_web_search
Web Search
Function to do a web search.
- tool
retrieval_web_search
: Search the web for a user query using Tavily or Bing Search.
system.safety_canary_word
Canary World Prompt Leak protection
Injects a canary word into the system prompts and monitor the generated output for leaks.
system.safety_harmful_content
Safety prompt against Harmful Content: Hate and Fairness, Sexual, Violence, Self-Harm
This system script should be considered for content generation (either grounded or ungrounded), multi-turn and single-turn chats, Q&A, rewrite, and summarization scenario. See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/safety-system-message-templates.
system.safety_jailbreak
Safety script to ignore instructions in code sections.
system.safety_protected_material
Safety prompt against Protected material - Text
This system script should be considered for scenarios such as: content generation (grounded and ungrounded), multi-turn and single-turn chat, Q&A, rewrite, summarization, and code generation. See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/safety-system-message-templates.
system.safety_ungrounded_content_summarization
Safety prompt against Ungrounded Content in Summarization
Should be considered for scenarios such as summarization. See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/safety-system-message-templates.
system.safety_validate_harmful_content
Uses the content safety provider to validate the LLM output for harmful content
system.schema
JSON Schema support
system.tasks
Generates tasks
system.technical
Technical Writer
system.tool_calls
Ad hoc tool support
system.tools
Tools support
system.typescript
Expert TypeScript Developer
system.user_input
Tools to ask questions to the user.
- tool
user_input_confirm
: Ask the user to confirm a message. - tool
user_input_select
: Ask the user to select an option. - tool
user_input_text
: Ask the user to input text.
system.vision_ask_image
Vision Ask Image
Register tool that uses vision model to run a query on an image
- tool
vision_ask_image
: Use vision model to run a query on an image
system.zero_shot_cot
Zero-shot Chain Of Though
Zero-shot Chain Of Though technique. More at https://learnprompting.org/docs/intermediate/zero_shot_cot.