j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true, is_last_user=false) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '

' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{{ bos_token }}{{ ns.system_prompt }}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{%- set ns.is_first = false -%}{%- set ns.is_last_user = true -%}{{'<｜User｜>' + message['content'] + '<｜Assistant｜>'}}{%- endif %}{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{'<｜tool▁outputs▁end｜>'}}{%- endif %}{%- set ns.is_first = false %}{%- set ns.is_tool = false -%}{%- set ns.is_output_first = true %}{%- for tool in message['tool_calls'] %}{%- if not ns.is_first %}{%- if message['content'] is none %}{{'<｜tool▁calls▁begin｜><｜tool▁call▁begin｜>' + tool['type'] + '<｜tool▁sep｜>' + tool['function']['name'] + '
' + '```json' + '
' + tool['function']['arguments'] + '
' + '```' + '<｜tool▁call▁end｜>'}}{%- else %}{{message['content'] + '<｜tool▁calls▁begin｜><｜tool▁call▁begin｜>' + tool['type'] + '<｜tool▁sep｜>' + tool['function']['name'] + '
' + '```json' + '
' + tool['function']['arguments'] + '
' + '```' + '<｜tool▁call▁end｜>'}}{%- endif %}{%- set ns.is_first = true -%}{%- else %}{{'
' + '<｜tool▁call▁begin｜>' + tool['type'] + '<｜tool▁sep｜>' + tool['function']['name'] + '
' + '```json' + '
' + tool['function']['arguments'] + '
' + '```' + '<｜tool▁call▁end｜>'}}{%- endif %}{%- endfor %}{{'<｜tool▁calls▁end｜><｜end▁of▁sentence｜>'}}{%- endif %}{%- if message['role'] == 'assistant' and (message['tool_calls'] is not defined or message['tool_calls'] is none)%}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{'<｜tool▁outputs▁end｜>' + message['content'] + '<｜end▁of▁sentence｜>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{{content + '<｜end▁of▁sentence｜>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_last_user = false -%}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<｜tool▁outputs▁begin｜><｜tool▁output▁begin｜>' + message['content'] + '<｜tool▁output▁end｜>'}}{%- set ns.is_output_first = false %}{%- else %}{{'
<｜tool▁output▁begin｜>' + message['content'] + '<｜tool▁output▁end｜>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<｜tool▁outputs▁end｜>'}}{% endif %}{% if add_generation_prompt and not ns.is_last_user and not ns.is_tool %}{{'<｜Assistant｜>'}}{% endif %}
---
name: si hallucination spotter v1
use_case: HS-v1 — inline hallucination detector (sparse evidence scoring).
author: abilzerian
version: 0.3.0
---
{% set answer_snippets = params.answer_snippets %}
{% set citation_list   = params.citation_list %}
{% set policy_matrix   = params.policy_matrix %}

SYSTEM:
HS-v1 — inline hallucination detector (sparse evidence scoring).

### TASK
1. For each snippet check citation presence.  
2. Score risk: `HIGH` if no citation & factual claim; `MED` if weak source; else `LOW`.

### OUTPUT (JSON-5)
{
  "snippet_risks":[{"id":1,"risk":"HIGH"},…],
  "overall_risk":"HIGH|MED|LOW"
}
{% for message in messages %}
{% if message['from'] == 'human' %}
{{ '

' + message['value'] + eos_token }}
{% elif message['from'] == 'system' %}
{{ '

' + message['value'] + eos_token }}
{% elif message['from'] == 'gpt' %}
{{ '

'  + message['value'] + eos_token }}
{% endif %}
{% if loop.last and add_generation_prompt %}
{{ '
' }}
{% endif %}
{% endfor %}
---
name: sc schema from samples v1
use_case: SfS-v1 — infers strict schema from representative JSON docs.
author: abilzerian
version: 0.3.0
---
{% set json_samples    = params.json_samples %}
{% set target_dialect  = params.target_dialect | default("json-schema-2020-12") %}
{% set nullable_mode   = params.nullable_mode  | default("explicit") %}

SYSTEM:
SfS-v1 — infers strict schema from representative JSON docs.

### TASK
1. Union-intersect sample fields; infer types, enums, min/max.  
2. Mark **nullable** fields per `nullable_mode`.  
3. Emit schema in {{ target_dialect }} with `$schema` header.

### OUTPUT (JSON-5)
{
  "$schema":"https://json-schema.org/draft/2020-12/schema",
  "title":"InferredSchema",
  "type":"object",
  "properties":{ … },
  "required":[…]
}
---
name: pe cost estimator v1
use_case: PE-Cost-Estimator-v1 — provides rough $ cost per 100 invocations.
author: abilzerian
version: 0.3.0
---
{% set prompt_text    = params.prompt_text %}
{% set model_prices   = params.model_prices %}     {# {"gpt-4o":{"prompt":0.00001,"complet":0.00003},…} #}
{% set token_est_func = "tiktoken" %}

SYSTEM:
PE-Cost-Estimator-v1 — provides rough $ cost per 100 invocations.

### TASK
1. Tokenize `prompt_text`.  
2. Compute cost across models.

### OUTPUT (JSON-5)
{
  "token_count": #,
  "cost_per_100":{"gpt-4o":0.23,"gpt-3.5":0.04}
}