Project Management

Please login or join to subscribe to this thread

Successful Triangle Professional Prompt For Any AI Model

linkedin twitter facebook  
avatar
Erick Rene Sanchez Campos CEO| HotPot 101

My Triangle Professional Prompt is very efficient, practical, and easy to use.

The first step is to introduce who you are. This is very important because it helps the AI Model identify your professional field. Next, clearly explain your main requirement and exactly what you want the Ai model to do, including how want the task completed. For example, if the task involves coding, specify the programming language or format you need, such as Python, SQL, R Studio, or others. Finally, define any restrictions or expectations for the answer in three pages or on the other hand, if you may prefer a short response in only one sentence.

Let's do an. example:

Triangle Professional Prompt:

Example in My Field: Data Science Focused on Real Estate Project Management

You are a Senior Data Scientist who needs to review the following code for an upcoming real estate project with your team. Please correct any syntax issues related to the data visualization graphics found in the code below. Make the code clear and organized for my team, and most importantly, summarize and extend the explanation within one page only.

Code

str(merge_data)

summary(merge_data)

# Standardize house type names

merge_data$type[merge_data$type == 'town house'] <- 'townhouse'

merge_data$type[merge_data$type == 'condominium'] <- 'condo'

### One-Variable Visualizations

# Histogram

merge_data$type <- as.factor(merge_data$type)

hist(

merge_data$soldprice[merge_data$type == "single-family home"],

col = rgb(1,0,0,0.25),

ylim = c(0,60),

breaks = seq(0, 2500000, 100000),

xlab = "Sold Price",

main = "Histogram of Sold Prices"

)

# Add additional histograms

hist(

merge_data$soldprice[merge_data$type == "multi-family home"],

col = rgb(0,1,0,0.25),

breaks = seq(0, 2500000, 100000),

add = TRUE

)

hist(

merge_data$soldprice[merge_data$type == "condo"],

col = rgb(0,0,1,0.25),

breaks = seq(0, 2500000, 100000),

add = TRUE

)

hist(

merge_data$soldprice[merge_data$type == "townhouse"],

col = rgb(0,0,0.2,0.25),

breaks = seq(0, 2500000, 100000),

add = TRUE

)

legend(

"topright",

c("single-family home", "multi-family home", "condo", "townhouse"),

col = c(

rgb(1,0,0,0.25),

rgb(0,1,0,0.25),

rgb(0,0,1,0.25),

rgb(0,0,0.3,0.25)

),

lwd = 10

)

# Bar Plot

typeOfHouse <- table(merge_data$type)

typeOfHouse

barplot(

typeOfHouse,

ylab = "Count",

col = "blue",

cex.names = 1,

main = "# of Different House Types"

)

# Box Plot

merge_data_withCooling <- merge_data[merge_data$cooling == 'Yes', ]

merge_data_withoutCooling <- merge_data[merge_data$cooling == 'No', ]

par(mfrow = c(1,2))

boxplot(

merge_data_withCooling$year,

main = 'Year of Houses with Cooling',

ylim = c(1900, 2025)

)

boxplot(

merge_data_withCooling$year,

horizontal = TRUE,

axes = FALSE,

staplewex = 1

)

text(

x = fivenum(merge_data_withCooling$year),

labels = fivenum(merge_data_withCooling$year),

y = 1.25

)

boxplot(

merge_data_withoutCooling$year,

main = 'Year of Houses without Cooling',

ylim = c(1900, 2025)

)

boxplot(

merge_data_withoutCooling$year,

horizontal = TRUE,

axes = FALSE,

staplewex = 1

)

text(

x = fivenum(merge_data_withoutCooling$year),

labels = fivenum(merge_data_withoutCooling$year),

y = 1.25

)

### Two-Variable Visualizations

# Scatter Plot and Regression Line

model0 <- lm(soldprice ~ lotsize, data = merge_data)

model0

summary(model0)

# Interpretation:

# As lot size increases, the sold price generally becomes more expensive.

# This regression result makes sense because larger lots tend to have higher property values.

par(mfrow = c(1,1))

plot(

merge_data$lotsize[merge_data$neighborhood == "Blue"],

merge_data$soldprice[merge_data$neighborhood == "Blue"],

main = "Sold Price vs. Lot Size",

xlim = c(0,1.5),

ylim = c(0,2400000),

xlab = "Lot Size",

ylab = "Sold Price",

pch = 1,

col = "blue"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Gold"],

merge_data$soldprice[merge_data$neighborhood == "Gold"],

pch = 2,

col = "gold"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Green"],

merge_data$soldprice[merge_data$neighborhood == "Green"],

pch = 3,

col = "green"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Orange"],

merge_data$soldprice[merge_data$neighborhood == "Orange"],

pch = 4,

col = "orange"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Purple"],

merge_data$soldprice[merge_data$neighborhood == "Purple"],

pch = 5,

col = "purple"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Red"],

merge_data$soldprice[merge_data$neighborhood == "Red"],

pch = 6,

col = "red"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Silver"],

merge_data$soldprice[merge_data$neighborhood == "Silver"],

pch = 7,

col = "gray"

)

points(

merge_data$lotsize[merge_data$neighborhood == "Yellow"],

merge_data$soldprice[merge_data$neighborhood == "Yellow"],

pch = 8,

col = "yellow"

)

legend(

"topright",

c("Blue", "Gold", "Green", "Orange", "Purple", "Red", "Silver", "Yellow"),

col = c("blue", "gold", "green", "orange", "purple", "red", "gray", "yellow"),

pch = 1:8)

Ai Response:

# Real Estate Data Visualization

# Inspect data

str(merge_data)

summary(merge_data)

# Clean house type labels

merge_data$type[merge_data$type == "town house"] <- "townhouse"

merge_data$type[merge_data$type == "condominium"] <- "condo"

merge_data$type <- as.factor(merge_data$type)

# ---------------------------

# One-Variable Visualizations

# ---------------------------

# Histogram of Sold Prices

b <- seq(0, 2500000, 100000)

hist(merge_data$soldprice[merge_data$type=="single-family home"],

col=rgb(1,0,0,.25), breaks=b, ylim=c(0,60),

main="Sold Prices by House Type", xlab="Sold Price")

hist(merge_data$soldprice[merge_data$type=="multi-family home"],

col=rgb(0,1,0,.25), breaks=b, add=TRUE)

hist(merge_data$soldprice[merge_data$type=="condo"],

col=rgb(0,0,1,.25), breaks=b, add=TRUE)

hist(merge_data$soldprice[merge_data$type=="townhouse"],

col=rgb(0,0,0.3,.25), breaks=b, add=TRUE)

legend("topright",

legend=c("single-family","multi-family","condo","townhouse"),

fill=c(rgb(1,0,0,.25), rgb(0,1,0,.25),

rgb(0,0,1,.25), rgb(0,0,0.3,.25)))

# Bar Plot

barplot(table(merge_data$type),

col="steelblue", ylab="Count",

main="House Type Counts")

# Box Plots

par(mfrow=c(1,2))

boxplot(year ~ cooling, data=merge_data,

subset=cooling=="Yes",

main="With Cooling", col="lightblue",

ylab="Year Built")

boxplot(year ~ cooling, data=merge_data,

subset=cooling=="No",

main="Without Cooling", col="lightgreen",

ylab="Year Built")

par(mfrow=c(1,1))

# ---------------------------

# Two-Variable Visualization

# ---------------------------

# Linear Regression

model0 <- lm(soldprice ~ lotsize, data=merge_data)

summary(model0)

# Scatter Plot by Neighborhood

cols <- c("blue","gold","green","orange",

"purple","red","gray","yellow")

plot(merge_data$lotsize, merge_data$soldprice,

col=cols[as.factor(merge_data$neighborhood)],

pch=16, xlab="Lot Size", ylab="Sold Price",

main="Sold Price vs Lot Size")

abline(model0, col="black", lwd=2)

legend("topright",

legend=levels(as.factor(merge_data$neighborhood)),

col=cols, pch=16)

#Summary:

#The response was exactly what I needed, and the AI model fixed minor syntax issues in my original code.

#However, you need to be very careful about data drift. This happens when the AI model introduces extra steps that may affect the interpretation of your data.

#Always test and refine the responses generated by AI, just as you would review the work of any member of your team.

Example in My Field: Data Science Focused on Real Estate Project Management
You are a Senior Data Scientist who needs to review the following code for an upcoming real estate project with your team. Please correct any syntax issues related to the data visualization graphics found in the code below. Make the code clear and organized for my team, and most importantly, summarize and extend the explanation within one page only.
Code

str(merge_data)
summary(merge_data)

# Standardize house type names
merge_data$type[merge_data$type == 'town house'] - 'townhouse'
merge_data$type[merge_data$type == 'condominium'] - 'condo'

### One-Variable Visualizations

# Histogram
merge_data$type - as.factor(merge_data$type)

hist(
merge_data$soldprice[merge_data$type == "single-family home"],
col = rgb(1,0,0,0.25),
ylim = c(0,60),
breaks = seq(0, 2500000, 100000),
xlab = "Sold Price",
main = "Histogram of Sold Prices"
)

# Add additional histograms
hist(
merge_data$soldprice[merge_data$type == "multi-family home"],
col = rgb(0,1,0,0.25),
breaks = seq(0, 2500000, 100000),
add = TRUE
)

hist(
merge_data$soldprice[merge_data$type == "condo"],
col = rgb(0,0,1,0.25),
breaks = seq(0, 2500000, 100000),
add = TRUE
)

hist(
merge_data$soldprice[merge_data$type == "townhouse"],
col = rgb(0,0,0.2,0.25),
breaks = seq(0, 2500000, 100000),
add = TRUE
)

legend(
"topright",
c("single-family home", "multi-family home", "condo", "townhouse"),
col = c(
rgb(1,0,0,0.25),
rgb(0,1,0,0.25),
rgb(0,0,1,0.25),
rgb(0,0,0.3,0.25)
),
lwd = 10
)

# Bar Plot
typeOfHouse - table(merge_data$type)
typeOfHouse

barplot(
typeOfHouse,
ylab = "Count",
col = "blue",
cex.names = 1,
main = "# of Different House Types"
)

# Box Plot
merge_data_withCooling - merge_data[merge_data$cooling == 'Yes', ]
merge_data_withoutCooling - merge_data[merge_data$cooling == 'No', ]

par(mfrow = c(1,2))

boxplot(
merge_data_withCooling$year,
main = 'Year of Houses with Cooling',
ylim = c(1900, 2025)
)

boxplot(
merge_data_withCooling$year,
horizontal = TRUE,
axes = FALSE,
staplewex = 1
)

text(
x = fivenum(merge_data_withCooling$year),
labels = fivenum(merge_data_withCooling$year),
y = 1.25
)

boxplot(
merge_data_withoutCooling$year,
main = 'Year of Houses without Cooling',
ylim = c(1900, 2025)
)

boxplot(
merge_data_withoutCooling$year,
horizontal = TRUE,
axes = FALSE,
staplewex = 1
)

text(
x = fivenum(merge_data_withoutCooling$year),
labels = fivenum(merge_data_withoutCooling$year),
y = 1.25
)

### Two-Variable Visualizations

# Scatter Plot and Regression Line
model0 - lm(soldprice ~ lotsize, data = merge_data)

model0
summary(model0)

# Interpretation:
# As lot size increases, the sold price generally becomes more expensive.
# This regression result makes sense because larger lots tend to have higher property values.

par(mfrow = c(1,1))

plot(
merge_data$lotsize[merge_data$neighborhood == "Blue"],
merge_data$soldprice[merge_data$neighborhood == "Blue"],
main = "Sold Price vs. Lot Size",
xlim = c(0,1.5),
ylim = c(0,2400000),
xlab = "Lot Size",
ylab = "Sold Price",
pch = 1,
col = "blue"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Gold"],
merge_data$soldprice[merge_data$neighborhood == "Gold"],
pch = 2,
col = "gold"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Green"],
merge_data$soldprice[merge_data$neighborhood == "Green"],
pch = 3,
col = "green"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Orange"],
merge_data$soldprice[merge_data$neighborhood == "Orange"],
pch = 4,
col = "orange"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Purple"],
merge_data$soldprice[merge_data$neighborhood == "Purple"],
pch = 5,
col = "purple"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Red"],
merge_data$soldprice[merge_data$neighborhood == "Red"],
pch = 6,
col = "red"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Silver"],
merge_data$soldprice[merge_data$neighborhood == "Silver"],
pch = 7,
col = "gray"
)

points(
merge_data$lotsize[merge_data$neighborhood == "Yellow"],
merge_data$soldprice[merge_data$neighborhood == "Yellow"],
pch = 8,
col = "yellow"
)

legend(
"topright",
c("Blue", "Gold", "Green", "Orange", "Purple", "Red", "Silver", "Yellow"),
col = c("blue", "gold", "green", "orange", "purple", "red", "gray", "yellow"),
pch = 1:8)



#Summary:

#The response was exactly what I needed, and the AI model fixed minor syntax issues in my original code.

#However, you need to be very careful about data drift. This happens when the AI model introduces extra steps that may affect the interpretation of your data.

#Always test and refine the responses generated by AI, just as you would review the work of any member of your team.
Show more Copy Try prompt on PMI Infinity
avatar
Erick Rene Sanchez Campos CEO| HotPot 101
Summary:
  1. The response was exactly what I needed, and the AI model fixed minor syntax issues in my original code.
  2. However, you need to be very careful about data drift. This happens when the AI model introduces extra steps that may affect the interpretation of your data.
  3. Always test and refine the responses generated by AI, just as you would review the work of any member of your team.

Please login or join to reply

Content ID:
ADVERTISEMENTS

The greatest mistake you can make in life is to be continually fearing you will make one.

- Elbert Hubbard

ADVERTISEMENT

Sponsors