language: en
license: mit
pipeline_tag: text-generation
tags:
- text-generation
- prompt-generation
- bot
- assistant
sgarbi/prompt_generator
Model Description
This model is a fine-tuned version of the GPT-2 medium variant. Initially trained on the NaturalQuestions dataset, it underwent additional fine-tuning on a proprietary dataset to generate AI prompts for various professional roles. The proprietary dataset was crafted using an innovative blend of custom scripts, advanced prompt engineering techniques with GPT-3.5-turbo, and insights from the Microsoft Semantic Kernel.
Intended Use
The primary use-case for this model is to generate detailed AI prompts for various professional roles. It can be employed in applications that require role-specific descriptions or AI-generated insights about a profession.
How To Use
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"))
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. |
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 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 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.
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.
language: - ru - en tags: - translation license: apache-2.0 datasets: - wmt19 metrics: - bleu - sacrebleu
Licensing
This model is released under the MIT License, aligning with OpenAI's licensing terms.