Skip to main content

Module prompt

Module prompt 

Source
Expand description

System prompt generation (EN/CN). System prompt construction using composable fragments.

The primary entry points are:

§Architecture

phi-agent defines application-specific fragments in the crate::prompt::fragments module. Generic fragments (environment, dynamic tools) come from agent_works::prompt. Consumers inject custom fragments via build_system_prompt_with_fragments.

Modules§

fragments
phi-agent specific prompt fragments.

Functions§

build_system_prompt
Build the general-purpose system prompt (English).
build_system_prompt_cn
Build system prompt for users in China (GFW-aware).
build_system_prompt_with_fragments
Build a system prompt from fragments.