ChatGPT can help us learn new programming languages, courses, techniques, and skills. It has become a go-to tool for many professionals seeking to improve their workflows or learn something new. ChatGPT expert helper prompts can reduce our dependence on Google and provide detailed plans for achieving goals.
In this post, you will learn to leverage simple ChatGPT prompts for learning a technique or performing specialized tasks. Specifically, you will learn how to:
- Generate instructions for training a model on a TPU (Tensor Processing Unit).
- Generate detailed instructions for safely cutting down a tree.
- Craft expert helper prompts.
Get started and apply ChatGPT with my book Maximizing Productivity with ChatGPT. It provides real-world use cases and prompt examples designed to get you using ChatGPT quickly.
Let’s get started.
This post is divided into three parts; they are
- Accelerating Machine Learning Models with TPUs
- A Guide to Safely Cutting Down a Tree
- Tips on Writing Expert Helper Prompts
Accelerating Machine Learning Models with TPUs
In the first example, you will address a specialized issue many data scientists may be unaware of. To accelerate machine learning model training, most engineers currently utilize GPUs (Graphics Processing Units) or multiple GPUs. However, TPUs (Tensor Processing Units) can provide even faster training times. You may not be able to find many instructions to use TPUs, but you can ask ChatGPT for help by writing a correct prompt.
In your prompt, you should define:
- Actor: ChatGPT should behave as a professional Machine Learning Engineer.
- Request: write code for training image classifier on TPU.
- Environment: Google Colab.
For example, the prompt can be the following:
Act as a professional Machine Learning Engineer and write the Python code for training the TensorFlow Image classification model on TPU. The computing environment is Google Colab.
This is the output you may see from ChatGPT’s response:
import tensorflow as tf
# Check if TPU is available
tpu = tf.distribute.cluster_resolver.TPUClusterResolver() # TPU detection
strategy = tf.distribute.experimental.TPUStrategy(tpu)
print("Running on TPU:", tpu.master())
strategy = tf.distribute.OneDeviceStrategy("GPU")
print("Running on GPU or CPU")
# Load and preprocess your dataset
# Replace `your_dataset` with your own dataset loading and preprocessing code
# Define the model architecture
# Replace `your_model` with your own model architecture
# Compile the model
# Replace `your_loss`, `your_metrics`, and `your_optimizer` with appropriate values
model = your_model
model.compile(loss=your_loss, metrics=your_metrics, optimizer=your_optimizer)
# Define training parameters
# Replace `your_epochs` and `your_batch_size` with appropriate values
epochs = your_epochs
batch_size = your_batch_size
# Train the model
# Replace `your_training_data` with your own training data
model.fit(your_training_data, epochs=epochs, batch_size=batch_size)
# Evaluate the model
# Replace `your_test_data` with your own test data
loss, accuracy = model.evaluate(your_test_data)
print("Test loss:", loss)
print("Test accuracy:", accuracy)
The ChatGPT example demonstrates how to train a model on TPU by generating Python code with placeholders. To properly execute the code, you must replace the placeholders with your dataset loading and preprocessing code, model architecture, loss function, evaluation metrics, optimizer, training parameters, training data, and test data.
After replacing the code, you can copy and paste it into a new Colab notebook and run the code with TPU hardware acceleration. The code you obtained may not be fully executable and may contain some bugs. However, you should be able to identify them and correct them easily.
Note: Output from ChatGPT is not always correct. You must verify the accuracy using other means.
A Guide to Safely Cutting Down a Tree
In the second example, you will focus on the non-technical techniques required to cut down the tree safely. To get appropriate instructions, you must provide sufficient circumstances in the prompt, such as:
- Actor: ChatGPT should behave as an experienced professional arborist.
- Request: List down the steps required for cutting down a tree safely.
- Environment: The tree is Box Elder, 50 feet tall, in between two houses.
- Location: Suburbs, Mountain View, and California.
As an example, the prompt to ChatGPT can be:
Act as an experienced professional arborist and list the critical safety procedures for removing a 50-foot-tall Box Elder tree located between two houses in a suburban neighborhood in Mountain View, California.
This is what you may see in the output:
As an experienced professional arborist, I can provide you with a list of critical safety procedures for removing a 50-foot-tall Box Elder tree located between two houses in a suburban neighborhood in Mountain View, California. It’s important to note that tree removal can be dangerous, and I highly recommend consulting with a certified arborist or tree removal professional for such a task. Nevertheless, here are some general safety procedures to consider:
- Perform a thorough assessment: Before starting the tree removal process, assess the tree’s condition, potential hazards, and the surrounding area. Look for signs of decay, disease, or structural weaknesses that may affect the tree’s stability.
- Obtain necessary permits: Check with the local authorities and obtain any required permits or permissions for tree removal in Mountain View, California. Compliance with local regulations is crucial to ensure safety and avoid legal issues.
- Use proper personal protective equipment (PPE): Wear appropriate PPE, including a hard hat, safety glasses, ear protection, gloves, and sturdy, non-slip boots. PPE helps protect against falling debris and other potential hazards.
- Establish a safety zone: Clearly mark and secure the area around the tree to prevent unauthorized access. Use caution tape or barricades to keep pedestrians and vehicles away from the work zone.
- Plan for equipment and personnel: Determine the necessary equipment, tools, and personnel required for safe tree removal. This may include chainsaws, ropes, rigging equipment, and an experienced crew.
- Engage in proper pruning techniques: If necessary, perform tree pruning to remove dead branches or reduce the tree’s weight before the main removal process. Proper pruning techniques help prevent accidents and control the tree’s fall direction.
- Conduct controlled tree felling: When felling the tree, employ proper cutting techniques to ensure a controlled fall. Consider the tree’s lean, surrounding obstacles, wind direction, and other factors that might influence its fall path.
- Use rigging and lowering devices: If the tree’s location poses a risk to nearby structures or obstacles, utilize rigging and lowering devices to safely control the tree’s descent. This technique helps minimize the potential for property damage and injury.
- Perform tree removal in sections: When dealing with larger trees, it’s often safer to remove them in sections. This involves carefully cutting and lowering smaller portions of the tree to the ground rather than attempting to fell the entire tree at once.
- Use proper tree removal techniques: Follow industry best practices for tree removal, including making precise cuts, avoiding excessive force, and maintaining control throughout the process. Be aware of potential hazards such as limb kickback and split wood.
- Consider hiring professionals: Given the complexity and potential risks involved in removing a 50-foot-tall tree between two houses, it’s strongly recommended to engage the services of a certified arborist or experienced tree removal company. Their expertise and specialized equipment will help ensure a safe and efficient removal process.
Remember, tree removal can be extremely hazardous, especially when dealing with large trees or those in close proximity to structures. Prioritizing safety at all times is essential to protect yourself, your crew, and the surrounding property.
The list generated covered many important safety steps. However, removing a large tree like the one described is a complex undertaking that likely requires specialized equipment, trained personnel, required permits, proper techniques, access to key details, and contingency planning. Even if you hire professionals, you need access to the tree’s location, area, and spread before giving a green light.
In conclusion, it may not be a good idea to follow ChatGPT’s instructions to do such work, even though it gives many details on how to do so. Hiring a certified arborist and insured tree removal company to do this job may be a wiser decision.
Tips on Writing Expert Helper Prompts
Think of speaking with a real professional lawyer or doctor — you wouldn’t walk in and vaguely say “I need help.” You would thoroughly explain the who, what, where, why, and how behind your specific request. The same principle applies when using ChatGPT expert helpers.
To generate effective expert helper prompts with ChatGPT, provide it with as much relevant context as possible. Explain:
- The role or profession of the expert you want assistance from. Be specific. For example: “a certified arborist”
- The nature of the task or request. Be clear, direct, and provide key details. For example: “Safely remove this 50-foot tall tree between two houses.”
- Any variables, constraints, or conditions that impact the situation. Give measurements, locations, and specifications as needed.
Environmental factors, circumstances, or obstacles that introduce complexity.
- The required outcome or goal you hope to achieve.
The more accurate, specific, and robust the description of your scenario, the more precise and useful ChatGPT’s response will likely be. ChatGPT’s ability to simulate an “expert” is constrained by the clarity and completeness of the information you provide to frame the context.
In this post, we discussed how to craft ChatGPT expert helper prompts to generate helpful responses. Specifically, we covered:
- How to write a well-explained prompt for accelerating machine learning models training with TPUs.
- How to generate a list of the critical safety procedures for removing a tree. It is more complex than you think.
- Tips for crafting more targeted prompts that provide a clear description of the task from the perspective of the relevant expert include necessary variables and a defined objective.