Gracefully Failing in an Emerging World of Generalization
Gracefully Failing in an Emerging World of Generalization

The past few weeks showcased the emergence of GPT-powered solution debuts between Microsoft and Google, whereby the two technology companies showcased a new Bing search and BARD respectively. While analysts and news pundits covered the mistakes made by these systems juxtaposed against the strategic implication of being a first-mover in the GPT solution race (fueled by the hype), the real question emerged for me: how to build enterprise-grade graceful failure of open-ended chat inquires. While the aforementioned demonstrations displayed mistakes made by those systems, it comes in the wake of prompt engineering hacks built to troll and game GPT-powered systems into the worst versions of itself. How do we prevent his?
In Machine Learning, there is a concept called Reinforcement Learning whereby a reward function is built against a set of possible outcomes, whereby the model seeks to make the necessary sequential decisions to maximize the possible reward outcome from the function. Another way of understanding reinforcement learning is to call it incentivized learning. Take a typical sales role, for example, who sales goods and services for a large organization. Annually, the organization sets an incentive plan, rewarding the seller(s) in accordance with a schedule that maps the compensation gained for selling a particular product, with bonuses assigned for any sales above a specific quota. Typically, these schedules map to the company’s portfolio but are weighted differently based on the strategic plays the organization seeks to make in the market. Effectively, sellers are incentivized to sell the product or service with the highest yield to maximize their return on investment, investment being time. They could sell non-incentivized items, however, its not always beneficial to them.
So where does reinforcement learning factor into the algorithmic solution then?
For enterprise organizations, robustness in solutions are required for procurement and implementation. Enterprises serving tens of thousands, to millions of customers cannot afford for systems to go astray, or even, in this scenario, be gamed by trolls and malicious actors. Within Conversational AI, a common use case emerging for transformer-based systems are to utilize Large Language Model (“LLM”) within the fallback mechanism within a chat flow and/or handle out-of-band inquiries coming into the system whether for small talk, adjacent questioning, or sheer amusement by the end user. In order to maximize the effectiveness of these generalized fallback nodes powered by LLMs, their scopes must be constrained. Arguably, given the sheer magnitude of information ingested into the model’s foundational layer, that can be quite daunting and not as simple as pointing a model to a source of information to summarize or additional corpus of information to pull from. Enter, reinforcement learning with human feedback.
OpenAI’s InstructGTP provides a valuable diagram to show the process:

Under this model, a reward model is built but continuously tuned by a human in the loop. Say the bot should only respond with the ability to disambiguate industry-specific terminology, for example, when a customer does not understand a topic but its not within the logic flow of the bot itself. Humans would review the utterances/inquiries and the associated output from the system and subsequently assign a value that acts as feedback into the reward function, nurfing unwanted answers and buffing desirable ones. Over time, the rewards function policy will be solidified and the probability of answering astray would decrease significantly. Furthermore, any newly out-of-band responses can default to a failure node that will inform the user of any number of responses including: “The information I provide can only go so far,” or “I’m sorry, I can not answer that question,” etc.
Utilizing a Large Language Model plus Reinforcement Learning with Human Feedback can be more expensive for organizations to implement, finding the right talent to build the reward function and taking the necessary time to annotate and label incoming utterances with responses, however, the return on investment should be highly noticeable as deviation from intended behavior is minimized and robustness maximized.
As I’ve learned from my time in Product Management, fail fast and fail often to learn from mistakes. Over time, we will continue to grow stronger and better. Certainly this analogy can apply to both the demonstrations we saw in the market this week as well as the proposed solution I offer within the body of this post. I look forward to seeing if this methodology emerges at the most efficient or how organizations seek to solve this problem at large.