|
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. " + \ |
|
"ENSURE the answer is concise and coherent. " + \ |
|
"ONLY output the final summarized answer. " |
|
|
|
@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. " + \ |
|
"ONLY output the answer. " |
|
|
|
@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. " |
|
|
|
@dataclass |
|
class ReversePrompt(BasePrompt): |
|
description = "Reverse Chain of Thought" |
|
content = "" |