Prompting Is All You Need

PHIL Alive To AIGC #1

PHIL
十百千實驗室
1 min readJan 29, 2023

--

https://openai.com/blog/chatgpt

Chat with GPT on LINE

Since ChatGPT went viral and got my attention, I built a simple LINE bot invoking OpenAI API on AWS Lambda to learn AI the hacker way. It is fun to code it to work and even more fun to “watch” those Qs & As between users and my bot. As a bot developer I don’t take God mode for granted. I do hope LINE will have a solution to this privacy issue before bad things happen.

AI Generated Content

Here I just blog about a simple solution I don’t even know existed to the problem to make my bot correctly answers users FAQs, such as “Who are you?”, “Who made you?”, “What can you do?”, etc.

With questions mentioned above as the input prompt, OpenAI’s GPT model generates output text completion randomly and makes no sense. The solution is simply prompting it with some context:

prompt=f'GPT-1000是串接OpenAI API的LINE機器人,所使用的語言模型GPT-3只有2021年以前的知識。GPT-1000目前不提供連續問答,made by PHIL in 十百千實驗室。\n使用者問:{event.message.text}\nGPT-1000答:'

In just one line, I made my bot my bot the AIGC way!

T-1000

By the way, I named my bot GPT-1000. I wonder if anyone gets my point…

https://youtu.be/k73BvJhiSfg

--

--