Live data from Hacker News

Building a no-code toxicity classifier by talking to GitHub Copilot

surgehq.ai

41–50 of 152 posts

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#41
post #33

Earlier quoted context omitted.

Note that in part of the process, Copilot was the one asking complex questions when the human programmer didn't know how to proceed. Copilot adds tremendous value for someone who knows what they want, but not how to do it. For example, I'm not a great programmer. I'm also a lazy programmer. I had to convert a time to a specific format, in a specific timezone in JS, and I couldn't be bothered looking up documentation…

> I wrote a comment outlining exactly what I wanted, and immediately Copilot generated the code I was after. How do you know it was what you were after? Like you said, it could be .toLocaleTimeString or .toLocaleString (or something else). How do you verify that the AI isn't giving you broken/incorrect code? I guess you could check the docs, or run the code yourself, but at that point what's the value add for copilot…

>How do you know it was what you were after?

By testing it

>but at that point what's the value add for copilot?

Not having to look up the docs and writing it yourself.

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#42
post #5

Notice that the comments used to generate the code via GitHub Copilot are just another very inefficient programming language.

Notice that the C used to generate the machine code via the compiler is just another very inefficient programming language.

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#43
post #34

The first comment asks Copilot to import all the libraries needed for a toxicity classifier, and it imports libraries such as re (regex engine) and nltk (natural language toolkit). But what if I wanted a classifier for toxic chemicals and not toxic speech? That was my first thought when I saw "toxicity" in the title. I'm now imagining a very frustrated junior developer a few years from now trying to argue with Copilo…

Like googling is an essential skill for developers. In few years if Copilot deliver its promise, navigating it would be treated the same. You may also have an interview round wherein optimization would be how quickly can you get Copilot to write the expected code.

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#44
post #22

Earlier quoted context omitted.

> Think of GitHub copilot as StackOverflow on steroids This is how I already think of co-pilot, but these steroids seem to be mostly for prototyping. SO often have comments and context such as "this works with 98% of browsers", "this isn't recommended, try X instead", "this works but can break library code because it changes the global scope", "this stopped working in version X" etc etc. Context like this can be impo…

Start a line with // CAVEATS: // POTENTIAL ISSUES: // Above is deprecated. Use below code instead and ask Copilot to auto-complete.

// this should never happen

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#45
post #35

We're all focusing on the weaknesses of co-pilot (the comments can be longer than the code produced; you need to understand code to know when to elaborate your comment, etc). But also ... what do you need to know to recognize that the concept of a 'toxicity classifier' is likely broken? We can do _profanity_ detection pretty well, and without a huge amount of data. But with 1000 example comments, can you actually get…

A few years ago I did some work with IBM's Watson Twitter integration. One of the fun things you could do was sentiment analysis. It was reasonably accurate for the extremes but anything in the gray area would be wildly off. A politely worded tweet that was scathing would come across high on the positive sides of the scale, whereas a perfectly reasonable sentence that included profanity as used in a quote would immediately be high on the negatives.

This part from the article made me chuckle, because IMO the author fell for some of the most basic language processing smoke & mirrors:

    …so we’ll give it some examples. When generating the array, it even creates the ideal variable name and escapes the quotations.
Here, it generates toxic_comments as a variable name, when the instructions were:

   # create an array with the following toxic comments: [etc]
This is pretty basic language parsing stuff that might have been kicking around awhile. I think the most basic english language parser could output something along the lines of what was suggested, given an understanding of what valid Python should look like. While impressive, it's not nearly as interesting or good as the rest of the work being done.

Copilot appears no different to most ML models out there. Poor and incomplete training data will yield ok results for popular things but as soon as you ask for edge cases it will fall apart like Siri trying to understand a Scottish accent.

Eventually it might get there with enough good representative training data but it's unclear to me how long that will take. If it tracks with speech processing models it might take decades plus.

Another consideration is that because the training data is being done using github public repos (at least last I read), it's likely that it's ripe for abuse. If that's still how they're doing it I'm looking forward to the TEDTalk in two years from a researcher who "hacked" the copilot AI by polluting its training data.

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#46

Impressive BUT. Who is defining toxic speech? Where is that data being taken from? This is the definition of using AI to set what the edges of “speech” should be based on potentially flawed data. This is a clown world.

> In this example, we’re using the Copilot extension for Visual Studio Code, and a free toxicity dataset that we built ; (Emphasis mine) Following that link: > Surge AI is a data labeling platform and workforce. Our labeling team pored over tens of thousands of social media comments to build this toxicity dataset. Each comment was then evaluated by multiple members of our team to determine its severity level.

I feel so sorry for the labeling team. Hope they were paid well.

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#47
post #35

We're all focusing on the weaknesses of co-pilot (the comments can be longer than the code produced; you need to understand code to know when to elaborate your comment, etc). But also ... what do you need to know to recognize that the concept of a 'toxicity classifier' is likely broken? We can do _profanity_ detection pretty well, and without a huge amount of data. But with 1000 example comments, can you actually get…

A few years ago I did some work with IBM's Watson Twitter integration. One of the fun things you could do was sentiment analysis. It was reasonably accurate for the extremes but anything in the gray area would be wildly off. A politely worded tweet that was scathing would come across high on the positive sides of the scale, whereas a perfectly reasonable sentence that included profanity as used in a quote would immed…

didn't watson turn out to be useless and spaghetti code inside? aka ibm's marketing arm

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#48
post #35

We're all focusing on the weaknesses of co-pilot (the comments can be longer than the code produced; you need to understand code to know when to elaborate your comment, etc). But also ... what do you need to know to recognize that the concept of a 'toxicity classifier' is likely broken? We can do _profanity_ detection pretty well, and without a huge amount of data. But with 1000 example comments, can you actually get…

A few years ago I did some work with IBM's Watson Twitter integration. One of the fun things you could do was sentiment analysis. It was reasonably accurate for the extremes but anything in the gray area would be wildly off. A politely worded tweet that was scathing would come across high on the positive sides of the scale, whereas a perfectly reasonable sentence that included profanity as used in a quote would immed…

[deleted]

Re: Building a no-code toxicity classifier by talking to GitHub Copilot

#50
1. This is not “no-code”. You still have to read & understand the code Copilot generates.

2. I’m very skeptical of a small group of people reading a bunch of online comments and deciding what is “toxic” and “non-toxic”, even more so when it’s done with no clear definitions/guidelines. As their GitHub repo [0] says:

> Rather than operating under a strict definition of toxicity, we asked our team to identify comments that they personally found toxic.

[0]: https://github.com/surge-ai/toxicity

Post reply on HN