ChatGPT Prompt Engineering for Developers
Fouad Trad
Machine Learning Engineer
prompt = "Think about the issue of
deforestation."
response = get_response(prompt)
print(response)
Deforestation is a significant
environmental issue involving
permanently removing
or destroying forests and woodlands.
It has far-reaching impacts on the
environment, ecosystems, wildlife,
and human communities. [...]
prompt = "Propose strategies to
reduce deforestation."
response = get_response(prompt)
print(response)
Reducing deforestation requires
a comprehensive and multi-dimensional
approach involving various stakeholders.
Here are several strategies
that can help address the issue:
Strengthen Forest Governance
Promote Sustainable Land Use [...]
Provide specific, descriptive, and detailed instructions regarding:
Ineffective prompt: "Tell me about dogs."
Effective prompt
prompt = "Write a descriptive paragraph about the behavior and characteristics of
Golden Retrievers, highlighting their friendly nature, intelligence,
and suitability as family pets."
print(get_response(prompt))
Golden Retrievers are beloved worldwide for their exceptional behavior, remarkable
characteristics, and friendly nature. They are highly intelligent, trainable, and
adaptable, making them great companions for families, including those with children.
max_tokens:
Prompt:
prompt = """Summarize the text delimited by triple backticks into bullet points.
```TEXT GOES HERE```"""
response = get_response(prompt)
text = "This is a sample text to summarize"
prompt = f"""Summarize the text delimited by triple backticks into bullet points. ```{text}```"""
print(prompt)
Summarize the text delimited by triple backticks into bullet points.
```This is a sample text to summarize```
ChatGPT Prompt Engineering for Developers