My First Earnings from AI

This article contains no advice about making money through AI investments. It simply tells an amusing personal story and offers a brief technical review.

My First Earnings from AI

This article was originally written in Chinese and translated into English by AI.

This article contains no advice about making money through AI investments. It simply tells an amusing personal story and offers a brief technical review.

This public account and blog have existed for more than eight years, and I had stopped updating them for over four years.

I suddenly felt like writing something again. Hopefully I can keep it going for a while this time.

Estimated reading time: about 10 minutes.

Technical content: ★

Personal commentary: ★★★

Preface

I actually had a much more dramatic title in mind:

“A Few Dozen Lines of Code Made Me $1,300! AI Made Me Rich!”

To some extent, that title is factually accurate, and it would probably attract more clicks. But titles like that are better suited to attention-grabbing short videos. I want this account to remain restrained and focused on sharing, so I chose the more old-fashioned title you see now.

My first earnings from AI did not come from a serious AI project. In fact, it involved a bit of opportunism:


Background

Robinhood is a US financial services company that offers convenient trading of stocks, options, and cryptocurrencies, somewhat similar to Futu.

At 4:45 PM Eastern Time on March 5 and 6, the company hosted two live trivia games called Robinhood Trivia. Users could join through the mobile app at the scheduled time. Contestants had to answer 12 finance-related questions in a row, with only 10 seconds for each question. One wrong answer meant elimination. Everyone who answered all 12 correctly split $1 million worth of Bitcoin.

The Robinhood Trivia game

The format may sound familiar. China saw similar live trivia games such as Chongding Dahui and Million Hero in early 2018, although they gradually disappeared.

The format can be traced back to HQ Trivia, which became hugely popular in the US in 2017. Scott, the original host of HQ Trivia, was invited to host Robinhood Trivia as well. Robinhood was using the popularity of live trivia to generate attention and attract more users to its products.

Live trivia apps, with HQ Trivia on the far right

When I joined the event for the first time on March 5, I knew nothing about it. I did not even know what the word “trivia” meant. It was only when the host appeared after the event began that I realized it was a quiz game.

The questions covered finance, stocks, cryptocurrencies, and related topics. With no preparation on the first day, I relied on luck and guesses to make it to question seven, still far from answering all 12 correctly. Of nearly 400,000 initial participants, only a little over 600 reached the end, each receiving $1,626.01 worth of Bitcoin. Afterward, the host announced that the same event would return the next day, again with $1 million worth of Bitcoin to share.

The Robinhood Trivia game

Afterward, I reviewed the 12 questions and found four whose answers I did not know at all. It would have been very difficult to answer everything using only my own knowledge. Ten seconds was barely enough time to read the question and every option, let alone search the web.

Then an idea suddenly occurred to me: perhaps AI could solve this problem.


Putting It into Practice

That evening, I spent two hours building an end-to-end AI-assisted answering workflow:

  1. Mirror the phone screen to a computer in real time.
  2. Capture the lower half of the phone screen on the computer.
  3. Extract text from the screenshot using OCR.
  4. Send the extracted text and a prepared prompt to the ChatGPT 4o API, then receive its answer. The first four steps took about one to two seconds.
  5. If the API replied that it did not know, send the extracted text to the ChatGPT website instead. The website could search the internet and use recent news to identify the correct answer. This took about five seconds.

Once I had the general idea, I sent my requirements to Claude and asked it to recommend screen-mirroring and OCR software, as well as Python code for the entire workflow.

Claude generated code based on my requirements

I adapted Claude’s code to my needs and wrote a custom prompt. The code is available on GitHub:

github.com/DrMofu/MLab_wechat/tree/main/weChat194_robinhood

I also used a few small techniques of my own. The live test later showed that they genuinely helped; without them, I probably would not have answered every question correctly. I will describe them briefly in the next section.

The complete setup looked like the image below. The mirrored phone screen was on the left. In the upper-right corner, my program captured the screen, extracted the text, and queried ChatGPT 4o, which returned an answer in one to two seconds. If ChatGPT 4o said it did not know, I immediately pasted the question into the ChatGPT website and waited about five seconds for a result.

The setup used during the live game

On March 6, I used this workflow. At least four of the 12 questions asked about stock or market developments from late 2024 or early 2025. Because the ChatGPT 4o API did not have the relevant training data, it could not answer them and followed my prompt by saying, “I don’t know.” The ChatGPT website, however, had web search and could find the correct answer after about five seconds. With only 10 seconds per question, the timing was extremely tight. Twice, I selected the correct answer just as the countdown displayed zero. My hands were shaking by the final questions.

In the end, I answered all 12 questions correctly and became one of 754 winners among nearly 200,000 contestants, receiving $1,326.25 worth of Bitcoin.

The final prize screen

Review

Looking back at the second day, I found that three parts of my preparation were critical:

  1. Testing the project with real data.
  2. Designing the prompt carefully.
  3. Preparing a fallback.

Testing with Data

First, I tested the project with real data. I found screenshots of the first day’s questions that other users had posted on US social media. I used those images to test and debug the screen-capture region and OCR functionality.

Finding test data on social media

During this testing, I discovered that simply calling the ChatGPT 4o API did not work well. The model had no web access and could not retrieve the latest information. For example, when I asked:

By deal size, which of the following was the largest US IPO in 2024: Lineage, Viking Holdings, or Reddit?

The correct answer was Lineage, but the model often answered Reddit. This test made me realize that additional work would be needed to answer every question correctly on the second day.

Prompt Design

After extracting the text from the phone screen, I did not send it directly to the ChatGPT 4o API. Instead, I placed a long prompt before it.

The prompt clearly explained what I wanted. Different prompts often produced different results.

The dense text in the image is the prompt I designed

The prompt was roughly as follows:

You are an expert with extensive experience in finance and deep knowledge of stock markets, cryptocurrencies, and global finance.
I will provide a question and several possible answers. The text was extracted from an image using OCR, so ignore garbled characters or infer the intended content where reasonable.
Answer the question directly without explanation. If none of the provided choices is correct, provide the correct answer directly, again without explanation.
Important: if you do not know the answer, reply only with “I don’t know.” Do not guess. Also provide a few keywords that could be used to search Google for the answer.
If you guess when you do not know the answer, you will lose one million dollars. If you answer “I don’t know,” you will lose nothing.
Let’s begin:

<OCR text from the image follows>

The prompt used several techniques. They may sound funny, but they genuinely helped.

The first was role-playing: I asked the model to act as a financial expert. Giving a model the role of an expert in the relevant field can produce surprisingly good results.

The second was a detailed problem description. I specified the question format, warned that the content might contain OCR errors, asked for no explanation to save generation time, and instructed the model to say “I don’t know” whenever it was uncertain.

The funniest but still useful part was the loss warning: “If you guess when you do not know the answer, you will lose one million dollars.” Many people would consider this sentence ridiculous, but it really did make a difference. Consider the same question:

By deal size, which of the following was the largest US IPO in 2024: Lineage, Viking Holdings, or Reddit?

When I sent the question with a prompt that did not include the warning and ran it several times, the model sometimes said it did not know and sometimes answered Reddit, although Lineage was correct. After I added the line about losing one million dollars for a random guess, repeated runs consistently returned “I don’t know.” This largely prevented the model from inventing an answer.

ChatGPT is trained primarily on English, with other languages playing a secondary role. In my personal experience, ChatGPT answers English questions more accurately than questions in other languages. I therefore wrote the prompt in Chinese, translated it into English, appended the OCR text from the phone screen, and sent everything to the ChatGPT 4o API. I asked the same question five times and used the consistency of the five answers as an indirect measure of the model’s confidence.

Preparing a Fallback

When the ChatGPT 4o API answered “I don’t know,” I needed a fallback.

During OCR, the recognized text and prepared prompt were also copied to the clipboard. I could therefore press Ctrl+V to send the question directly to the ChatGPT website. The website included web search and could automatically look for relevant information before answering. The downside was the extra time: a web search took about five seconds, while each trivia question allowed only 10. Including the screenshot, OCR, and paste operations left very little room.

For that reason, I called the faster ChatGPT 4o model without web access first and used the website only as a fallback.

That concludes my experience and the lessons I learned from the event. The prize was earned through a bit of opportunism, but I have fully open-sourced both my code and my approach. Anyone capable of using them is welcome to do so.

Project code:

github.com/DrMofu/MLab_wechat/tree/main/weChat194_robinhood


Afterword

I had stopped updating this public account for more than four years. During those four years, both the world and my own life changed considerably. When the account was first created, I was still inviting university friends to write articles with me; now everyone has been working for years. Four years ago, computer vision was considered the AI field with the greatest commercial potential, and SenseTime and Megvii were two of the best-known AI companies in China. Today, natural language processing and large language models have become the new battleground.

I originally wrote a long section about my views on today’s AI industry and how programmers could prepare for the AI wave. But this article is already quite long, and I am only an ordinary programmer, so my comments would be those of an outsider. I will save that speculation for another article.

When I logged back into the public account, I was surprised to find more than 70 private messages. Unfortunately, all of them had expired and could no longer be opened. I apologize to anyone whose message went unanswered.