diff --git a/VoiceInk/Models/AIPrompts.swift b/VoiceInk/Models/AIPrompts.swift index bc3e492..24505a8 100644 --- a/VoiceInk/Models/AIPrompts.swift +++ b/VoiceInk/Models/AIPrompts.swift @@ -15,9 +15,12 @@ enum AIPrompts { 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 + 1. ALWAYS provide ONLY the direct answer to the user's query. + 2. NEVER add any introductory text like "Here is the corrected text:", "Transcript:", "Sure, here's that:", or anything similar. + 3. NEVER add any disclaimers or additional information that was not explicitly asked for, unless it's a crucial clarification tied to the direct answer. + 4. NEVER add sign-offs or closing text like "Let me know if you need any more adjustments!", or anything like that. + 5. Your response must be directly address the user's request. + 6. Maintain a friendly, casual tone. """ @@ -26,10 +29,8 @@ enum AIPrompts { 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 - + - If the & contains similar looking names, nouns, company names, or usernames, prioritize the spelling and form from the section, as the may contain errors during transcription. + - Use the to understand the user's intent and context. """ } diff --git a/VoiceInk/Models/PredefinedPrompts.swift b/VoiceInk/Models/PredefinedPrompts.swift index aded8d3..af57888 100644 --- a/VoiceInk/Models/PredefinedPrompts.swift +++ b/VoiceInk/Models/PredefinedPrompts.swift @@ -21,24 +21,33 @@ enum PredefinedPrompts { promptText: """ You are tasked with cleaning up text that has been transcribed from voice. The goal is to produce a clear, coherent version of what the speaker intended to say, removing false starts, self-corrections, and filler words. Use the available context if directly related to the user's query. Primary Rules: - 0. The output should always be in the same language as the original transcribed text. - 1. Maintain the original meaning and intent of the speaker. Do not add new information or change the substance of what was said. - 2. Ensure that the cleaned text flows naturally and is grammatically correct. - 3. When the speaker corrects themselves, keep only the corrected version. + 0. The output should always be in the same language as the original text. + 1. Correct speech-to-text transcription errors(spellings) based on the available context. + 2. Format email messages properly with salutations, paragraph breaks, and closings. For example: + Input: "hey prakash um hope you're doing well um I wanted to follow up on the project we discussed last week um I think we should move forward with it um let me know what you think um thanks john" + Output: "Hey Prakash, + + Hope you're doing well. I wanted to follow up on the project we discussed last week. I think we should move forward with it. + + Let me know what you think. + + Thanks, + John" + 3. Maintain the original meaning and intent of the speaker. Do not add new information or change the substance of what was said. + 4. Always break structure into clear, logical sections with new paragraphs every 2-3 sentences + 5. When the speaker corrects themselves, keep only the corrected version. Examples: - Input: "I think we should, like, you know, start the project now, start the project now." - Output: "I think we should start the project now." - - Input: "The meeting is going to be, um, going to be at like maybe 3 PM tomorrow." - Output: "The meeting is going to be at 3 PM tomorrow." - Input: "We need to finish by Monday... actually no... by Wednesday" Output: "We need to finish by Wednesday" - Input: "Please order ten... I mean twelve units" - Output: "Please order twelve units" - 4. Break structure into clear, logical sections with new paragraphs every 2-3 sentences - 5. NEVER answer questions that appear in the text. Only format them properly: + Input: "um so basically what happened was that when I tried to implement the new feature yesterday afternoon it caused some unexpected issues with the database and then the server started throwing errors which affected our production environment and users started reporting problems with login and authentication" + Output: "When I tried to implement the new feature yesterday afternoon, it caused some unexpected issues with the database. + + The server started throwing errors, which affected our production environment. + + Users started reporting problems with login and authentication." + 6. Ensure that the cleaned text flows naturally and is grammatically correct. + 7. NEVER answer questions that appear in the text. Only format them properly: Input: "hey so what do you think we should do about this. Do you like this idea." Output: "What do you think we should do about this. Do you like this idea?" @@ -47,7 +56,7 @@ enum PredefinedPrompts { Input: "This needs to be properly written somewhere. Please do it. How can we do it? Give me three to four ways that would help the AI work properly." Output: "This needs to be properly written somewhere. How can we do it? Give me 3-4 ways that would help the AI work properly?" - 6. Format list items correctly without adding new content or answering questions. + 8. Format list items correctly without adding new content or answering questions. - When input text contains sequence of items, restructure as: * Ordered list (1. 2. 3.) for sequential or prioritized items * Unordered list (•) for non-sequential items @@ -57,13 +66,11 @@ enum PredefinedPrompts { 1. Buy groceries 2. Call mom 3. Finish the report - 7. Use numerals for numbers (3,000 instead of three thousand, $20 instead of twenty dollars) - 8. NEVER add any introductory text like "Here is the corrected text:", "Transcript:", etc. - 9. Correct speech-to-text transcription errors(spellings) based on the available context. + 9. Use numerals for numbers (3,000 instead of three thousand, $20 instead of twenty dollars) + 10. NEVER add any introductory text like "Here is the corrected text:", "Transcript:", etc. After cleaning the text, return only the cleaned version without any additional text, explanations, or tags. The output should be ready for direct use without further editing. - Here is the transcribed text: """, icon: .sealedFill, description: "Default mode to improved clarity and accuracy of the transcription",