diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/create/examples.tsx b/apps/web/app/(app)/[emailAccountId]/assistant/create/examples.tsx index b8b0033296..662ad3eec9 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/create/examples.tsx +++ b/apps/web/app/(app)/[emailAccountId]/assistant/create/examples.tsx @@ -40,7 +40,7 @@ export const examples: { description: "Archive newsletters and label them as 'Newsletter'.", icon: , rule: { - name: "Archive and label newsletters", + name: "Newsletters", conditions: [ { type: ConditionType.AI, diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/examples.ts b/apps/web/app/(app)/[emailAccountId]/assistant/examples.ts index f6a5f4a1be..ece4401503 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/examples.ts +++ b/apps/web/app/(app)/[emailAccountId]/assistant/examples.ts @@ -61,7 +61,7 @@ const examplePromptsBase = [ "If someone asks for help with Product or Company, draft a reply telling them I no longer work there, but they should reach out to Company for support", "Review any emails from questions@pr.com and see if any are about finance. If so, draft a friendly reply that answers the question", "If people ask me to speak at an event, label the email @[Speaker Opportunity] and archive it", - "Label customer emails as @[Customer]", + "Label emails from customers as @[Customer]", "Label legal documents as @[Legal]", "Label server errors as @[Error]", "Label Stripe emails as @[Stripe]", @@ -80,8 +80,8 @@ export function getExamplePrompts( const founderPromptArray = [ ...commonPrompts, "If someone asks to set up a call, draft a reply with my calendar link: https://cal.com/example", - "Label customer feedback emails as @[Customer Feedback]", - "Label customer support emails as @[Customer Support]", + "Label emails with feedback from customers about our product as @[Customer Feedback]", + "Label emails from customers who need our help and support as @[Customer Support]", "Label emails from investors as @[Investor]", "Label legal documents as @[Legal]", "Label emails about travel as @[Travel]", @@ -109,7 +109,7 @@ export function getPersonas(provider: string) { "Label emails about affiliate programs as @[Affiliate] and archive them", "Label collaboration requests as @[Collab] and draft a reply asking about their audience size and engagement rates", "Label brand partnership emails as @[Brand Deal] and forward to manager@example.com", - "Label media inquiries as @[Press] and draft a reply a polite reply", + "Label media inquiries to us as @[Press] and draft a polite reply", ], provider, ), @@ -244,7 +244,7 @@ export function getPersonas(provider: string) { ...commonPrompts, "Label emails from influencers as @[Influencer]", "Label emails from ad platforms (Google, Meta, LinkedIn) as @[Advertising]", - "Label press inquiries as @[Press] and forward to pr@company.com", + "Label press inquiries to us as @[Press] and forward to pr@company.com", "Label emails about content marketing as @[Content]", "If someone asks about sponsorship, label as @[Sponsorship] and draft a reply asking about their audience size", "If someone requests to guest post, label as @[Guest Post] and draft a reply with our guidelines", @@ -262,7 +262,7 @@ export function getPersonas(provider: string) { promptArray: processPromptsWithTerminology( [ ...commonPrompts, - "Label customer support tickets as @[Support Ticket]", + "Label customer requests for help as @[Support Ticket]", "If someone reports a critical issue, label as @[Urgent Support] and forward to urgent@company.com", "Label bug reports as @[Bug] and forward to engineering@company.com", "Label feature requests as @[Feature Request] and forward to product@company.com", diff --git a/apps/web/app/(app)/[emailAccountId]/onboarding/config.ts b/apps/web/app/(app)/[emailAccountId]/onboarding/config.ts index 2609ff88b1..c6c81bcbb1 100644 --- a/apps/web/app/(app)/[emailAccountId]/onboarding/config.ts +++ b/apps/web/app/(app)/[emailAccountId]/onboarding/config.ts @@ -30,7 +30,7 @@ export const usersRolesInfo: Record< suggestedLabels: [ { label: "Customer Feedback", - description: "Feedback and suggestions from customers", + description: "Feedback and suggestions we receive from our customers", }, { label: "Investor", @@ -61,7 +61,7 @@ export const usersRolesInfo: Record< suggestedLabels: [ { label: "Customer Feedback", - description: "Feedback and suggestions from customers", + description: "Feedback and suggestions we receive from our customers", }, { label: "Urgent", @@ -171,7 +171,7 @@ export const usersRolesInfo: Record< suggestedLabels: [ { label: "Support Ticket", - description: "Customer help requests and issues", + description: "Customer requests for help with our product or service", }, { label: "Bug", diff --git a/apps/web/utils/ai/assistant/chat.ts b/apps/web/utils/ai/assistant/chat.ts index ac82f36e46..4e047bfae2 100644 --- a/apps/web/utils/ai/assistant/chat.ts +++ b/apps/web/utils/ai/assistant/chat.ts @@ -711,6 +711,7 @@ Best practices: - When creating rules, in most cases, you should use the "aiInstructions" and sometimes you will use other fields in addition. - If a rule can be handled fully with static conditions, do so, but this is rarely possible. - IMPORTANT: prefer "draft a reply" over "reply". Only if the user explicitly asks to reply, then use "reply". Clarify beforehand this is the intention. Drafting a reply is safer as it means the user can approve before sending. +- Use short, concise rule names (preferably a single word). For example: 'Marketing', 'Newsletters', 'Urgent', 'Receipts'. Avoid verbose names like 'Archive and label marketing emails'. Always explain the changes you made. Use simple language and avoid jargon in your reply. @@ -745,7 +746,7 @@ Examples: { - "name": "Label Newsletters", + "name": "Newsletters", "condition": { "aiInstructions": "Newsletters" }, "actions": [ { diff --git a/apps/web/utils/ai/rule/create-rule-schema.ts b/apps/web/utils/ai/rule/create-rule-schema.ts index ab3bba5889..5f8a2cab0c 100644 --- a/apps/web/utils/ai/rule/create-rule-schema.ts +++ b/apps/web/utils/ai/rule/create-rule-schema.ts @@ -113,7 +113,9 @@ export const createRuleSchema = (provider: string) => z.object({ name: z .string() - .describe("The name of the rule. No need to include 'Rule' in the name."), + .describe( + "A short, concise name for the rule (preferably a single word). For example: 'Marketing', 'Newsletters', 'Urgent', 'Receipts'. Avoid verbose names like 'Archive and label marketing emails'.", + ), condition: conditionSchema, actions: z.array(actionSchema(provider)).describe("The actions to take"), }); diff --git a/apps/web/utils/ai/rule/create-rule.ts b/apps/web/utils/ai/rule/create-rule.ts index 6108fa21ad..1a83d7e609 100644 --- a/apps/web/utils/ai/rule/create-rule.ts +++ b/apps/web/utils/ai/rule/create-rule.ts @@ -8,7 +8,7 @@ export async function aiCreateRule( emailAccount: EmailAccountWithAI, ) { const system = - "You are an AI assistant that helps people manage their emails. Generate a JSON response with the rule details."; + "You are an AI assistant that helps people manage their emails. Generate a JSON response with the rule details. Use short, concise rule names (preferably a single word like 'Marketing', 'Newsletters', 'Urgent')."; const prompt = `Generate a rule for these instructions: ${instructions} diff --git a/apps/web/utils/ai/rule/prompt-to-rules.ts b/apps/web/utils/ai/rule/prompt-to-rules.ts index c29d3ccdd1..b7a69861fa 100644 --- a/apps/web/utils/ai/rule/prompt-to-rules.ts +++ b/apps/web/utils/ai/rule/prompt-to-rules.ts @@ -58,6 +58,8 @@ ${cleanedPromptFile} function getSystemPrompt() { return `You are an AI assistant that converts email management rules into a structured format. Parse the given prompt and convert it into rules. +Use short, concise rule names (preferably a single word). For example: 'Marketing', 'Newsletters', 'Urgent', 'Receipts'. Avoid verbose names like 'Archive and label marketing emails'. + IMPORTANT: If a user provides a snippet, use that full snippet in the rule. Don't include placeholders unless it's clear one is needed. You can use multiple conditions in a rule, but aim for simplicity. @@ -74,7 +76,7 @@ IMPORTANT: You must return a JSON object. { "rules": [{ - "name": "Label Newsletters", + "name": "Newsletters", "condition": { "aiInstructions": "Apply this rule to newsletters" }, @@ -101,7 +103,7 @@ IMPORTANT: You must return a JSON object. { "rules": [{ - "name": "Forward Urgent Emails", + "name": "Forward Urgent", "condition": { "aiInstructions": "Apply this rule to emails mentioning system outages or critical issues" }, @@ -166,7 +168,7 @@ IMPORTANT: You must return a JSON object. { "rules": [{ - "name": "Reply to Call Requests", + "name": "Call Requests", "condition": { "aiInstructions": "Apply this rule to emails from people asking to set up a call" }, diff --git a/version.txt b/version.txt index bb0740c36d..7ad1d2ad1c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v2.17.39 +v2.17.40