in

ChatGPT Moderation API: Enter/Output Management | by Andrea Valenzuela | Jul, 2023


Utilizing the OpenAI’s Moderation Endpoint for Accountable AI

Self-made gif.

Massive Language Fashions (LLMs) have undoubtedly reworked the best way we work together with expertise. ChatGPT, among the many distinguished LLMs, has confirmed to be a useful device, serving customers with an enormous array of knowledge and useful responses. Nevertheless, like every expertise, ChatGPT shouldn’t be with out its limitations.

Latest discussions have delivered to mild an vital concern — the potential for ChatGPT to generate inappropriate or biased responses. This concern stems from its coaching information, which includes the collective writings of people throughout various backgrounds and eras. Whereas this range enriches the mannequin’s understanding, it additionally brings with it the biases and prejudices prevalent in the true world.

Because of this, some responses generated by ChatGPT might mirror these biases. However let’s be truthful, inappropriate responses may be triggered by inappropriate consumer queries.

On this article, we’ll discover the significance of actively moderating each the mannequin’s inputs and outputs when constructing LLM-powered purposes. To take action, we’ll use the so-called OpenAI Moderation API that helps determine inappropriate content material and take motion accordingly.

As all the time, we’ll implement these moderation checks in Python!

It’s essential to acknowledge the importance of controlling and moderating consumer enter and mannequin output when constructing purposes that use LLMs beneath.

📥 Person enter management refers back to the implementation of mechanisms and methods to watch, filter, and handle the content material offered by customers when participating with powered LLM purposes. This management empowers builders to mitigate dangers and uphold the integrity, security, and moral requirements of their purposes.

📤 Output mannequin management refers back to the implementation of measures and methodologies that allow monitoring and filtering of the responses generated by the mannequin in its interactions with customers. By exercising management over the mannequin’s outputs, builders can deal with potential points similar to biased or inappropriate responses.


Armando Photo voltaic-Lezama named inaugural Distinguished School of Computing Professor | MIT Information

Utilizing AI to battle local weather change