Expand description
System prompt generation (EN/CN). System prompt construction using composable fragments.
The primary entry points are:
build_system_prompt— backward-compatible English prompt.build_system_prompt_cn— prompt with China-specific network hints.build_system_prompt_with_fragments— full fragment-based assembly.
§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.