curiousgeorge1292 commited on
Commit
48674a5
·
verified ·
1 Parent(s): c6c8bcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -22
app.py CHANGED
@@ -282,36 +282,68 @@ def generate_email(name, email, prospect_name, linkedin_url, website_url, contex
282
  # Construct the purpose-specific prompt
283
  if email_purpose == "Job Application":
284
  prompt = f"""
285
- You are an AI assistant helping a professional draft a personalized job application email.
286
- Here are the details of the applicant:
287
- - Name: {name}
288
- - Current Professional Title: {professional_title}
289
- - Interested in position: {interested_position}
290
- - Interested in the company (fetch company name from): {website_content}
291
-
292
- The applicant has expertise in the following:
 
 
293
  {personal_background}
294
-
295
- Draft a personalized job application email addressing {prospect_name} highlighting the applicant's relevant skills and achievements.
296
- Ensure the email is professional, engaging, and stays within {word_count} words (5-10% flexibility).
297
- Please Output the email in HTML format only.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  """
299
  elif email_purpose == "Sales Cold Email":
300
  prompt = f"""
301
- You are an AI assistant helping a company draft personalized sales emails.
302
- Here are the details of the prospect:
 
303
  - Name: {prospect_name}
304
  - LinkedIn Insights: {linkedin_insights}
305
- - Prospect's Website : {website_content}
306
  - Additional Context: {context_content}
307
 
308
- The company provides the following offerings:
309
- {company_content}
310
-
311
- Draft a personalized sales email addressing the prospect's specific needs and pain points.
312
- Focus on highlighting only relevant solutions from the company's offerings in {company_content}.
313
- Ensure the email is professional, engaging, and stays within {word_count} words (5-10% flexibility).
314
- Please Output the email in HTML format only.
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  """
316
  else:
317
  return "Invalid email purpose selected. Please choose either 'Job Application' or 'Sales Cold Email'."
 
282
  # Construct the purpose-specific prompt
283
  if email_purpose == "Job Application":
284
  prompt = f"""
285
+ Prompt:
286
+ You are an AI assistant specializing in drafting personalized job application emails for professionals seeking career opportunities.
287
+
288
+ Applicant Details:
289
+
290
+ Name: {name}
291
+ Current Professional Title: {professional_title}
292
+ Position of Interest: {interested_position}
293
+ Company Name (extract from website): {website_content}
294
+ Applicant Expertise and Background:
295
  {personal_background}
296
+
297
+ Email Requirements:
298
+
299
+ Address the recipient, {prospect_name}, appropriately and professionally.
300
+ Emphasize the applicant's relevant skills, achievements, and experiences that align with the position and company's goals.
301
+ Demonstrate a genuine interest in the company and position, referencing specific details from {website_content}.
302
+ Maintain a professional and engaging tone.
303
+ Keep the email within {word_count} words (5-10% flexibility).
304
+ Format the email in HTML.
305
+ Additional Instructions:
306
+
307
+ Begin with a compelling subject line tailored to the job application.
308
+ Structure the email with a clear introduction, body, and conclusion.
309
+ Highlight the unique value the applicant brings to the company.
310
+ Incorporate a personalized touch to establish rapport (e.g., reference the company's values, mission, or recent achievements).
311
+ End with a confident and actionable call-to-action (e.g., requesting an interview or further discussion).
312
+ Ensure the email is free of jargon, grammatical errors, and overly complex language.
313
+ Be concise yet impactful in communicating the applicant's fit for the role.
314
+ Task:
315
+ Draft a personalized job application email following the specifications outlined above in HTML format only.
316
  """
317
  elif email_purpose == "Sales Cold Email":
318
  prompt = f"""
319
+ You are an AI assistant specializing in crafting personalized sales emails for a company, which offers {company_content}.
320
+
321
+ Prospect Details:
322
  - Name: {prospect_name}
323
  - LinkedIn Insights: {linkedin_insights}
324
+ - Website Content: {website_content}
325
  - Additional Context: {context_content}
326
 
327
+ Company Name, extract from: {company_content}
328
+ Company Offerings:{company_content}
329
+
330
+ Email Requirements:
331
+ - Address the prospect's specific needs and pain points.
332
+ - Highlight relevant solutions from the company's offerings.
333
+ - Maintain a professional and engaging tone.
334
+ - Limit the email to {word_count} words (with a 5-10% flexibility).
335
+ - Format the email in HTML only.
336
+
337
+ Additional Instructions:
338
+ - Begin with a compelling subject line that captures the prospect's attention.
339
+ - Structure the email with a clear introduction, body, and conclusion.
340
+ - Include a personalized anecdote or reference to establish rapport.
341
+ - Emphasize the unique value proposition of the company's offerings.
342
+ - Conclude with a clear and actionable call-to-action.
343
+ - Avoid jargon unless commonly understood in the prospect's industry.
344
+ - Ensure the email is free from grammatical errors and typos.
345
+
346
+ Please generate the email based on the above specifications in HTML format only.
347
  """
348
  else:
349
  return "Invalid email purpose selected. Please choose either 'Job Application' or 'Sales Cold Email'."