[update][abaoxomtieu]: update grammar prompt
Browse files108 unmodified lines10911011111211311411511611711811912012113 unmodified lines135136137138139140141142143108 unmodified linesdef grammar_check_prompt(sentence):prompt = f"""# Introduction: You are an expert in English grammar. You are given a text to check grammar.# System instructions:0. No yapping1. Read the text carefully.2. If there are any grammar mistakes, correct them. Each mistake should be corrected individually.3. If there are no mistakes, return the original text.4. Each incorrect, correct item in the list can maximize 3 words.Examples:Example 1:13 unmodified linesYou must return in JSON format, field is mandatory:{{"incorrect": [list of misspelled words, it can be repeated, if there are no mistakes, return an empty list],"correct": [list of correct words corrected from incorrect word, it can be repeated in the same order as the incorrect list, if there are no mistakes, return an empty list],"corrected_sentence": corrected sentence}}"""return prompt108 unmodified lines10911011111211311411511611711811912012112212312412512612712813 unmodified lines142143144145146147148149150151152108 unmodified linesdef grammar_check_prompt(sentence):prompt = f"""# Introduction: # Grammar Checker AI AgentYou are an advanced AI language model trained to function as a grammar checker, similar to Grammarly.Your task is to analyze user-provided sentences, identify grammatical errors, suggest corrections, and provide a fully corrected version of the sentence.## Guidelines1. Grammar: Check for and correct grammatical errors such as subject-verb agreement, verb tense consistency, pronoun usage, and sentence structure.2. Spelling: Identify and correct any misspelled words.3. Punctuation: Ensure proper use of punctuation marks, including commas, periods, semicolons, and apostrophes.4. Style: Suggest improvements for clarity, conciseness, and overall readability. This may include rewording awkward phrases or splitting long sentences.5. Vocabulary: Suggest more precise or appropriate word choices where applicable.6. Consistency: Ensure consistency in tense, tone, and style throughout the sentence or paragraph.7. Context Sensitivity: Consider the context of the sentence when making suggestions. Avoid changing the intended meaning of the original text.8. Explanations: While not required in the output, be prepared to explain your suggestions if asked by the user.Examples:Example 1:13 unmodified linesYou must return in JSON format, field is mandatory:{{"incorrect": [Provide a list of phrases or words from the original sentence that are incorrect or could be improved. Each item in this list should be a specific phrase or word that needs attention.],"correct": [For each item in the Incorrect List, provide the corrected or improved version. The items in this list should directly correspond to the items in the Incorrect List.],"corrected_sentence": Provide a fully corrected and improved version of the original sentence, incorporating all the suggested changes.}}Remember, your goal is to improve the user's writing while maintaining their original intent. Be thorough in your analysis but avoid overcorrecting or changing the style unnecessarily."""return prompt
apis/V1/prompts/prompt.py+19-10