Page MenuHomePhabricator

Track usage of MinT in the Translate extension
Open, In Progress, MediumPublic8 Estimated Story Points

Description

MinT has been integrated with the Translate extension and enabled on Wikimedia projects (T341445) and translatewiki.net (T340544). This ticket proposes measure how much machine translation using MinT is used in these different wikis.

It would be great to have a sense of:

  • The number of messages where a MinT suggestion was accepted.
  • Supporting the analysis over time and for different languages.
  • If possible, have a sense of quality: how many of the translations get reverted, percentage of modifications from the original suggestion, or similar.

As part of this work we may need to (a) define better the data we are interested in, (b) decide on the best format (i.e., report, dashboard, etc.) and (c) implement instrumentation that allows to capture it:

Proposal

MinT suggestion funnel:

  • Number of MinT suggestions shown. This provides a sense of how frequently users are provided an opportunity to use MinT. This is relevant since MinT is not available on all language pairs or for all contents (i.e., excluded when messages have wikitext).
  • Number of MinT suggestions accepted. This helps to understand how frequently MinT suggestions are selected by the user as a starting point for the translation. Ideally we should count only cases where MinT is selected as the final choice. That is, selecting MinT and then selecting Apertium will replace the MinT suggestion and should not be counted as the user using MinT.
  • Number of translations saved using MinT with a low/medium/high percentage of user modifications. This will provide a sense of how much the MinT suggestion has been modified into the final translation. We can use the same categories used by previous MT reports: over 50%, between 10% and 50%, less than 10%.
  • Number of users saving translations using MinT with a low/medium/high percentage of user modifications. Similar to the above, but focused on users instead of translations. This may be useful to understand the user distribution (e.g., are a reduced number of users producing many lightly-reviewed translations).

Quality signals:

  • Percentage of translations using MinT that have been deleted/corrected/proofread. Showing which percentage of the translations have been marked as proofread, heavily edited afterwards, or have been deleted/reverted provides a sense of how good the MinT-powered translations are.
    • Having these percentages broken down by the percentage of user modifications (over 50%, between 10% and 50%, less than 10%) may be helpful too.
  • Number of users with MinT-based translations being deleted. Some categories can be defined to understand how many users had 0 deletions, 1-5 deletions, 6-10 deletions, and >10 deletions.

Other points of reference:

  • Other suggestion sources. All the above metrics are focused on the use of MinT. However, it may be useful to understand the values in context by comparing them with those form other translation services or the translation memory. As part of this or future tasks (depending on complexity) we can consider a similar analysis for the other translation services. Even if this is supported in the future, making the data collection schema compatible with this from the beginning may be a good idea.

Event Timeline

Pginer-WMF triaged this task as Medium priority.Nov 3 2023, 1:23 PM

If possible, have a sense of quality: how many of the translations get reverted, percentage of modifications from the original suggestion, or similar.

This is a very hard thing to measure in short term. I am still fixing hundreds, probably thousands low quality translations made by 1 person on TWN 3 years ago. A number of poor translations from almost 10 years ago by another person aren't fixed yet too. Very few languages have high capacity enough not just to translate everything, but also to proofread all the translations. For this reason low quality translation services such as MinT and Apertium just shouldn't be available, or only made available on a request basis with a separate flag.

An interesting, and (at least theoretically) easily measurable metric is the number translations are accepted (pasted in the edit field) but edited afterwards (and maybe even the amount in which they’re edited): these translations are not entirely useless, but not good enough either.

Nikerabbit set the point value for this task to 8.Jan 16 2024, 9:00 AM

If possible, have a sense of quality: how many of the translations get reverted, percentage of modifications from the original suggestion, or similar.

This is a very hard thing to measure in short term. I am still fixing hundreds, probably thousands low quality translations made by 1 person on TWN 3 years ago. A number of poor translations from almost 10 years ago by another person aren't fixed yet too. Very few languages have high capacity enough not just to translate everything, but also to proofread all the translations. For this reason low quality translation services such as MinT and Apertium just shouldn't be available, or only made available on a request basis with a separate flag.

Thanks for sharing your experience. One interesting aspect of the patterns you described is about how a small number of people misusing machine translation can generate significant work for others. If we consider that the misuse of machine translation is driven by a small set of users, thinking in ways to catch those cases early can be an effective mechanism.
In any case, having initial stats will be helpful to start having a better picture.

I added an initial proposal to the ticket description. Feel free to share any thoughts on usefulness of the data, alternatives, and technical convenience.

@Pginer-WMF Thanks Pau for putting together the initial proposal. Here are my suggestions/thoughts

Number of MinT suggestions shown. This provides a sense of how frequently users are provided an opportunity to use MinT. This is relevant since MinT is not available on all language pairs or for all contents (i.e., excluded when messages have wikitext).

Number of MinT suggestions accepted. This helps to understand how frequently MinT suggestions are selected by the user as a starting point for the translation. Ideally we should count only cases where MinT is selected as the final choice. That is, selecting MinT and then selecting Apertium will replace th eMinT suggestion and should not be counted as the user using MinT.

When a user opens the translation interface, it would be helpful to understand how helpful MinT has been to the user. We can decide on the specifics when we get to instrumentation, but I'd suggest the following to be captured once a user opens the translation screen, a session starts:

if MinT supports the language pair

  • Total number of translatable messages
  • Total number of messages to be translated (i.e. total - already saved)

if doesn't MinT support the language pair (along with the above)

  • Total number of messages MinT could have potentially been suggested
    • followed by an immediate session end

When a user clicks to add a translation (MinT is available for the language):

  • whether MinT suggestion has been shown
  • whether MinT has been accepted
    • just to confirm as I am not sure, are other services also used in the extension? Because, I could only see MinT for a few language pairs that I tested.
  • if a there are multiple services, then it is best to capture the service used at save.
  • % changed

Number of translations saved using MinT with a low/medium/high percentage of user modifications. This will provide a sense of how much the MinT suggestion has been modified into the final translation. We can use the same categories used by previous MT reports: over 50%, between 10% and 50%, less than 10%.

This sounds good to me.

Number of users saving translations using MinT with a low/medium/high percentage of user modifications. Similar to the above, but focused on users instead of translations. This may be useful to understand the user distribution (e.g., are a reduced number of users producing many lightly-reviewed translations).

I didn't understand this well. In a session if we are capturing the user_id/name for each event, we should be able understand user interactions using that.

About quality signals: I am not confident if we should be using the translation extension metrics to understand the quality. I am mostly speaking from my experience (based on intuition, rather than data) of using the extension on meta, mediawiki and commons, please correct me if I am wrong. There is a huge backlog to review the translated messages, usually, apart from few key pages, most remains unreviewed, and if not reviewed, things won't likely go to deletion. While these will still be helpful metrics, I am not sure if it would justify the engineering effort if there is not enough activity. I would suggest we do a light weight analysis (if there is no tracking already) on how many pages/messages are yet to be reviewed, this can help us better inform whether this should be pursued or not.

Given the way Translate interface is implemented, I'm wondering if even the "Number of MinT suggestions shown" is going to be informative metric. Users might just be browsing and opening different messages, not necessarily even translating, and we always open the first message when the page is loaded. But we can try to send an event every time translation editor shows a new message. Complication here is that translation suggestions are loaded asynchronously which complicates the code.

For "Number of MinT suggestions accepted" is little bit easier, we just need to add an event to the "accept translation" handler. We don't really know what happens after that, so we would need separate event if/when the translation is saved and do analysis later.

We also don't have code to estimate modification percentage, but maybe that can be taken from CX.

Given the way Translate interface is implemented, I'm wondering if even the "Number of MinT suggestions shown" is going to be informative metric. Users might just be browsing and opening different messages, not necessarily even translating, and we always open the first message when the page is loaded. But we can try to send an event every time translation editor shows a new message. Complication here is that translation suggestions are loaded asynchronously which complicates the code.

For "Number of MinT suggestions accepted" is little bit easier, we just need to add an event to the "accept translation" handler. We don't really know what happens after that, so we would need separate event if/when the translation is saved and do analysis later.

I wonder whether for these two signals makes sense to measure them only for saved translations.
For translations that users submit (a) was MinT offered as an option?, (b) was it used?
In this way we may avoid the noise introduced by users just "looking around".

For the "number of suggestions shown" my thinking was around having some sense of how ofter we are providing MinT as an option vs. not doing so (because lack of language support, wikitext support, etc) and I expected this to be useful to (a) understand current coverage and (b) see how it improves as we add support for more languages improve quality or support wikitext. But I'm totally ok to start simpler if there are technical complications.

@Pginer-WMF Thanks Pau for putting together the initial proposal. Here are my suggestions/thoughts

Number of users saving translations using MinT with a low/medium/high percentage of user modifications. Similar to the above, but focused on users instead of translations. This may be useful to understand the user distribution (e.g., are a reduced number of users producing many lightly-reviewed translations).

I didn't understand this well. In a session if we are capturing the user_id/name for each event, we should be able understand user interactions using that.

If we can obtain this information without a separate specific measurement, that's great. What I was suggesting is to consider not only how may times MinT suggestions are accepted but also having a sense of the distribution of the users making them.

About quality signals: I am not confident if we should be using the translation extension metrics to understand the quality. I am mostly speaking from my experience (based on intuition, rather than data) of using the extension on meta, mediawiki and commons, please correct me if I am wrong. There is a huge backlog to review the translated messages, usually, apart from few key pages, most remains unreviewed, and if not reviewed, things won't likely go to deletion. While these will still be helpful metrics, I am not sure if it would justify the engineering effort if there is not enough activity. I would suggest we do a light weight analysis (if there is no tracking already) on how many pages/messages are yet to be reviewed, this can help us better inform whether this should be pursued or not.

A general sense of how much translations are proofread could be helpful. Maybe there are already some stats page that can be helpful for that. Maybe we can skip this form the initial iteration and reconsider later based on the needs once we have some initial data.

@Pginer-WMF: I think we are arriving at a consensus on what we want to track.

My assumption is that we will be using the existing Event Platform system that we use for ContentTranslation: https://wikitech.wikimedia.org/wiki/Event_Platform

One thing to note is that Translatewiki.net is not integrated into the Event Platform system. If we want to track statistics from translatewiki.net we will have to see if it can be brought into the system via the API (https://stream.wikimedia.org/v2/ui/#/ ).

@KCVelaga_WMF, If we go with the Event Platform system to collect the statistics and we've identified what we want to track, our assumption is that the Analytics team will define the schema, similar to what was done for ContentTranslation (https://github.com/wikimedia/schemas-event-secondary/tree/master/jsonschema/analytics/mediawiki/content_translation_event ). We will be happy to review the schema. We will then work on updating the code to generate the events with the required data.

@Wangombe Sorry for the delayed response. For this, it is better to use Metrics Platform which has been built on Event Platform. Eventually, all schemas will be migrated to Metrics Platform, as that will be the standard. We are currently working on the same for MinT for Readers instrumentation: T341185. I will start working on creating a schema next week.

I created a sub-task specifically for the implementation of the instrumentation in case it helps to organize the development efforts: T364460: Implement the instrumentation to track usage of MinT in the Translate extension

Change #1046661 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Add TranslateTrackUsageOfMinT configuration variable

https://gerrit.wikimedia.org/r/1046661

Change #1046662 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] MinT: Add event loging for Translate Extension

https://gerrit.wikimedia.org/r/1046662

KCVelaga_WMF changed the task status from Open to In Progress.Jul 5 2024, 12:59 PM
KCVelaga_WMF moved this task from Incoming to In progress on the LPL Analytics board.

Change #1046662 abandoned by Wangombe:

[mediawiki/extensions/Translate@master] MinT: Add event loging for Translate Extension

Reason:

changes Addressed in Ib9f60a70ebc7b72948ac3effceb0845fe53ebc6c

https://gerrit.wikimedia.org/r/1046662

KCVelaga_WMF changed the task status from In Progress to Open.Sep 19 2024, 10:04 AM
KCVelaga_WMF claimed this task.
Nikerabbit changed the task status from Open to In Progress.Nov 11 2024, 7:53 AM
KCVelaga_WMF added a subscriber: cchen.