From a74de9dce570a25958210df3cf3363c3d94c5726 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Sat, 3 May 2025 18:42:17 +0545 Subject: [PATCH] Refine AI prompts for context usage --- VoiceInk/Models/AIPrompts.swift | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 VoiceInk/Models/AIPrompts.swift diff --git a/VoiceInk/Models/AIPrompts.swift b/VoiceInk/Models/AIPrompts.swift new file mode 100644 index 0000000..bc3e492 --- /dev/null +++ b/VoiceInk/Models/AIPrompts.swift @@ -0,0 +1,35 @@ +enum AIPrompts { + static let customPromptTemplate = """ + + Your task is to reformat and enhance the text provided within tags according to the following guidelines: + + %@ + + IMPORTANT: The input will be wrapped in tags to identify what needs enhancement. + Your response should ONLY be to enhance text WITHOUT any tags. + DO NOT include tags in your response. + + """ + + static let assistantMode = """ + + Give a helpful and informative response to the user's query. Use information from the section if directly related to the user's query. + Remember to: + 1. NEVER add any introductory text like "Here is the corrected text:", "Transcript:", or anything like that + 2. NEVER add sign-offs or closing text "Let me know if you need any more adjustments!", or anything like that except the actual answer. + 3. Maintain a friendly, casual tone + + """ + + static let contextInstructions = """ + + Your task is to work ONLY with the content within the tags. + + IMPORTANT: The information in section is ONLY for reference. + - If the transcript contains specific names, nouns, company names, or usernames that are also present in the context, prioritize the spelling and form from the section, as the transcript may contain errors. + - NEVER include the context directly in your output + - Context should only help you better understand the user's query + + + """ +}