j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
---
name: ff frame taxonomy v1
use_case: FTC-v1 — maps narrative elements to Entman frame functions (problem/causal/moral/solution).
author: abilzerian
version: 0.3.0
---
{% set input_text     = params.input_text %}
{% set taxonomy       = ["Security","Morality","Economic","Legitimacy","Victimhood","Patriotism",
                         "Technocratic","Catastrophic","Human-interest"] %}
SYSTEM:
FTC-v1 — maps narrative elements to **Entman frame functions** (problem/causal/moral/solution).

### TEXT
"""{{ util.trunc(input_text,160) }}"""

### TASK
1. Extract ≥ 3 key propositions.  
2. Assign **primary frame** from taxonomy; tag sub-frames.  
3. Output Entman function mapping.

### OUTPUT (JSON-5)
{
  "propositions":[{"text":"…","primary_frame":"Security","sub_frames":["Patriotism"]}],
  "dominant_frame":"Security",
  "entman_map":{"problem":"…","cause":"…","moral":"…","solution":"…"}
}
---
name: ms systematic review extractor v1
use_case: SR-DE-v1 — fills PRISMA-2020 extraction table fields.
author: abilzerian
version: 0.3.0
---
{% set pdf_text = params.pdf_text %}
{% set prisma_item = params.prisma_item %}

SYSTEM:
SR-DE-v1 — fills **PRISMA-2020 extraction table** fields.

### TASK
1. Locate Methods & Results sections; regex pull study design, n, effect size.  
2. Map risk-of-bias domains (RoB-2).  
3. Flag missing PRISMA items.

### OUTPUT (JSON-5)
{
  "extracted": {"design": "RCT", "n": 124, "effect": "RR 0.78 (CI 0.60-0.98)"},
  "rob_domains": {"randomisation": "Low", "blinding": "Some concerns"},
  "prisma_missing": ["Registration", "Funding"]
}
---
name: nrf forecast v1
use_case: NRF-v1 — couples JOWUA diffusion model with IC “6-pack of factors”.
author: abilzerian
version: 0.3.0
---
{% set narrative_text  = params.narrative_text %}
{% set target_zones    = params.target_zones %}
{% set past_engagement = params.past_engagement %}
{% set forecast_weeks  = params.forecast_weeks | default(4) %}

SYSTEM:
NRF-v1 — couples JOWUA diffusion model with IC “6-pack of factors”.

### NARRATIVE
“{{ narrative_text | truncate(140) }}”

### TARGET ZONES
{{ target_zones | join(", ") }}   Forecast: {{ forecast_weeks }} w

### TASK
1. Vectorise narrative; compute *Resonance R* for each zone (0-1).  
2. Regress against past engagement (β).  
3. Predict share-rate & half-life.

### OUTPUT (JSON-5)
{
  "zone_metrics":[
     {"zone":"CZ-A","R":0.73,"pred_share_pct":12.4,"half_life_h":38},
     …
  ],
  "overall_risk":"High|Med|Low"
}
{%- if tools %}
    {{- '
system\n' }}
    {%- if messages[0]['role'] == 'system' %}
        {{- messages[0]['content'] }}
    {%- else %}
        {{- '' }}
    {%- endif %}
    {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
    {%- for tool in tools %}
        {{- "\n" }}
        {{- tool | tojson }}
    {%- endfor %}
    {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>
\n" }}
{%- else %}
    {%- if messages[0]['role'] == 'system' %}
        {{- '
system\n' + messages[0]['content'] + '
\n' }}
    {%- else %}
        {{- '
system\nPlease reason step by step, and put your final answer within \\boxed{}.
\n' }}
    {%- endif %}
{%- endif %}
{%- for message in messages %}
    {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
        {{- '
' + message.role + '\n' + message.content + '
' + '\n' }}
    {%- elif message.role == "assistant" %}
        {{- '
' + message.role }}
        {%- if message.content %}
            {{- '\n' + message.content }}
        {%- endif %}
        {%- for tool_call in message.tool_calls %}
            {%- if tool_call.function is defined %}
                {%- set tool_call = tool_call.function %}
            {%- endif %}
            {{- '\n<tool_call>\n{"name": "' }}
            {{- tool_call.name }}
            {{- '", "arguments": ' }}
            {{- tool_call.arguments | tojson }}
            {{- '}\n</tool_call>' }}
        {%- endfor %}
        {{- '
\n' }}
    {%- elif message.role == "tool" %}
        {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
            {{- '
user' }}
        {%- endif %}
        {{- '\n<tool_response>\n' }}
        {{- message.content }}
        {{- '\n</tool_response>' }}
        {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
            {{- '
\n' }}
        {%- endif %}
    {%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
    {{- '
assistant\n' }}
{%- endif %}
[gMASK]<sop>{%- if tools -%}
你是一个名为 ChatGLM 的人工智能助手。你是基于智谱 AI 公司训练的语言模型 GLM-4 模型开发的，你的任务是针对用户的问题和要求提供适当的答复和支持。

# 可用工具

{% for tool in tools %}{%- set function = tool.function if tool.get("function") else tool %}

## {{ function.name }}

{{ function | tojson(indent=4, ensure_ascii=False) }}
在调用上述函数时，请使用 Json 格式表示调用的参数。{%- endfor %}{%- endif -%}{%- for msg in messages %}{%- if msg.role == 'system' %}

{{ msg.content }}{%- endif %}{%- endfor %}{%- for message in messages if message.role != 'system' %}{%- set role = message['role'] %}{%- set content = message['content'] %}{%- set visible = content.split('</think>')[-1].strip() %}{%- set meta = message.get("metadata", "") %}{%- if role == 'user' %}

{{ visible }}{%- elif role == 'assistant' and not meta %}

{{ visible }}{%- elif role == 'assistant' and meta %}
{{ meta }} 
{{ visible }}{%- elif role == 'observation' %}

{{ visible }}{%- endif %}{%- endfor %}{% if add_generation_prompt %}
{% endif %}
{% for message in messages %}{% set role = message['role'] | lower %}{% if role == 'user' %}{% set role = 'HUMAN' %}{% endif %}{% set role = role | upper %}{{ '<role>' + role + '</role>' + message['content'] }}{% endfor %}{% if add_generation_prompt %}{{ '<role>ASSISTANT</role>' }}{% endif %}