Embracing Change: I built a wrapper for GPT-4
Only a wrapper for GPT-4, but it takes 90% of the grunt work out of support ticket handling.
Code for this project is in this GitHub repository.
As July of 2023 rolled around, I found myself at a crossroads. How do I stay relevant in the shifting landscape of the job market? I have a background in accounting and management consulting, but now a lot of my work is for tech companies. Things were changing fast at one of these companies, with a shift to AI-based systems and processes. Since they had kindly bought me a ChatGPT subscription, I had been playing around with it, and my initial experiences left me somewhat impressed, but also tentative about the future. As someone who has trained as a CPA, I think of that as my core competence. A few prompts asking ChatGPT to categorize expenses and draft journal entries and I could see the medium-term viability of accounting as a profession might just be in serious jeopardy.
Navigating Career Options
Faced with this realization, I asked ChatGPT to help me think through my options. With some mermaid.js magic, I mapped the options in a decision chart.
Of the paths open to me, I considered several. Do I go back into accounting as an outsourcing provider, but with the first mover advantage of bringing automation to let’s say payables or month-end reporting? Accounting is also the kind of standard process that would lend itself to automation. It requires intelligence in little pockets to decide between fixed options.
I considered returning to my consulting roots. I had been working in Advisory at PwC before my current job, and consulting might just see a hey-day as organizations strive to become AI-enabled.
And then what I am doing right now: I help a technical support department provide customer facing support, through a function that supports close to 80 enterprise products, ranging from products acquired by this private equity firm for a few million dollars to the $462 million they paid for Jive, a cloud-hosted social network for organizations. This has been my attempt to break into tech, albeit with no formal education, by working at the edges of the field; not too technical, but with a foot in the door.
One of the options I considered was to pivot, and take on a more systems and processes automation orientation. To build automations with AI, and showcase that I can do this work I embarked on, what for me was an ambitious project.
Goal: To automate aspects of the support workflow using GPT-4. I built a wrapper.
AI-Assist
In this support function, handling of customer support tickets is a two-step process. A ‘DOer’ suggests a response to the customer, and takes actions, which is approved later by a ‘QC checker’. Everybody takes on both roles, just not for their own work. This framework requires actions and a proposed response to be meticulously recorded. This information goes into what we call a data structure (DS) which can take a number of formats. You could think of this as a loose form that can change depending on the action. There are quite a number of these formats in use depending on the action; but it is essentially a limited number of options, and variations on those options. The kind of task that lends itself to intelligent decision-making by AI.
I decided to use code to remix the form fields, and a combination of code and OpenAI’s GPT models to fill them in. I had never coded beyond print('Hello World!') in Python, so I needed a lot of scaffolding. Lucky for me I had ChatGPT for help. I had a lot of questions:
“What are the data types supported by Python?”
“How do I invalidate variable assignments at the end of a loop?”
“Should there always be a main function that calls on subsidiary functions?”
“What sort of manipulation within the main function is atrocious coding practice?”
I knew nothing, and I was writing terrible spaghetti code. But it was working. At one point during the process I had to trash everything to completely re-organize the code to make it more extensible, as the cost of making changes and keeping track of things I had done previously mounted. I incorporated better code organization, learnt to code with a functional coding paradigm, learned the basics of Git and version control.
Eventually, after a couple weeks, I had patched together a Python program that was able to read Zendesk tickets and metadata, automatically render a form variant and write out both responses to customers, and internal memos for escalation and collaboration with other teams.
It has an extremely narrow applicability, and is tailored to do just one job well. Only a wrapper for GPT-4, but it takes 90% of the grunt work out of support ticket handling.
Advancing the Program
With a successful prototype in hand, I embarked on an even more ambitious project. I decided to package the program for mass roll out within the function, so that the entire team of 50 agents can use it instead of just me.
To make this possible I would first need buy-in from management; after all I am a tiny cog in a big machine.
I focused my efforts on gaining efficiency using my new program, Wingman every day. I then polled my week-on-week data to show its effect on performance.
The results spoke for themselves: I had recorded an 80% increase in ticket handling.
Even if some of this efficiency came from aiming to be faster, in large part this was possible due to the introduction of Wingman to my workflow.
I had used short codes to pull up the form variants to be populated by GPT-4. Now I wanted to introduce natural language parsing capabilities to call on the specific variation of the form just from an instruction phrase.
There are so many combinations possible that it isn’t feasible to just include a list, though I have done that too, with numbers to quickly call on a particular scenario – the same and many variations on the scenarios can be produced just by saying something like ‘Send via a side conversation to the Account Management team’ or anything similar that means the same thing.
The function I used doesn’t make use of embeddings or vectors. Instead it whittles the possible outcomes down based on search-term and partial term matches. Search terms are matched to scenario sets, a Venn intersection of which, usually just one particular form variant, is the one required by the user. My choice of pattern matching worked because there are such a small number of outcomes, and a reasonably sized dynamically generated dictionary of search terms and their variants is able to intuit intentions from the instructions and match it to outcomes.
Perhaps vectorizing instructions and matching against outcome using cosine similarity would be more robust. Definitely something to look into for later projects.
Rollout
Armed with data demonstrating this improvement, I proposed implementing the program across the team to management.
They gave me a pilot! A big win for me coming as I do from a non-tech background.
The Future
This journey into programming and AI application in a practical, work-related context was the best way for me to dip my toes into Python programming. Delivered from tutorial hell to producing useful output in the space of time it takes for ChatGPT to explain bits of code.
The future seems to be one of more efficient learning and skill acquisition, and definitely a bandwagon that I want to be on. As AI continues to reshape the job market, it might not remain just an option but become necessary for everyone operating in this space.
Another insight this gave me was that workplaces would have to change and re-evaluate traditional job roles to encourage a mindset that focuses on delivery rather than tight job roles. I posit that the startup ethos could benefit almost every workplace in these times of flux.
As the nature of work evolves, and different skills become less and more valuable, and with tectonic shifts brought about by more powerful AI models, the question I am asking myself is, what should I do?