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


Utilizing the OpenAI’s Moderation Endpoint for Accountable AI

Self-made gif.

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

Latest discussions have dropped at mild an essential concern — the potential for ChatGPT to generate inappropriate or biased responses. This problem stems from its coaching knowledge, which contains the collective writings of people throughout numerous 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.

In consequence, some responses generated by ChatGPT might mirror these biases. However let’s be truthful, inappropriate responses could be triggered by inappropriate person 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 establish inappropriate content material and take motion accordingly.

As at all times, we’ll implement these moderation checks in Python!

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

📥 Person enter management refers back to the implementation of mechanisms and strategies 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 tackle potential points akin to biased or inappropriate responses.

Leave a Reply

Your email address will not be published. Required fields are marked *