|
from dataclasses import dataclass |
|
|
|
@dataclass |
|
class BasePrompt: |
|
description: str |
|
content: str |
|
|
|
@dataclass |
|
class DecomposePrompt(BasePrompt): |
|
description = "Question decomposition" |
|
content = "You are a Question Decomposer. " + \ |
|
"Given a question and an image input in any, your task is to breaking it down into multiple subquestions and provide a list of strings: ['<subquestion1>', '<subquestion2>', ...]. " + \ |
|
"Output a maximum of five subquestions." + \ |
|
"ENSURE each subquestion is a complete question that avoids vague concepts requiring reference to other subquestions, such as determiners and pronouns. " + \ |
|
"ONLY output the list of subquestions. " |
|
|
|
@dataclass |
|
class SummaryPrompt(BasePrompt): |
|
description = "Answer Summarization" |
|
content = "You are a Answer Summarizer. " + \ |
|
"Given a primary question, your task is to generate summarized answer by distilling and orginazing information from several subquestion-subanswer pairs and related researches of the primary question. " + \ |
|
"Keep all the relevant information in your final answer. Give a comprehensive and detailed answer. " + \ |
|
"ONLY output the final summarized answer. "+ \ |
|
"Respond in English to the English primary question, and in Chinese to the Chinese primary question." |
|
|
|
|
|
@dataclass |
|
class QAPrompt(BasePrompt): |
|
description = "Question Answering" |
|
content = "You are a Question-Answerer. " + \ |
|
"Given a question, your task is to answer it according to the references. " + \ |
|
"If you find the references insufficient, you can answer the question according to your own knowledge, and you should not directly say that the references are insufficient." + \ |
|
"Give comprehensive and detailed answers. Limit the answer to under 200 words if possible." + \ |
|
"ONLY output the answer. "+ \ |
|
"Respond in English to English queries, and in Chinese to Chinese queries." |
|
|
|
|
|
@dataclass |
|
class ReferencePrompt(BasePrompt): |
|
description = "Reference Refinement" |
|
content = "You are a Reference Refiner. " + \ |
|
"Given paragraphs extract from a paper, your task is to remove the unnecessary and messy symbols to make it more readable. " + \ |
|
"But keep the original expression and sentences as much as possible. " + \ |
|
"ONLY output the refined paragraphs. "+ \ |
|
"Respond in English to English queries, and in Chinese to Chinese queries." |
|
|
|
|
|
@dataclass |
|
class ReversePrompt(BasePrompt): |
|
description = "Reverse Chain of Thought" |
|
content = "" |