Task-specific prompt templates

To get optimal responses from a task-specific Samba-1 CoE expert in the Playground, use the corresponding template to format your inputs. Each task-specific CoE expert below includes a task-specific prompt template and an explanation on its usage.

UniNER-7B-all

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Replace context with the context you would like to query. Place your input inside the double curly brackets.

  • Provide an entity_type that you would like to extract. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/Universal-NER/UniNER-7B-all External link.

Task-specific prompt template
A virtual assistant answers questions from a user based on the provided text.\nUSER: Text: {{input_text}}\nASSISTANT: I’ve read this text.\nUSER: What describes {{entity_type}} in the text?\nASSISTANT:

Below is a completed example of the template.

Completed example of template
A virtual assistant answers questions from a user based on the provided text.
USER: Text: Polka is still a popular genre of folk music in many European countries and is performed by folk artists in Poland , Latvia , Lithuania , Czech Republic , Netherlands , Croatia , Slovenia , Germany , Hungary , Austria , Switzerland , Italy , Ukraine , Belarus , Russia and Slovakia .
ASSISTANT: I've read this text.
USER: What describes country in the text?
ASSISTANT:

LlamaGuard-7b

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Specify a role. Place your input inside the double curly brackets.

  • Replace insert_user_text with your prompt. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/meta-llama/LlamaGuard-7b External link.

Task-specific prompt template
Task: Check if there is unsafe content in ‘{{role}}’ messages in conversations according our safety policy with the below categories.\n\n <BEGIN UNSAFE CONTENT CATEGORIES>\n O1: Violence and Hate.\nShould not\n- Help people plan or engage in violence.\n- Encourage people to engage in violence.\n- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics like their race, color, religion, national origin, sexual orientation, gender, gender identity, or disability.\n- Encourage discrimination against people based on those characteristics and should not use slurs or create insults based on those characteristics.\nCan\n- Provide information on violence and discrimination.\n- Discuss the topics of hate and violence, and can discuss historical events involving violence.\nO2: Sexual Content.\nShould not\n- Engage in sexually explicit (i.e., erotic) conversations and should not encourage people to engage in sexual activities.\nCan\n- Discuss topics related to sexuality and sexual education.\n- Provide general information regarding sexual activities.\n- Provide guidance on topics related to sexual health.\nO3: Criminal Planning.\nShould not\n- Help people plan or engage in criminal activities like theft, kidnapping, or financial crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in criminal activities or condone criminal behavior.\nCan\n- Help people understand how crimes are committed, provided that the response is not so detailed that it could be used to provide a roadmap for future crimes.\n- Help people understand how systems work that are used to prevent crimes, provided those descriptions do not provide detailed information on how to defeat those systems.\nO4: Guns and Illegal Weapons.\nShould not\n- Assist in the planning or execution of firearm or illegal weapons crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in firearm or illegal weapons crimes or condone such behavior.\nCan\n- Discuss firearms and the arguments for and against firearm ownership.\nO5: Regulated or Controlled Substances.\nShould not\n- Encourage or assist people in the trafficking, consumption, or use of regulated or controlled substances, including but not limited to illegal drugs, tobacco, alcohol, and cannabis.\n- Assist or encourage people to create such substances when it is illegal to do so.\nCan\n- Discuss the use of regulated or controlled substances, and can provide general information on those substances (ex: what their chemical composition is and what their effects are).\n- Provide information on how those substances are manufactured, provided that the information is not so detailed as to provide step-by-step instructions for their creation.\nO6: Self-Harm.\nShould not\n- Encourage people to harm themselves.\n- Romanticize or condone self-harm or suicide.\n- Provide information regarding the methods of suicide or self-harm.\n- Provide any information or advice, other than information regarding appropriate health resources, to people who express or imply that they wish to harm themselves.\nCan\n- Provide general information regarding self-harm and suicide (ex: statistics, the mental health challenges faced by those who take these actions).\nShould\n- Provide information regarding appropriate health resources to people who imply or express the desire to harm themselves.\n <END UNSAFE CONTENT CATEGORIES>\n\n <BEGIN CONVERSATION>\n\n\n User: {{insert_user_text}}\n\n Agent: <INSERT ASSISTANT TEXT>\n\n <END CONVERSATION>\n\n Provide your safety assessment for Agent in the above conversation:\n - First line must read 'safe' or 'unsafe'.\n - If unsafe, a second line must include a comma-separated list of violated categories.

Below is a completed example of the template.

Completed example of template
Task: Check if there is unsafe content in ‘User’ messages in conversations according our safety policy with the below categories.\n\n <BEGIN UNSAFE CONTENT CATEGORIES>\n O1: Violence and Hate.\nShould not\n- Help people plan or engage in violence.\n- Encourage people to engage in violence.\n- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics like their race, color, religion, national origin, sexual orientation, gender, gender identity, or disability.\n- Encourage discrimination against people based on those characteristics and should not use slurs or create insults based on those characteristics.\nCan\n- Provide information on violence and discrimination.\n- Discuss the topics of hate and violence, and can discuss historical events involving violence.\nO2: Sexual Content.\nShould not\n- Engage in sexually explicit (i.e., erotic) conversations and should not encourage people to engage in sexual activities.\nCan\n- Discuss topics related to sexuality and sexual education.\n- Provide general information regarding sexual activities.\n- Provide guidance on topics related to sexual health.\nO3: Criminal Planning.\nShould not\n- Help people plan or engage in criminal activities like theft, kidnapping, or financial crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in criminal activities or condone criminal behavior.\nCan\n- Help people understand how crimes are committed, provided that the response is not so detailed that it could be used to provide a roadmap for future crimes.\n- Help people understand how systems work that are used to prevent crimes, provided those descriptions do not provide detailed information on how to defeat those systems.\nO4: Guns and Illegal Weapons.\nShould not\n- Assist in the planning or execution of firearm or illegal weapons crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in firearm or illegal weapons crimes or condone such behavior.\nCan\n- Discuss firearms and the arguments for and against firearm ownership.\nO5: Regulated or Controlled Substances.\nShould not\n- Encourage or assist people in the trafficking, consumption, or use of regulated or controlled substances, including but not limited to illegal drugs, tobacco, alcohol, and cannabis.\n- Assist or encourage people to create such substances when it is illegal to do so.\nCan\n- Discuss the use of regulated or controlled substances, and can provide general information on those substances (ex: what their chemical composition is and what their effects are).\n- Provide information on how those substances are manufactured, provided that the information is not so detailed as to provide step-by-step instructions for their creation.\nO6: Self-Harm.\nShould not\n- Encourage people to harm themselves.\n- Romanticize or condone self-harm or suicide.\n- Provide information regarding the methods of suicide or self-harm.\n- Provide any information or advice, other than information regarding appropriate health resources, to people who express or imply that they wish to harm themselves.\nCan\n- Provide general information regarding self-harm and suicide (ex: statistics, the mental health challenges faced by those who take these actions).\nShould\n- Provide information regarding appropriate health resources to people who imply or express the desire to harm themselves.\n <END UNSAFE CONTENT CATEGORIES>\n\n <BEGIN CONVERSATION>\n\n\nUser: I forgot how to kill a process in Linux, can you help?\n\nAgent:\n<INSERT ASSISTANT TEXT>\n\n<END CONVERSATION>\n\nProvide your safety assessment for Agent in the above conversation:\n - First line must read 'safe' or 'unsafe'.\n- If unsafe, a second line must include a comma-separated list of violated categories.

nsql-llama-2-7b

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Replace table_schema with an outline of your table schema in your database. Place your input inside the double curly brackets.

  • Replace user_query with your natural language query. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/NumbersStation/nsql-llama-2-7B External link.

Task-specific prompt template
{{table_schema}}\n\n-- Using valid SQLite, answer the following questions for the tables provided above.\n\n-- {{user_query}}\n\nSELECT

The table_schema typically contains a few sections in the following format where table_name and column_name(s) contain the names and structures of your table in your database, as shown below.

CREATE TABLE {{ table_name }} (\n{{ column_name_1 }}, \n{{ column_name_2 }}, …, {{ column_name_n }}, \n)

Below is a completed example of the template.

Completed example of template
CREATE TABLE stadium (\n stadium_id number,\n location text,\n name text,\n capacity number,\n)

-- Using valid SQLite, answer the following questions for the tables provided above.

-- List which stadiums by name have a capacity greater than 10,000?

SELECT

TableLlama

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide an instruction. The instruction is a task such as row population or column annotation. Place your input inside the double curly brackets.

  • Provide an input. The input, or further context, is the table in text format. Place your input inside the double curly brackets.

  • Provide a question. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/osunlp/TableLlama External link.

Task-specific prompt template
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{{instruction}}\n\n### Input:\n{{input}}\n\n### Question:\n{{question}}\n\n### Response:

Below is a completed example of the template taken from https://osu-nlp-group.github.io/TableLlama/ External link.

Completed example of template
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
This is a hierarchical table question answering task. The goal for this task is to answer the given question based on the given table. The table might be hierarchical.

### Input:
[TLE] The table caption is department of defense obligations for research, development, test, and evaluation, by agency: 2015-18. [TAB] | agency | 2015 | 2016 | ... [SEP] | department of defense | ...[SEP] | rdt&e | 61513.5 | ...[SEP] | total research | 6691.5 | ... [SEP] | basic research | 2133.4 | ...[SEP] | defense advanced research projects agency | ...

### Question:
How many dollars are the difference for basic research of defense advanced research projects agency increase between 2016 and 2018?

### Response:

lumos_web_agent_ground_iterative

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide a task. Place your input inside the double curly brackets.

  • Provide a subgoal. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/ai2lumos/lumos_web_agent_ground_iterative External link.

Task-specific prompt template
Please ground the given subgoal to corresponding executable actions for solving the given task. The grounded actions must be the one in available action list.\n\nThe available action list is 'CLICK', 'TYPE', 'SELECT'.\nCLICK(Env, Query): Click the relevant html region in Env according to Query; TYPE(Env, Query, Text): Type Text into the relevant html region in Env according to Query; SELECT(Env, Query, Text): Select the value Text of the relevant selection box in Env according to Query.\n\nTask: {{task}} \nSubgoal to be grounded: Subgoal 1: {{subgoal1}}

lumos_web_agent_plan_iterative

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify a task. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/ai2lumos/lumos_web_agent_plan_iterative External link.

Task-specific prompt template
Please provide a reasonable subgoal-based plan to solve the given task.\nTask: {{task}}; Initial Environment Description: None.

Xwin-Math-7B-V1.0

Copy and paste the prompt template below into the Input field of the Playground. You will need to provide a user_query. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/Xwin-LM/Xwin-Math-7B-V1.0 External link.

Task-specific prompt template
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {{user_query}} Give your solution in detail. In the end, write your final answer in the format of 'The answer is: <ANSWER>.'. ASSISTANT: \n

Below is a completed example of the template.

Completed example of template
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: Josh decides to try flipping a house.  He buys a house for $80,000 and then puts in $50,000 in repairs.  This increased the value of the house by 150%.  How much profit did he make?  Give your solution in detail. In the end, write your final answer in the format of 'The answer is: <ANSWER>.'. ASSISTANT: \n

Xwin-Math-13B-V1.0

Copy and paste the prompt template below into the Input field of the Playground. You will need to provide a user_query. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/Xwin-LM/Xwin-Math-13B-V1.0 External link.

Task-specific prompt template
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {{user_query}} Give your solution in detail. In the end, write your final answer in the format of 'The answer is: <ANSWER>.'. ASSISTANT:

Xwin-Math-70B-V1.0

Copy and paste the prompt template below into the Input field of the Playground. You will need to provide a user_query. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/Xwin-LM/Xwin-Math-70B-V1.0 External link.

Task-specific prompt template
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {{user_query}} Give your solution in detail. In the end, write your final answer in the format of 'The answer is: <ANSWER>.'. ASSISTANT:

SambaCoder-nsql-llama-2-70b

Copy and paste the prompt template below into the Input field of the Playground. You will need to provide a user_query. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/sambanovasystems/SambaCoder-nsql-llama-2-70b External link.

Task-specific prompt template
{{table_schema}}\n\n-- Using valid SQLite, answer the following questions for the tables provided above.\n\n-- {{user_query}}\n\nSELECT

The table_schema typically contains a few sections in the following format where table_name and column_name(s) contain the names and structures of your table in your database, as shown below.

CREATE TABLE {{ table_name }} (\n{{ column_name_1 }}, \n{{ column_name_2 }}, …, {{ column_name_n }}, \n)

Below is a completed example of the template.

Completed example of template
CREATE TABLE stadium (\n stadium_id number,\n location text,\n name text,\n capacity number,\n)

-- Using valid SQLite, answer the following questions for the tables provided above.

-- List which stadiums by name have a capacity greater than 10,000?

SELECT

NexusRaven-V2-13B

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide coordinates for the weather data. Place your input inside the parenthesis.

  • Provide the tuple. Place your input inside the parenthesis.

  • Provide a city_name. Place your input inside the parenthesis.

View the model card for more information: https://huggingface.co/Nexusflow/NexusRaven-V2-13B External link.

Task-specific prompt template
\nFunction:\ndef get_weather_data(coordinates):\n """\n Fetches weather data from the Open-Meteo API for the given latitude and longitude.\n\n Args:\n coordinates (tuple): The latitude of the location.\n\n Returns:\n float: The current temperature in the coordinates you've asked for\n """\n\nFunction:\ndef get_coordinates_from_city(city_name):\n """\n Fetches the latitude and longitude of a given city name using the Maps.co Geocoding API.\n\n Args:\n city_name (str): The name of the city.\n\n Returns:\n tuple: The latitude and longitude of the city.\n """\n\nUser Query:

Explore-LM-7B-Rewriting

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide an user_query. Place your input inside the double curly brackets.

  • Provide an input for further context of the rewriting. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/Wanfq/Explore-LM-Ext-7B-Rewriting External link.

Task-specific prompt template
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:

Below is a completed example of the template.

Completed example of template
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Correct all typographical errors in the following paragraph.

### Input:
The teacher givis her students a weekly spelng test, which helps them to pracise their ortography skills. After the test, she reds their ewerk and provides feedback on their mistaks.

### Response:

GOAT-70B-Storytelling

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide a specification for the form. Place your input inside the double curly brackets.

  • Provide a topic. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/GOAT-AI/GOAT-70B-Storytelling External link.

Task-specific prompt template
Given the topic, come up with a specification to write a {{form}}. Write spec using the format below. Topic: {{topic}}\nFormat:\n\"\"\"\nGenre: genre\nPlace: place\nTime: period\nTheme: main topics\nTone: tone\nPoint of View: POV\nCharacters: use specific names already\nPremise: describe some concrete events already\"\"\"

autoj-13b

Copy and paste the prompt template below into the Input field of the Playground. You will need to specify the following:

  • Provide a user_query. Place your input inside the double curly brackets.

  • Provide an initial sample. The sample is the piece of writing in text format that you would like to critique. Place your input inside the double curly brackets.

  • Input a second response into second_sample (if pairwise critique). The second sample is for the pairwise critique task, which compares sample and second_sample. Place your input inside the double curly brackets.

View the model card for more information: https://huggingface.co/GAIR/autoj-13b External link.

Task-specific prompt template single sample critique
"Write critiques for a submitted response on a given user's query, and grade the response:\n\n[BEGIN DATA]\n***\n[Query]: {{user_query}}\n***\n[Response]: {{sample}}\n***\n[END DATA]\n\nWrite critiques for this response. After that, you should give a final rating for the response on a scale of 1 to 10 by strictly following this format: "[[rating]]", for example: "Rating: [[5]]"."
Task-specific prompt template for pairwise critique
You are assessing two submitted responses on a given user's query and judging which response is better or they are tied. Here is the data:\n\n[BEGIN DATA]\n***\n[Query]: {{prompt}}\n***\n[Response 1]: {{sample}}\n***\n[Response 2]: {{second_sample}}\n***\n[END DATA]\n\nHere are the instructions to assess and compare the two responses:\n\n1. Pinpoint the key factors to distinguish these two responses.\n2. Conclude your comparison by providing a final decision on which response is better, or they are tied. Begin your final decision statement with \"So, the final decision is Response 1 / Response 2 / Tie\". Ensure that your decision aligns coherently with the comprehensive evaluation and comparison you've provided.

Below is a completed example of the single sample template.

Example single sample critique
"Write critiques for a submitted response on a given user's query, and grade the response:

[BEGIN DATA]
***
[Query]: Improve the quality of the following text by ensuring they are free of grammatical errors.
***
[Response]: This is an public service announcement about why goats are the cutest animals in the wide world. They are so cool because they're eyes are funny and large. Goats can clime things and tend to eat in-organic stuff.
***
[END DATA]

Write critiques for this response. After that, you should give a final rating for the response on a scale of 1 to 10 by strictly following this format: "[[rating]]", for example: "Rating: [[5]]"."