Skip to main content
  1. Programming/

Empower AI for Streamlining Repetitive Tasks

Image generated using DALL-E 2

Thinking is a complicated process. Every creative task in the world requires a tremendous amount of thinking and it involves multiple levels of consideration. For instance, I need to figure out a few things before I write this article, roughly —

  • Outlines/points
  • Language and tone
  • Title
  • Proofreading

All of these don’t bear the same priority and weight. If I were you, I would happily leave the job of finding an appropriate headline and proofreading of this article to an assistant because it is boring. Unfortunately I’m not in the position of having an “human assistant” yet 🫠. But, I’ve got one better…

WALL-E
WALL-E

Well, not WALL-E. It’s ChatGPT. I told it the underlying idea behind this article and it generated some “thoughtful” headlines to pick one up. It also works as my proofreader and editor. I humbly acknowledge that my writing prowess may not be exemplary, thus, I seek its aid in the art of rephrasing sentences, a task it performs with remarkable finesse. Did you get it? The original line was, “I am not a very skilled person when it comes to writing so I seek its help in rephrasing sentences which it does very well.”

I have empowered the AI to think on my behalf. I wouldn’t let it write the entire article for me, as that would compromise its originality and I would not be considered as the author anymore. I did one more thing, I needed to generate a slug of the title and I did not want to write it out myself. So this is what I did…

Instructing AI to rewrite a sentence in kebab case
Rewrite the headline in kebab case

Few days back I was converting an excel file into HTML. It was neither large enough to warrant the use of a special tool nor small enough to write it manually. And hey, I’m an Engineer. I automate the boring stuff, that’s my superpower! ⚡ So I reached out to ChatGPT for help. I prompted it some data from my excel sheet and an example structure of the HTML table. After that I just gave it the data and in return got the formatted HTML. The data I copy-pasted from the excel file was like this:

Heading 1
Value 1.1
Value 1.2
Heading 2
Value 2.1
Value 2.2

And it has to be formatted like this:

<tr>
    <th rowspan=2>Heading 1</th>
    <td>Value 1.1</td>
</tr>
<tr>
    <td>Value 1.2</td>
</tr>
<tr>
    <th rowspan=2>Heading 2</th>
    <td>Value 2.1</td>
</tr>
<tr>
    <td>Value 2.2</td>
</tr>

So that I get the following output:

Heading 1Value 1.1
Value 1.2
Heading 2Value 2.1
Value 2.2

Formatting all the data manually would have taken a considerable amount of time, and the risk of making mistakes was high. With the help of ChatGPT, the task was completed in just a couple of minutes. Most interestingly, one row was there with heading but no data. There was another heading immediately after that. I didn’t even notice that when I gave the data to ChatGPT. But it detected the heading with missing data, kept empty <td></td> where the data was missing and notified me about this in the reply. It also properly formatted the next row with its heading and data. I was amazed!

At my workplace as well, AI plays a crucial role, particularly in data analysis. You can easily filter out unnecessary data from a large dataset. This reduces calculation time, making your app faster and more robust. You can instruct the AI to generate the output in a specific format, e.g. JSON, which makes it plug and play. The most crucial aspect here is providing the prompt correctly. If your prompt is vague and unspecific, it may produce unexpected results and, consequently, bugs.

AI is an incredibly powerful tool. What I’ve shown here are just the basics. We all know there are countless “unthinkable” things that can be accomplished with AI. It’s not here to steal your job or dethrone humanity; rather, it’s here to make your life and work easier. Embrace its power.