- Hustle Hub
- Posts
- Hustle Hub #30
Hustle Hub #30
🛖 How To Do Prompt Engineering (the right way), Always Know Your Value, & More
New to Hustle Hub? Make sure to subscribe for more!
Read Time: 6 minutes
Hey friends,
These few days I’ve been learning how to use Bubble (no-code platform) to build an MVP for a new platform (ChatGPT for data analytics) that I’m working on.
Can’t wait to launch the MVP and share it with you soon! It’d be a game-changer as you no longer have to code or learn different tools to analyse data. All you have to do is to ask questions and get insights — stay tuned! 🔥
In today's issue, I’d like to share with you how to do prompt engineering (the right way), why you should always know your value, a must-read book to break into data career, and Google Bard API.
Let’s get to it! 🚀
🛖 What's in the hub today?
Tip: How to do prompt engineering (the right way)
Mistake: I benchmarked my value against someone else
Learning: Always know your value
Tool: Google Bard API
🔥 Hustler Spotlight 🔥
Farhana Mannan (Senior Data Scientist @ CIBC)
⭐️ 1 Tip
How To Do Prompt Engineering (The Right Way) 🤖
This 1-hour course was taught by Andrew Ng and Isa Fulford in partnership with OpenAI — for free. It was definitely a mind-blowing learning experience for me. 🤯
While most ChatGPT “experts” or “gurus” give you the fish (best prompts), this course teaches you how to fish (how to develop prompts that fit your use cases).
Here are my learnings from the course 👇🏻
Principle 1: Write clear and specific instruction
Triple quotes: """
Triple backticks: ```
Triple dashes: ---
Angle brackets: < >
XML tags: <tag> </tag>
Use delimiters. Honestly, learning how to use delimiters has been a game-changer for me. Because I can finally tell the model explicitly which section to focus on by using delimiters.
Here’s an example of how I use the delimiter (triple backticks - ```
) in my prompt:
Prompt:
Please convert the Python code below to Javascript.
My code:
```
def my_function(number):
total_num = number + 10
return total_num
```
By using delimiters, ChatGPT can understand which section to focus on and it can convert my Python function to Javascript code. Without using delimiters, ChatGPT might generate a wrong output as it might focus on other irrelevant sections.
Principle 2: Give the model time to think
If a task requires multiple steps (with logical reasoning) to be completed, it’s helpful to show what steps you want the model to do and give it more time to think before it outputs the final solution. Otherwise, the model might give the wrong solution.
Let’s see an example below:
Your task is to perform the following actions:
1 - Summarize the following text delimited by
<> with 1 sentence.
2 - Translate the summary into French.
3 - List each name in the French summary.
4 - Output a json object that contains the
following keys: french_summary, num_names.
Use the following format:
Text: <text to summarize>
Summary: <summary>
Translation: <summary translation>
Names: <list of names in Italian summary>
Output JSON: <json with summary and num_names>
Text: <{text}>
In this prompt, I listed a few steps so the model can follow step-by-step before it provides the output with the required JSON format. Note how I intentionally used the delimiters (< >
) to tell the model which parts to focus on.
Iterative Prompt Development 🔄
Here comes the most important part — iterative prompt development. Developing prompts is like writing code. There is no best code in the world because each line of code that you write is meant to solve a specific problem.
Similarly, there is no best prompt in the world. Each prompt that you write is meant to fit your own use cases. Be mindful when someone tells you that they will teach you the best prompts and charge you money. 🤫
So what’s the best way to write prompts? It’s by iterating your prompts throughout the whole development cycle until you land on a prompt that fits your use cases. In general, there are the steps involved in this workflow:
Have an idea of what output you want to get.
Write your prompts using Principles 1 & 2 (shown above).
Test your prompts by using varied inputs.
Perform error analysis by understanding what goes wrong and fixing your prompts.
Iterate Steps 1-4.
By using an iterative approach to develop your prompts, you’ll eventually land on a prompt that fits your use cases.
How did you usually write your prompts? Reply to this email and let me know! 🤝🏻
⚠️ 1 Mistake
When I first came to Singapore in 2013, I worked at Uniqlo as a retail associate.
Back then, I earned $1,600/month. When I looked at my store supervisor, she was earning $2,500/month. I couldn't imagine myself earning that kind of salary, until I graduated and was making $4,000/month.
When I looked at my manager, he was earning $7,000/month. I couldn't imagine myself earning that kind of salary, until I built my skills, moved to another job, and was making $7,000/month.
When I looked at my friends who are entrepreneurs, they are earning $10,000/month (or more). I couldn't imagine myself earning that kind of salary, until I got invited to conduct a data science workshop for $10,000.
I often benchmarked my value against someone else, only to realise that I didn’t actually know my true value. This caused me to sell myself short and charged lesser than it should have been.
Bad move. 😉
🧠 1 Learning
I learned the importance of knowing my value when it comes to job search and business. Nobody values you more than you value yourself. Therefore, it’s important to be self-conscious of your own value based on your skill sets.
Self-awareness matters.
🧠 Here’s what I’ve learned:
Always know your value. Never settle for less.
Upskill yourself to make you more valuable.
Skills = Value = Money 💰
📚️ 1 Book
I read this book in 2018 when I was trying to break into data science. The book was written by Lillian Pierson and she has become my inspiration ever since.
Heck, I even wrote a Medium article to share her book back then because I found so much value in myself.
The best part? You can grab the book HERE for free!
📚️ Here’s what the book covers:
Course recommendations for becoming a self-taught data scientist or engineer
Tips on getting real-world programming experience in data
Tips on showing off your data-savvy (and increasing your sphere of influence)
Who you should be following if you want to be a top data professional
How to build an awesome data blog (and make a name for yourself while you’re at it)
Must-do tips for building out your data coding portfolio
Have you read this book? What's your thought on it?
🧰 1 Tool
Google Bard API is a Python package that returns the response of Google Bard through API. To put it simply, you can install Google Bard API, use it to ask questions and get answers from Google Bard — for FREE.
How cool is that? 😎
Moving forward, I foresee that more and more open-source models and applications would emerge to make our life easier (instead of replacing us) as data professionals.
While some people are worried about their careers, I’m actually quite excited about the possibilities that AI could unlock. We’re living in the best time now. 🚀
Would you use OpenAI API or Google Bard API? Reply to this email and let me know! 🧠
🔥 Hustler Spotlight 🔥
👋🏻 How would you introduce yourself?
I am a business-focused data scientist specializing in financial services. On one hand, I built multilayer complex NLP models and, on the other, I did analytics projects which drove multimillion-dollar benefits for the business. My CFA Charter and background in corporate banking helped me tremendously to focus on the north star of any project- the ROI, and to build trust by speaking the lingo of both the worlds- data science and business.
👀 What’s your day to day like in your current role as a Senior Data Scientist?
Right now I am exploring the Singapore market, so the days are pretty random depending on priorities. While I was working in Toronto, it was a split between 60% stakeholder management and 40%, complex project work which included troubleshooting through a plethora of technical issues. We hear a lot about how ChatGPT would replace data scientists’ jobs. I would rather say ChatGPT has the potential to immensely improve the efficiency of data scientists’ day-to-day.
⭐️ What has been the biggest highlight of your career so far?
I would say I value the human connections that I built with the people and teams I worked with. In terms of Data Science, I am quite proud of a name-matching model I built for the CIBC Technology team. It used publicly available name pairs to train a machine learning model to score similarity between two names.
🚀 What's a data or AI trend you're watching this year?
I came across a few services which create artificial avatar videos from ChatGPT-generated texts, simulated voices and images. I am almost certain that these services will evolve very rapidly given that YouTube and social media marketing keep on going as strongly as now. I am holding my breath and anticipating the virtual reality space to leave us in awe soon by integrating these siloed services into one giant integrated system.
💼 What advice would you give someone starting out in Data Science?
To keep pushing and to keep going. No one can dictate who can be and who cannot be a good data scientist, or what age anyone should start at- only you can decide who you want to be. The only way to build confidence in your abilities is by doing it yourself.
🤯 What’s the most important career lesson you wish you’d learned earlier?
My family background is in academia. My grandfather had his PhD in Microbiology in Germany back in the 1960s and later he founded the Microbiology department at the University of Dhaka. My father is an orthopaedic surgeon and a professor. So, I have never had a chance to see up close what a corporate career looks like or how to excel in one. Sometimes, success is not defined purely by technical skills, self-improvement and service to others as I have seen in my family. I wish I knew this much earlier in my career.
🧠 How would you learn Data Science if you had to start over?
If I had another chance, I would probably have taken up a mentor to guide me through the journey because a lot of the time, the unknown is overwhelming. I completed my CFA Charter back in 2014 and wanted to learn something new when I was considering a Masters degree in 2018. The data science, AI and machine learning lured me into completing my Ms in Business Analytics from Schulich School of Business. Since then, I enjoyed coding, building amazing projects and data products, and above all, helping people and teams by solving complex problems.
🔥 Where can we find your amazing work?
Most of my work is proprietary to the employers. My GitHub repository is old and mainly some practice codes.
📚 What's your favorite book?
Coming to think of it, I do not have any favorite book on data science. Most of what I learnt is by hands-on project work, solving issues by referring to Google, StackOverflow and public code bases.
In general, I like reading nonfiction books such as the Autobiography of Malcolm X, Henry Kissinger on China, Genghis Khan and the Making of the Modern World, etc.
🚀 Whenever you’re ready, there are 4 ways I can help you:
Book a coaching call with me if you need help in the following:
• How To Get Into Data Science
• LinkedIn Growth, Content Strategy & Personal Branding
• 1:1 Mentorship & Career Guidance
• Resume Review
Promote your brand to 1,000+ subscribers in the data/tech space by sponsoring this newsletter.
Watch my YouTube videos where I talk about data science tips, programming, and my tech life (P.S. Don’t forget to like and subscribe 💜).
Follow me on LinkedIn and Twitter for more data science career insights, my mistakes and lessons learned from building a startup.
That's all for today
Thanks for reading. I hope you enjoyed today's issue. More than that, I hope it has helped you in some ways and brought you some peace of mind.
You can always write to me by simply replying to this newsletter and we can chat.
See you again next week.
- Admond
Reply