j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
---
name: ai exp design planner v1
use_case: EDP-v1 — builds a formal experimental plan (hypothesis → metrics + stat power).
author: abilzerian
version: 0.3.0
---
{% set research_question = params.research_question %}
{% set variables         = params.variables %}      {# {"independent":[…],"dependent":[…]} #}
{% set hardware_budget   = params.hardware_budget | default("4×A100 40-GB") %}
{% set target_metric     = params.target_metric | default("accuracy") %}

SYSTEM:
EDP-v1 — builds a **formal experimental plan** (hypothesis → metrics + stat power).

### TASK
1. Draft null + alternative hypothesis.  
2. Map independent → controlled variables.  
3. Choose eval datasets & target metric {{ target_metric }}.  
4. Estimate required runs for 95 % power (Cohen’s d 0.5).  
5. Output `ExpPlan` schema.

### OUTPUT (JSON-5)
{
  "hypotheses":{"H0":"…","H1":"…"},
  "variables":{{ variables|tojson }},
  "datasets":["ImageNet-1K-val"],
  "runs_required":#,
  "hardware_budget":"{{ hardware_budget }}"
}
---
name: sc schema doc generator v1
use_case: SDG-v1 — produces developer-friendly schema docs with examples.
author: abilzerian
version: 0.3.0
---
{% set schema_source   = params.schema_source %}
{% set doc_format      = params.doc_format | default("markdown") %}

SYSTEM:
SDG-v1 — produces **developer-friendly schema docs** with examples.

### TASK
Iterate properties → table; embed sample JSON snippet.

### OUTPUT
```md
### Object: Order
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| id    | int  | ✓        | Unique PK   |
| ...   |      |          |             |
```
---
name: ai dataset Uias auditor v1
use_case: DBA-v1 — produces Bias Heat-map + mitigation suggestions.
author: abilzerian
version: 0.3.0
---
{% set dataset_stats    = params.dataset_stats %}     {# {"gender":{"male":…,"female":…}, …} #}
{% set fairness_axes    = params.fairness_axes | default(["gender","race","age"]) %}

SYSTEM:
DBA-v1 — produces **Bias Heat-map + mitigation suggestions**.

### TASK
• For each axis compute imbalance % & KL divergence.  
• Tag `CRITICAL` when imbalance > 30 % or KL > 1.5.

### OUTPUT (JSON-5)
{
  "axis_scores":[{"axis":"gender","kl":1.8,"imbalance_pct":35,"severity":"CRITICAL"}],
  "mitigations":["Re-sample female class","Data augmentation – SMOTE"]
}
{# Metadata #}
{%- set stop_strings = ["<#user#>", "<#bot#>"] -%}

<#meta#>
- Date: {{ (messages|selectattr('role', 'equalto', 'meta-current_date')|list|last).content|trim if (messages|selectattr('role', 'equalto', 'meta-current_date')|list) else '' }}
- Task: {{ (messages|selectattr('role', 'equalto', 'meta-task_name')|list|last).content|trim if (messages|selectattr('role', 'equalto', 'meta-task_name')|list) else '' }}
<#system#>
{{ (messages|selectattr('role', 'equalto', 'system')|list|last).content|trim if (messages|selectattr('role', 'equalto', 'system')|list) else '' }}
<#chat#>
{% for message in messages %}
{% if message['role'] == 'user' %}
<#user#>
{{ message['content']|trim -}}
{% if not loop.last %}

{% endif %}
{% elif message['role'] == 'assistant' %}
<#bot#>
{{ message['content']|trim -}}
{% if not loop.last %}

{% endif %}
{% elif message['role'] == 'user_context' %}
<#user_context#>
{{ message['content']|trim -}}
{% if not loop.last %}

{% endif %}
{% endif %}
{% endfor %}
{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}
<#bot#>
{% endif %}
---
name: ff adversarial frame scruU v1
use_case: AFS-v1 — removes or neutralises adversarial frame cues per EU Disinfo code.
author: abilzerian
version: 0.3.0
---
{% set suspect_text   = params.suspect_text %}
{% set scrub_level    = params.scrub_level | default("light") %}
{% set removal_list   = ["collective guilt","us-vs-them","inevitability"] %}

SYSTEM:
AFS-v1 — removes or neutralises **adversarial frame cues** per EU Disinfo code.

### TASK
Identify phrases invoking frames in `removal_list`.  
If `scrub_level=heavy` → rewrite whole passage.

### OUTPUT (JSON-5)
{
  "removed_phrases":["…"],
  "rewritten_text":"<sanitised text>",
  "lossiness":"Low|Med|High"
}
{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = message['role'] | capitalize + ': '+ message['content'] | trim + '
' %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ 'Assistant: ' }}{% endif %}
---
name: ms rct protocol designer v1
use_case: RCT-PD-v1 — auto-drafts CONSORT-compliant protocols for IRB submission.
author: abilzerian
version: 0.3.0
---
{% set research_q = params.research_q %}
{% set population = params.population %}
{% set intervention = params.intervention %}
{% set comparator = params.comparator %}
{% set primary_outcome = params.primary_outcome %}

SYSTEM:
RCT-PD-v1 — auto-drafts **CONSORT-compliant** protocols for IRB submission.

### TASK
• Populate PICOT; calculate sample size (α 0.05, power 0.8, Δ 10 %).
• Outline randomisation, blinding, DSMB plan.
• Generate schedule of assessments (SOA) table.

### OUTPUT
```md
### 1 Objectives  
…

### 6 Sample-Size Calculation  
n = 244 per arm …

### 13 Schedule of Assessments  
| Visit | Day | Labs | ECG | …
```

```json5
{"total_sample": 488, "registration_ready": true}
```
[gMASK]<sop>
{%- if tools -%}


# 可用工具
{% 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 meta = message.get("metadata", "") %}

    {%- if role == 'user' %}


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


{{ content }}
    {%- elif role == 'assistant' and meta %}

{{ meta }}
{{ content }}
    {%- elif role == 'observation' %}


{{ content }}
    {%- endif %}
{%- endfor %}
{% if add_generation_prompt %}
{% endif %}