# Create a function that takes description, user_id, language, tone, more_details, and additional_info as arguments and returns a prompt as response.
def create_prompt(description, use_case, language, tone, more_details, additional_info):
starting_prompt = base_prompt(use_case, description, more_details, additional_info)
if language == "English":
prompt = starting_prompt
pass
else:
prompt = starting_prompt + f"""/n The user has requested the response to be in {language} language. /n"""
if tone is not None:
prompt += f"""The response should be in {tone} tone. /n"""
return prompt
def base_prompt(use_case, description, more_details, additional_info):
# Select the appropriate prompt based on the use case
if use_case == "Email Responder":
return email_responder_prompt(description, more_details, additional_info)
elif use_case == "Rewrite Content":
return rewrite_content_prompt(description, more_details, additional_info)
elif use_case == "Autowrite":
return autowrite_prompt(description, more_details, additional_info)
elif use_case == "Expert Writing Assistant":
return expert_writing_assistent_prompt(description, more_details, additional_info)
elif use_case == "Cover Letter":
return cover_letter_prompt(description, more_details, additional_info)
elif use_case == "Post Generator":
return post_generator_prompt(description, more_details, additional_info)
elif use_case == "SEO Friendly Blog Post":
return seo_friendly_blog_post(description, more_details, additional_info)
elif use_case == "Blog Post Title Generator":
return blog_post_title_generator(description, more_details, additional_info)
elif use_case == "Caption Generator":
return caption_generator_prompt(description, more_details, additional_info)
elif use_case == "SEO Keyword Generator":
return seo_keyword_generator_prompt(description, more_details, additional_info)
elif use_case == "Keywords Extractor":
return keywords_extractor_prompt(description, more_details, additional_info)
elif use_case == "Marketing Assistant":
return marketing_assistent_prompt(description, more_details, additional_info)
elif use_case == "Blog Post Generator":
return blog_post_generator_prompt(description, more_details, additional_info)
elif use_case == "Copy Writing":
return copy_writing_prompt(description, more_details, additional_info)
elif use_case == "Text Summarizer":
return text_summerizer_prompt(description, more_details, additional_info)
elif use_case == "Resume Optimizer":
return resume_optimizer_prompt(description, more_details, additional_info)
elif use_case == "Speech Writer":
return speech_write_prompt(description, more_details, additional_info)
elif use_case == "Text Expander":
return text_expander_prompt(description, more_details, additional_info)
elif use_case == "Text Editor":
return text_editor_prompt(description, more_details, additional_info)
elif use_case == "Text Paraphraser":
return text_paraphraser_prompt(description, more_details, additional_info)
elif use_case == "Proofreader":
return proofreader_prompt(description, more_details, additional_info)
elif use_case == "Proposal Generator":
return proposal_generator(description, more_details, additional_info)
elif use_case == "Financial Advisor":
return financial_advisor_prompt(description, more_details, additional_info)
elif use_case == "Legal Advisor":
return legal_advisor_prompt(description, more_details, additional_info)
elif use_case == "Medical Advisor":
return medical_advisor_prompt(description, more_details, additional_info)
elif use_case == "Career Advisor":
return career_advisor_prompt(description, more_details, additional_info)
elif use_case == "Content Moderation":
return content_moderation(description, more_details, additional_info)
elif use_case == "Explain Like I'm 5":
return explain_like_5_prompt(description, more_details, additional_info)
elif use_case == "Academic Essay Writer":
return academic_essay_writer_prompt(description, more_details, additional_info)
elif use_case == "Question Answering":
return question_answering_prompt(description, more_details, additional_info)
else:
return "Invalid use case. Please select a valid use case."
def email_responder_prompt(current_email, more_details, additional_info):
prompt = f"""You are an AI-powered email responder. Given the following email: ``` {current_email} ```. Generate a well-written response based on the additional Shorthand Response. \n"""
if more_details is not None:
prompt += f"""Shorthand Response : ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""The user has provided additional information: {additional_info}. \n"""
return prompt
def rewrite_content_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered content rewriter. Given the following content: ``` {content} ```. \n Rewrite the content in a different way, while keeping the same meaning. \n"""
if more_details is not None:
prompt += f"""Additional Information : ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""The user has provided additional information: {additional_info}. \n"""
return prompt
def autowrite_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered writer. Please accomplish the following writing task: ``` {content} ``` \n"""
if more_details is not None:
prompt += f"""Additional Information : ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""The user has provided additional information: {additional_info}. \n"""
return prompt
def expert_writing_assistent_prompt(content, more_details, additional_info):
prompt = f"""You are an Expert AI-powered writing assistant that can draft, improve writing, give advice. Please provide expert advice and assistance on the following writing task: ``` {content} ``` \n"""
if more_details is not None:
prompt += f"""Additional Information : ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""The user has provided additional information: {additional_info}. \n"""
return prompt
def cover_letter_prompt(job_description, resume, additional_info):
prompt = f"""You are an AI-powered cover letter writer. Generate a customized cover letter given the following job description: ``` {job_description} ```. \n"""
if resume is not None:
prompt += f"""Here is the resume: ```{resume}``` \n"""
if additional_info is not None:
prompt += f"""The user has provided additional information: {additional_info}. """
return prompt
def post_generator_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered post generator. Create a compelling Linkedin post based on the following description or ideas: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""Post Description : ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information: ``` {additional_info} ``` \n"""
return prompt
def seo_friendly_blog_post(keywords, more_details, additional_info):
prompt = f"""You are an AI-powered SEO-friendly blog post writer. Write a high quality SEO friendly blog post about the following topic and keywords: ``` {keywords} ```. \n"""
if more_details is not None:
prompt += f"""More Information on Blog: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information: ``` {additional_info} ``` \n"""
return prompt
def blog_post_title_generator(keywords, more_details, additional_info):
prompt = f"""You are an AI-powered blog post title generator. Generate a list of catchy blog post titles related to following topic and keywords: ``` {keywords} ```. \n"""
if more_details is not None:
prompt += f"""More Information on Blog Titles: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information on blog titles: ``` {additional_info} ``` \n"""
return prompt
def caption_generator_prompt(keywords, more_details, additional_info):
prompt = f"""You are an AI-powered caption generator. Generate a creative Instagram/ Facebook Caption based on the following idea or keyword: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for generating Caption: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional informationfor geneating caption: ``` {additional_info} ``` \n"""
return prompt
def seo_keyword_generator_prompt(company_name, target_details, additional_info):
prompt = f"""You are an AI-powered SEO keyword generator. Research trending and popular topics related to the company and its industry. Identify key terms, phrases,
and issues that business customers are currently interested in. Generate a list of recommended keywords that can be used to create SEO-friendly content. The keywords should be relevent
to the business, popular in serches and likely to attract intended target audience. \n
Company Name: ``` {company_name} ```. \n
Target Audience Details: ``` {target_details} ```. \n"""
if additional_info is not None:
prompt += f"""Additional information: ``` {additional_info} ``` \n"""
return prompt
def keywords_extractor_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered keywords extractor. Analyze the given text and identify the most relevent and important keywords. The keywords should reflect the main topics
or themes of the text. Exclude common words and phrases that are not specific to the content. Only return the highest quality keywords that are most relevant keywords. \n
Text: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for extracting Keywords: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for extracting keywords: ``` {additional_info} ``` \n"""
return prompt
def marketing_assistent_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered marketing assistant. You have been asked to perform the following marketing task: ``` {content} ```. \n """
if more_details is not None:
prompt += f"""More Information for marketing task: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for marketing task: ``` {additional_info} ``` \n"""
prompt += f"""Provide expert advice, recommendations, and strategies to improve the marketing campaign. \n"""
return prompt
def blog_post_generator_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered blog post generator. Find relevent information and Create a high quality blog post based on the following topics or idea or keywords: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for generating Blog Post: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for generating blog post: ``` {additional_info} ``` \n"""
return prompt
def copy_writing_prompt(task_description, goal, additional_info):
prompt = f"""Given the described task and goal, think through the problem and user's intentions. Then generate a high-quality, unique, and natural-sounding copy that meets the user's needs.
The copy should be persuasive, engaging, compelling, and tailored to the target audience. Ensure that the tone is appropriate for the context and the message is clear and concise. \n"""
if task_description is not None:
prompt += f"""Task Description: ``` {task_description}. ``` \n"""
if goal is not None:
prompt += f"""Goal: ``` {goal}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information: ``` {additional_info} ``` \n"""
return prompt
def text_summerizer_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered text summarizer. Provide a concise summary of the following text or linked text, highlighting the key points and information. \n
Text: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for summarizing text: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for summarizing text: ``` {additional_info} ``` \n"""
return prompt
def resume_optimizer_prompt(resume, job_description, additional_info):
prompt = f"""You are an AI-powered resume optimizer. Analyze the provided resume and job description. Identify areas where the resume can be improved to better match the job description.
Provide suggestions for changes in content, structure, and wording to make resume more effective. These suggestions should be actionalable and specific, focusing on both the content of
of the resume (such as adding missing skills or experience) or its presentation (such as improving readability ir formatting). \n
Resume: ``` {resume} ```. \n
Job Description: ``` {job_description} ``` \n """
if additional_info is not None:
prompt += f"""Additional information: ``` {additional_info} ``` \n"""
return prompt
def speech_write_prompt(topic, more_details, additional_info):
prompt = f"""You are an AI-powered speech writer. Write a compelling and engaging speech on the following. \n
Topic: ``` {topic} ```. \n
Details: ``` {more_details} ```. \n"""
if additional_info is not None:
prompt += f"""Additional information for writing speech: ``` {additional_info} ``` \n"""
return prompt
def text_expander_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered text expander. Given the text, generate an extended version that provides more details, depth, and context. The expanded text should maintain same overall
message and tone as the original text, but should more comprehensive and elaborate. You can expend ideas and concepts presented. Or provide additional information, examples, and details to
further develop the content. \n
Original Text: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for expanding text: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for expanding text: ``` {additional_info} ``` \n"""
return prompt
def text_editor_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered text editor. Given the following text, revise and improve it to make it more clear, concise, and engaging. Correct any grammatical errors, spelling mistakes,
punctuation errors, redundant words or awkward phrasing. Ensure that the text is well-structured, flows smoothly, and effectively communicates the intended message.
Also suggest the ways to improve the style and tone of the text to make it more engaging and effective.\n
Original Text: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for editing text: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for editing text: ``` {additional_info} ``` \n"""
return prompt
def text_paraphraser_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered text paraphraser. Given the following text, rewrite it in a different way while keeping the same meaning. The paraphrased text should be unique,
original, and well-written. It should maintain the same overall message and tone as the original text, but should use different words, sentence structures, and phrasing.\n
Original Text: ``` {content} ``` \n"""
if more_details is not None:
prompt += f"""More Information for paraphrasing text: ``` {more_details} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for paraphrasing text: ``` {additional_info} ``` \n"""
return prompt
# Proofreads documents for grammatical errors, typos, and inconsistencies, and suggests improvements.
def proofreader_prompt(content, more_details, additional_info):
prompt = f"""You are an AI-powered proofreader. Given the following text, proofread it for grammatical errors, typos, punctuation errors, and inconsistencies. Correct any mistakes and
suggest improvements to make the text more clear, concise, and effective. Do not change the overall content or meaning of the document. Only make changes that improve the quality of writing.
\n
Text: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for proofreading text: ``` {more_details} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for proofreading text: ``` {additional_info} ``` \n"""
return prompt
# Generates a detailed proposal based on a given project idea and specific goals.
def proposal_generator(idea, specific_goals, additional_information):
prompt = f"""You are an AI-powered proposal generator. Create a detailed proposal based on the following project idea and specific goals. The proposal should outline the project scope,
objectives, deliverables, and any other relevant information. It should be well-structured, persuasive, and tailored to the target audience. \n
Project Idea: ``` {idea} ```. \n
Specific Goals of the project are: ``` {specific_goals} ```. \n"""
if additional_information is not None:
prompt += f"""Additional information for generating proposal: ``` {additional_information} ``` \n"""
return prompt
def financial_advisor_prompt(financial_goal, current_financial_status, risk_tolerance):
prompt = f"""You are an AI-powered financial advisor. Analyze the user's financial goal , risk tolerance, and current financial status. Based on the information
provide expert advice and recommendations on how to achieve the financial goal and create a comprehensive investment plan. Plan should include diversed portofolio,
recommended savings and investment strategies, and advise for managing risk.
The advice should be tailored to the user's specific situation and goals, and should include actionable steps and strategies to improve financial health and achieve financial goals.
Provide a disclamier that the advice should be treated as a starting point for learning. \n
Financial Goal: ``` {financial_goal} ```. \n
Current Financial Status: ``` {current_financial_status} ``` \n"""
# Low/ Medium/ High
if risk_tolerance is not None:
prompt += f"""Risk Tolerance: ``` {risk_tolerance} ``` \n"""
return prompt
def legal_advisor_prompt(case_description, legal_issue, additional_info):
prompt = f"""You are an AI-powered legal advisor. Analyze the user's case description and legal issue. Provide expert advice and recommendations on how to resolve the legal issue and
provide guidance on the best course of action. The advice should be tailored to the user's specific situation and should include actionable steps and strategies to resolve the issue.
Provide a disclaimer that the advice should be treated as a starting point for learning. \n
Case Description: ``` {case_description} ```. \n
Legal Issue: ``` {legal_issue} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for providing legal advice: ``` {additional_info} ``` \n"""
return prompt
def medical_advisor_prompt(symptoms, medical_history, additional_info):
prompt = f"""You are an AI-powered medical advisor. Analyze the user's symptoms and medical history. Provide expert advice and recommendations on the possible causes of the symptoms,
potential treatments, and next steps. The advice should be tailored to the user's specific situation and should include actionable steps and strategies to improve health and well-being.
Provide a disclaimer that the advice should be treated as a starting point for learning. \n
Symptoms: ``` {symptoms} ```. \n
Medical History: ``` {medical_history} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for providing medical advice: ``` {additional_info} ``` \n"""
return prompt
def career_advisor_prompt(career_goal, current_job_status, additional_info):
prompt = f"""You are an AI-powered career advisor. Analyze the user's career goal and current job status. Provide expert advice and recommendations on how to achieve the career goal,
improve job satisfaction, and advance in the chosen field. The advice should be tailored to the user's specific situation and should include actionable steps and strategies to achieve
career success. Provide a disclaimer that the advice should be treated as a starting point for learning. \n
Career Goal: ``` {career_goal} ```. \n
Current Job Status: ``` {current_job_status} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for providing career advice: ``` {additional_info} ``` \n"""
return prompt
def content_moderation(content, more_details, additional_info):
prompt = f"""You are an AI-powered content moderator. Given the following content, analyze it for any inappropriate, offensive, or harmful material.
Identify any potential issues and provide recommendations on how to address them. The recommendations should be actionable and specific, focusing on how to improve the content
to make it more appropriate and safe. \n
Content: ``` {content} ```. \n"""
if more_details is not None:
prompt += f"""More Information for moderating content: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for moderating content: ``` {additional_info} ``` \n"""
return prompt
def explain_like_5_prompt(topic, more_details, additional_info):
prompt = f"""You are an AI-powered explainer. Explain the following topic in simple terms, as if you were explaining it to a 5-year-old.
The explanation should be easy to understand, engaging, and informative. Use simple language, clear examples, and relatable analogies to help the 5-year-old understand the topic. \n
Topic: ``` {topic} ```. \n"""
if more_details is not None:
prompt += f"""More Information for explaining topic: ``` {more_details}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for explaining topic: ``` {additional_info} ``` \n"""
return prompt
# Creates a draft of an academic essay based on a given prompt, using specified resources and following any additional instructions.
def academic_essay_writer_prompt(prompt, resources, additional_info):
prompt = f"""You are an academic essay writer. Write a draft of an academic essay based on the following prompt. Use the specified resources and follow any additional instructions
provided. The essay should be well-researched, well-structured, and well-written. It should present a clear argument, provide evidence to support the argument, and cite sources properly. \n
Prompt: ``` {prompt} ```. \n"""
if resources is not None:
prompt += f"""Following these additional instructions:: ``` {resources}. ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for writing essay: ``` {additional_info} ``` \n"""
return prompt
def question_answering_prompt(question, context, additional_info):
prompt = f"""You are an AI-powered question answering system. Given the following question and context, provide a well-reasoned and accurate answer.
The answer should be based on the information provided in the context and should be clear, concise, and informative. \n
Question: ``` {question} ```. \n
Context: ``` {context} ``` \n"""
if additional_info is not None:
prompt += f"""Additional information for answering question: ``` {additional_info} ``` \n"""
return prompt