Skip to main content

GenerativeAI as a thought partner


Couple of years back, during the Covid lockdown, I had worked on creating many short stories about Indian heroes with the purpose of spreading awareness about them. This was before the arrival of GenerativeAI age.

During a break recently, a thought came across on how can one use GenerativeAI to create something simple yet interesting using this already available data.

Thus begun the project of 'Indian Heroes Quiz', with ChatGPT as a new assistant!

Initial Data:
  • Stories about Indian heroes in simple language

Project:
  • Create a simple online quiz game to create awareness about these heroes.

Part 1 - The Quiz
It all started by creating a rough design on paper about the possible UI of the quiz. Purpose was to keep the UI and Tech Stack simple. 

The prompt was created with specific details and given to ChatGPT, which created fairly accurate version of the code. It's been many years since I have worked on Javascript, but it didn't take much time to understand and enhance the generated code.

The design did went through multiple iterations - 
  • flip cards for answer
  • randomization of cards and options
  • logo and image generation and placements
  • scoring calculations
  • dataset changes
  • making UI mobile/tablet compatible

There is an advantage of having a continued session in ChatGPT. It remembers the context and incremental additions/changes become easier.

Once the generated site was tested locally, like an able partner, ChatGPT provided options for hosting with complete set of instructions. The hosting on Netlify was easier than anticipated and the quiz was live!

Part 2 - The Questions

While the quiz was getting ready, it was important to get the content ready for the same. After all, this was the main part.

Summary was already available for each person. The task was to create hints, options and abstract from this summary. Manually it would have taken a long time and required repetitive effort.

Again, ChatGPT stepped up like an obedient intern. Once the prompt was finalized after few experiments, it generated required information for each individual. It also provided output in formatted JSON as was needed for the quiz.

The Final Result


Enjoy the quiz here and do share your feedback - https://indianheroesquiz.netlify.app/

Learnings

Understanding Prompt engineering is very important while working on GenerativeAI tools. It is imperative to find effective prompt for the specific requirement that contains -
  • Primary content
  • Specific instructions to set the context and what needs to be done
  • Cues (mainly for structured output)
  • Examples

ChatGPT works well when bulk data is provided in a text/word file. But there seems to be a size-limitation in the output as it generates output for only a few input mentioned the doc. Thus one may need to repeat this exercise if there are many input entries to be processed.

Was it possible to execute this project in pre-GenAI era?

Yes, of course. Someone with reasonable web/app building experience, could have done it easily, with the help of search as well.

The what new GenAI brings?

It allowed the developer to focus on the overall design by becoming a partner that helped in
  • Logic to code generation (without requiring to master the new language)
  • Incremental enhancements and optimizations
  • Come up with professional looking UI
  • Image/logo generation (Microsoft Designer)
  • Helping with deployment
Basically changing the focus from implementation to ideation.

At the end technology is as good as how we use it.











Comments

Popular posts from this blog

The Engineering Admission Guide

Ever since I graduated, every year I receive queries regarding engineering admissions. This blog is a sincere effort to highlight some of the key points to be considered during admissions. The suggestions are based on my personal experiences and observations. Institute name matters, Always No matter what course you actually get engaged with, it’s the name of your alma mater that matters. It is this institute which will be a part of your resume for the rest of your life. It’s not that very good institutes have altogether different syllabus or teaching methodologies. But there are other things which make them special: There will be few professors who are exceptionally good in their field of work. Their guidance can do wonders. Being a top institute, it will attract the best talent with whom you’ll be interact on regular basis. You’ll get a lot of learning from your batch mates, seniors and juniors. You’ll be able exposed to better companies for your i...

Flash Back - The 50th Anniversary of Indian Independence

The entire India is celebrating Azadi ka Amrit Mahotsav  - 75 years of Independence. The special occasion has rejuvenated the spirit of nationalism in Indians and many events are being planned to commemorate the landmark. On this occasion, let me tell you the story of the celebrations happened on the 50th Independence anniversary in 1997 from the eyes of a 15 year old boy. Now, how did a 15-year was a witness to the grand celebrations that happened in Delhi in the night of August 14, 1997? In June 1997, Gujarat SSC board examination results were announced. To the surprise of many, this boy was a joint state topper. This itself is an interesting story, but let's do it some other time. The result brought invitations to many events in the life of that boy throughout the next year. Luckily the year was 1997, and the Indian government was planning to celebrate the 50th Independence anniversary in a grand scale. They had scheduled a grand event on the eve of Independence, and invite...

My Covid Test Experience

I have had sore throats many a times in last few years, mainly because I have allergic reaction to cold water/drink, curb, ice cream etc especially when taken during night. Sometimes I also get sore throat due to weather change. In last 5 months itself since Covid spread started, I had it for few times. And I recovered in a few days. When I had sore throat feeling on September 14, I had already gone into an isolation in my home as a precautionary measures. I also decided to consult a doctor. The doctor advised me to get the Covid test done immediately, either through a private lab or at the government hospital, mainly because of prevalent Covid situation in Pune.  Rapid Antigen Test So after 175 days of lock down and 190 days of first Covid case in Pune, I went to Khivansara Patil Government Hospital near Water Tank in Wakad on the morning of September 15 to get my test done. The Center usually opens at around 9:00 am and doctors come at 10:00 am.  Do not go inside the hospita...