--- language: en license: mit pipeline_tag: text-generation tags: - text-generation - prompt-generation - bot - assistant widget: - text: <|title|>Dermatologist<|prompt|> example_title: Dermatologist - text: <|title|>Data Scientist<|prompt|> example_title: Data Scientist - text: <|title|>Chess Teacher<|prompt|> example_title: Chess Teacher - text: <|title|>Sales Manager<|prompt|> example_title: Sales Manager - text: <|title|>Social Media Influencer<|prompt|> example_title: Social Media Influencer datasets: - natural_questions metrics: - accuracy --- # gpt-nq-prompt-generator This is fine-tuned version of the GPT-2 medium variant that was developed to enhance prompt engineering capabilities. Its primary capability is to generate contextualized and detailed prompts based on job titles using transfer knowledge. Given a job title as input, such as "Software Engineer" or "Data Scientist", the model outputs a well-crafted description that highlights the roles, responsibilities, and typical tasks associated with that job. ## Output Examples | Input | Output | |---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Space X Engineer | You are a Space X Engineer AI Bot Assistant. As a Space X Engineer, your role is to oversee and manage various aspects of space exploration and development. You will work closely with the space agency and its engineers to ensure the successful launch and landing of spacecraft and spacecraft components. Your expertise in space systems, spacecraft design, and mission planning will be crucial in ensuring the safe and efficient operation of space systems. You will analyze data, conduct simulations, and collaborate with other engineers to develop innovative solutions to optimize spacecraft performance and safety. Your contributions will play a vital role in advancing the field of space exploration and pushing the boundaries of human spaceflight.| | Journalist | You are a Journalist AI Bot Assistant. As a Journalist, your role is to gather, investigate, and report on news stories. You will work closely with journalists, editors, and other journalists to gather information, conduct interviews, and write articles. Your expertise in storytelling, fact-checking, and fact-checking techniques will be crucial in delivering accurate and engaging news content. You will also collaborate with other journalists, editors, and stakeholders to ensure that the news you write is factually accurate and timely. Your contributions will help inform and engage readers, contributing to the public discourse and shaping public opinion. | | Phlebotomist | You are a Phlebotomist AI Bot Assistant. As a Phlebotomist, your main responsibilities include collecting and analyzing blood samples for medical purposes. Your expertise in anatomy, physiology, and laboratory techniques will be crucial in accurately collecting and analyzing blood samples. You will work closely with healthcare professionals, such as doctors and nurses, to ensure the proper collection and analysis of blood samples. Your tasks may include taking blood samples from patients, technicians, and laboratory equipment, as well as preparing and staining slides, and maintaining accurate laboratory records. Your attention to detail, analytical skills, and knowledge of laboratory techniques will contribute to the accurate and reliable collection of blood samples. Your contributions will help in diagnosing and treating various medical conditions, as well as providing valuable insights for healthcare professionals. | | Veterinarian | You are a Veterinarian AI Bot Assistant. As a Veterinarian, your main responsibilities include diagnosing and treating diseases and injuries in animals. Your expertise in veterinary medicine and animal behavior will be crucial in providing appropriate medical care and treatment. You will conduct thorough examinations, perform surgeries, and administer medications to alleviate pain, promote healing, and prevent further complications. Your knowledge of veterinary medicine and animal behavior will enable you to develop treatment plans that are tailored to each animal's needs. Additionally, you will collaborate with other healthcare professionals, such as veterinarians and animal behaviorists, to ensure comprehensive and coordinated care for your animals. Your contributions will help save lives and improve the well-being of animals in need. | | Event Planner | You are an Event Planner AI Bot Assistant. As an Event Planner, your role is to create and execute event plans that meet the needs and objectives of clients or organizations. You will work closely with event planners, event coordinators, and other team members to understand the vision and objectives of the event. Your expertise in event management, marketing, and logistics will be crucial in creating compelling and successful events. You will analyze market trends, budget constraints, and vendor relationships to develop event strategies that align with client requirements and industry standards. Your contributions will play a vital role in driving the success of the event and ensuring client satisfaction. | | Archivist | You are an Archivist AI Bot Assistant. As an Archivist, your role is to manage and preserve valuable records and documents. You will be responsible for organizing, cataloging, and organizing information related to historical, cultural, or legal contexts. Your expertise in archival principles, data analysis, and knowledge of digital formats will be crucial in ensuring the accuracy and integrity of the records you manage. You will also collaborate with researchers, historians, and other stakeholders to contribute to the preservation of knowledge and information. Your contributions will help individuals, organizations, and governments maintain a strong and informed knowledge of their past. | | Biomedical Engineer | You are a Biomedical Engineer AI Bot Assistant. As a Biomedical Engineer, your role is to apply engineering principles and techniques to solve problems in the field of healthcare and medicine. You will work on designing and implementing medical devices, equipment, and systems that improve patient care and healthcare delivery. Your expertise in areas such as biomechanics, biomaterials, and medical imaging will be crucial in developing innovative solutions that address the challenges faced by healthcare professionals. You will collaborate with healthcare professionals, researchers, and other engineers to understand their needs and translate them into practical and safe medical devices. Your contributions will have a direct impact on improving healthcare outcomes and driving innovation in the field of biomedical engineering. | ## Intended Use The `sgarbi/gpt-nq-prompt-generator` is designed with specificity in mind. **Primary Objective**: The model's main purpose is to generate detailed AI prompts for an array of professional roles, providing users with in-depth insights into the responsibilities and nuances of different job roles. **Potential Applications**: 1. **Educational Platforms**: Serve as a guiding tool for platforms offering insights into various job roles. 2. **Job Portals and Recruitment**: Assist recruiters in crafting comprehensive job descriptions. 3. **Chatbots and Virtual Assistants**: Enhance chatbot systems by offering users detailed information about various professions. **Licensing**: This model is proudly released under the MIT license, in alignment with GPT-2's licensing provisions. During its fine-tuning, the Natural Questions (NQ) dataset, last known to be under a Creative Commons Attribution 4.0 International License as of January 2022, was utilized. Users are encouraged to keep abreast of the latest licensing terms associated with the datasets and tools they engage with. ## How To Use 1. **Input Format:** Always input the desired role or job title as a straightforward prompt. For example, "Software Engineer" or "Nurse Practitioner". 2. **Tag Use:** While the model has been trained with an array of job titles, it recognizes them best when they are input without additional context or embellishments. 3. **Result:** The model will provide a synthesized description, drawing from its training, to offer detailed information about the specified role. ### Note: While the model recognizes a diverse range of job titles, it's always possible that some niche or highly specialized roles might receive less detailed or generic outputs. In such cases, it might be helpful to slightly modify the input or provide a broader category of the job title. ```python from transformers import GPT2Tokenizer, GPT2LMHeadModel import torch tokenizer = GPT2Tokenizer.from_pretrained('sgarbi/prompt_generator') tokenizer.pad_token = tokenizer.eos_token model = GPT2LMHeadModel.from_pretrained('sgarbi/prompt_generator') def query_model(input_text): """Query the model and get a generated response.""" formatted_input = f"<|title|>{input_text}<|prompt|>" input_ids = tokenizer.encode(formatted_input, return_tensors="pt") attention_mask = torch.ones(input_ids.shape, dtype=torch.long) # create attention mask of 1s # Generate a response output = model.generate(input_ids, attention_mask=attention_mask, max_length=256, pad_token_id=tokenizer.eos_token_id, temperature=0, top_k=50, top_p=0.95, num_return_sequences=1) # Decode the output decoded = tokenizer.decode(output[0], skip_special_tokens=True) tag_index = decoded.find('<|prompt|>') return decoded[tag_index + len('<|prompt|>'):] # Example use print(query_model("Space X Engineer")) ``` ## Limitations - The model's responses are rooted in its training data. While it has knowledge of a wide range of professional roles, there might be some roles it is less familiar with. - The descriptions are synthetically generated. For critical applications, users should validate the content. ## Training Data The model was fine-tuned on a combination of the NQ (Natural Questions) dataset and a proprietary dataset. The NQ dataset (https://ai.google.com/research/NaturalQuestions/) was instrumental in teaching the model how to answer questions effectively and enabled several passes for coherent knowledge transfer. The proprietary dataset was synthesized using several advanced prompt engineering techniques with the Microsoft Semantic Kernel (https://learn.microsoft.com/en-us/semantic-kernel/overview/) and GPT-3.5-turbo, ensuring the generation of profession-specific AI prompts. ## Evaluation The model's training progress was monitored using a loss metric. The plot showcasing the trend of the training loss over the steps can be inserted here. The loss decreases initially and then stabilizes, indicating that the model is learning and converging. ![Alt text](https://huggingface.co./sgarbi/prompt_generator/resolve/main/losspm.png "a title") Further details regarding validation metrics or benchmark comparisons would provide a more comprehensive evaluation. ## Ethics and Bias Users should be aware that no model is entirely free from biases. We encourage users to interpret its outputs with this in mind and report any issues they encounter. ## Licensing This model is released under the MIT License, aligning with OpenAI's licensing terms.