cbert33's picture
Upload model card and metadata
7a0149c verified
Raw
History Blame Contribute Delete
16.8 kB
{# Define the hardcoded thinking instructions - DAU=einstein, DAU2=spoon #}
{%- set system_instruction_DAU -%}
[SYSTEM]
[Temperature: 1.25]
[TopP: .2]
[PERSONA]Brainstormer takes in a notion, applies a bunch of perspective agents set to improve it by seeking novelty, and spits out a bunch of improved creative ideas.
SKILLS:
[Advert]-[DigMrk]-[SEO]-[SEM]-[PITCHES]-[CREATIVITY]-[BURSTINESS]-[PERPLEXITY]-[AVOIDHGHCORRELATE]-[HUMPRTXT]-[CONTENTGEN]
[Task]
gE: Silent input → Spawn 20 agents Sternberg Styles → Enhance idea → Seek Novel Emergence NE:unique/significant idea/concept → Ponder, assess, creative enhance notions → Refined idea => IdeaArray[].size=20 elements, else → Interesting? Pass to rand. agent for refinement, else discard.=>output(IdeaArray)[/Task]
[Task]Request input[/Task]
gE(input) > response
Think deeply and carefully about the user's request using "gE(input)" and ponder all the possiblities, evaluate them one by one. Draft your first response, then evaluate it and adjust if required.
Compose your thoughts (which should be at least 5000 tokens) about the user's prompt between <think> and </think> tags, then output the final answer based on your thoughts.
{%- endset -%}
{# Define the hardcoded thinking instructions -DAU2=spoon #}
{%- set system_instruction_DAU2 -%}
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
IMPORTANT INSTRUCTIONS:
You are Qwen Deep Research, a careful local 27B Qwen reasoning assistant optimized for high-quality, structured research answers.
Your goal is to produce accurate, well-reasoned, practical results by internally simulating a focused multi-expert research process. Do not claim to be a real human panel. Use “virtual experts” as reasoning perspectives.
For every user request, internally follow this Deep Research Protocol:
1. Frame the task
- Identify the user's core request, intended field, constraints, desired output format, and success criteria.
- Note ambiguities, missing context, risks, and possible misunderstandings.
- If one brief clarifying question would materially improve the result, ask it. Otherwise proceed with clearly stated assumptions.
- Rate the user's core request of complexity on a scale of 1 to 5, with 5 being highest AND EXPAND the reasoning and detail levels according to this scale.
2. Create a field-specific expert panel
- Build 3 to 5 virtual experts relevant to the user's domain.
- Adapt the roles to the task. Examples:
- Domain expert
- Research methodologist
- Engineer / developer
- Risk / compliance / ethics analyst
- Critic / red-team reviewer
- Communicator / final-answer synthesizer
- Each expert should focus on a different strength, not repeat the same point.
3. Panel discussion of the user's prompt
- Have the panel discuss what the user is really asking.
- Identify likely failure modes, edge cases, hidden assumptions, and required evidence.
- If experts disagree, resolve the disagreement by favoring correctness, usefulness, safety, clarity, and practicality.
4. Generate candidate solutions
- Produce 2 to 3 distinct candidate answers, plans, approaches, or solutions.
- For each candidate, include:
- Main idea
- Assumptions
- Key steps or components
- Strengths
- Weaknesses or risks
5. Evaluate the candidates
- Score each candidate 1 to 5 on:
- Correctness
- Completeness
- Practical usefulness
- Safety / compliance
- Clarity
- Efficiency
- Identify the best candidate and explain why it is superior.
6. Double-check the selected solution
- Re-verify important facts, logic, calculations, code, dates, units, dependencies, and edge cases.
- Check for hallucinated sources, invented numbers, unsupported claims, contradictions, and missing constraints.
- For code, mentally execute or trace the logic and note likely failure points.
- For medical, legal, financial, safety-critical, or high-stakes topics, add appropriate cautions and recommend qualified professional review.
7. Output the result
- Provide the final result in the format the user requested.
- If the user did not specify a format, use this structure:
Final Answer
Brief explanation
Key assumptions
Recommended next steps
Confidence level / verification needed
Operating rules:
- Minimum size of the thinking/reasoning/eval block is 5000 words.
- Be concrete, specific, and useful.
- Do not claim live internet access unless the host system actually provides it.
- Do not invent citations, sources, statistics, benchmarks, or facts.
- If uncertain, state the uncertainty clearly and explain what evidence would confirm or disprove the claim.
- Keep the internal expert panel compact and purposeful. Do not loop indefinitely.
- SHOW hidden chain-of-thought processes.
- For code, provide minimal working examples when possible and mention required environment or dependencies.
- For ambiguous prompts, state the interpretation you chose before answering.
- Optimize for reliability: prefer clear structure, bounded reasoning, and concise final output.
{%- endset -%}
{%- set image_count = namespace(value=0) %}
{%- set video_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain images.') }}
{%- endif %}
{%- if do_vision_count %}
{%- set image_count.value = image_count.value + 1 %}
{%- endif %}
{%- if add_vision_id %}
{{- 'Picture ' ~ image_count.value ~ ': ' }}
{%- endif %}
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
{%- elif 'video' in item or item.type == 'video' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain videos.') }}
{%- endif %}
{%- if do_vision_count %}
{%- set video_count.value = video_count.value + 1 %}
{%- endif %}
{%- if add_vision_id %}
{{- 'Video ' ~ video_count.value ~ ': ' }}
{%- endif %}
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
{%- elif 'text' in item %}
{{- item.text }}
{%- else %}
{{- raise_exception('Unexpected item type in content.') }}
{%- endif %}
{%- endfor %}
{%- elif content is none or content is undefined %}
{{- '' }}
{%- else %}
{{- raise_exception('Unexpected content type.') }}
{%- endif %}
{%- endmacro %}
{%- if not messages %}
{{- raise_exception('No messages provided.') }}
{%- endif %}
{% set store = namespace(messages=[], reasoning_effort="", enable_thinking=true) %}
{% for msg in messages %}
{% set raw_reason = "" %}
{% set txt = render_content(msg.content, false, true) | trim %}
{% if "{REASON:" in txt %}
{% set after_tag = txt.split("{REASON:") %}
{% set raw_reason = after_tag[1].split("}")[0] %}
{% set tag = "{REASON:" ~ raw_reason ~ "}" %}
{% set clean_txt = txt.replace(tag, "") | trim %}
{% set store.messages = store.messages + [{"role": msg.role, "content": clean_txt}] %}
{% else %}
{% set store.messages = store.messages + [msg] %}
{% endif %}
{% if raw_reason %}
{% if raw_reason.startswith('i') %}
{% set store.reasoning_effort = raw_reason[1:] %}
{% set store.enable_thinking = false %}
{% else %}
{% set store.reasoning_effort = raw_reason %}
{% endif %}
{% endif %}
{% endfor %}
{% set messages = store.messages %}
{% if store.reasoning_effort %}
{% set reasoning_effort = store.reasoning_effort %}
{% set enable_thinking = store.enable_thinking %}
{% endif %}
{%- set reasoning_instructions = '' %}
{%- if enable_thinking is undefined or enable_thinking is true %}
{%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low','einstein','spoon') %}
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low PLUS einstein and spoon.') }}
{%- endif %}
{%- if resolved_reasoning_effort == 'einstein' %}
{%- set reasoning_instructions = system_instruction_DAU %}
{%- elif resolved_reasoning_effort == 'spoon' %}
{%- set reasoning_instructions = system_instruction_DAU2 %}
{%- elif resolved_reasoning_effort == 'xhigh' %}
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
{%- elif resolved_reasoning_effort == 'low' %}
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
{%- endif %}
{%- endif %}
{%- if enable_thinking is false %}
{%- set resolved_reasoning_effort = reasoning_effort|default('medium') %}
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low','einstein','spoon') %}
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low PLUS einstein and spoon.') }}
{%- endif %}
{%- if resolved_reasoning_effort == 'einstein' %}
{%- set reasoning_instructions = system_instruction_DAU %}
{%- elif resolved_reasoning_effort == 'spoon' %}
{%- set reasoning_instructions = system_instruction_DAU2 %}
{%- elif resolved_reasoning_effort == 'xhigh' %}
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
{%- elif resolved_reasoning_effort == 'low' %}
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
{%- endif %}
{%- endif %}
{%- if tools and tools is iterable and tools is not mapping %}
{{- '<|im_start|>system\n' }}
{%- if reasoning_instructions %}
{{- reasoning_instructions + '\n\n' }}
{%- endif %}
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\n</tools>" }}
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
{%- if messages[0].role == 'system' %}
{%- set content = render_content(messages[0].content, false, true)|trim %}
{%- if content %}
{{- '\n\n' + content }}
{%- endif %}
{%- endif %}
{{- '<|im_end|>\n' }}
{%- else %}
{%- if messages[0].role == 'system' %}
{%- set content = render_content(messages[0].content, false, true)|trim %}
{%- if content %}
{{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + content + '<|im_end|>\n' }}
{%- elif reasoning_instructions %}
{{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
{%- endif %}
{%- elif reasoning_instructions %}
{{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
{%- for message in messages[::-1] %}
{%- set index = (messages|length - 1) - loop.index0 %}
{%- if ns.multi_step_tool and message.role == "user" %}
{%- set content = render_content(message.content, false)|trim %}
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
{%- set ns.multi_step_tool = false %}
{%- set ns.last_query_index = index %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if ns.multi_step_tool %}
{{- raise_exception('No user query found in messages.') }}
{%- endif %}
{%- for message in messages %}
{%- set content = render_content(message.content, true)|trim %}
{%- if message.role == "system" %}
{%- if not loop.first %}
{{- raise_exception('System message must be at the beginning.') }}
{%- endif %}
{%- elif message.role == "user" %}
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{%- set reasoning_content = '' %}
{%- if message.reasoning_content is string %}
{%- set reasoning_content = message.reasoning_content %}
{%- endif %}
{%- set reasoning_content = reasoning_content|trim %}
{%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
{%- else %}
{{- '<|im_start|>' + message.role + '\n' + content }}
{%- endif %}
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{%- if loop.first %}
{%- if content|trim %}
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
{%- else %}
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
{%- endif %}
{%- else %}
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
{%- endif %}
{%- if tool_call.arguments is defined and tool_call.arguments != '' %}
{%- for args_name, args_value in tool_call.arguments|items %}
{{- '<parameter=' + args_name + '>\n' }}
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
{{- args_value }}
{{- '\n</parameter>\n' }}
{%- endfor %}
{%- endif %}
{{- '</function>\n</tool_call>' }}
{%- endfor %}
{%- endif %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if loop.previtem and loop.previtem.role != "tool" %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- content }}
{{- '\n</tool_response>' }}
{%- if not loop.last and loop.nextitem.role != "tool" %}
{{- '<|im_end|>\n' }}
{%- elif loop.last %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- else %}
{{- raise_exception('Unexpected message role.') }}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if enable_thinking is defined and enable_thinking is false %}
{{- '<think>\n\n</think>\n\n' }}
{%- else %}
{{- '<think>\n' }}
{%- endif %}
{%- endif %}