Spaces:
Sleeping
Sleeping
|
Download docs/md/design/core/system_prompt.md from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 1.4 kB
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/docs/md/design/core/system_prompt.md
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/docs/md/design/core/system_prompt.md
-
curl -L -o system_prompt.md https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/docs/md/design/core/system_prompt.md
1.4 kB
Core: persona_to_system_prompt
Code: adsp/core/prompt_builder/system_prompt.py
Purpose
persona_to_system_prompt() converts a persona profile (including optional reasoning traits) into an LLM system prompt that steers voice, values, and guardrails.
Responsibilities
- Generate consistent persona “system” instructions
- Encode:
- voice/style (
style_profile) - value priorities (
value_frame) - reasoning tradeoffs (
reasoning_policies) - content guardrails (
content_filters)
- voice/style (
Public API
persona_to_system_prompt(persona: PersonaProfileModel) -> str
Input
PersonaProfileModel(seeadsp/data_pipeline/schema.py)
Output
- Multi-section system prompt string
Sections emitted
- Header: persona label and
summary_bio Voice:section (ifstyle_profilepresent)Value frame:section (ifvalue_framepresent)Reasoning policies:section (ifreasoning_policiespresent)Content filters:section (ifcontent_filterspresent)
Key dependencies / technologies
pydanticmodels fromadsp/data_pipeline/schema.py
Notes
- This function is intentionally strict about missing data: if a trait section is absent, it is omitted from the prompt instead of being fabricated.
- If the reasoning enrichment pipeline is disabled, prompts will contain only the baseline persona header unless other fields are present.