Page MenuHomePhabricator

Usage statistics for automatic reference generation with Citoid
Closed, ResolvedPublic

Description

Validate Assumption
The Citoid extension is used by most users of Visual Editor and Wikitext Editor 2017 to insert references. We have seen this in multiple discovery interviews, however, more quantitative data is required to validate this.

Steps

Questions and Metrics

  • How often is automatic reference generation used across sessions, broken down by VisualEditor-MediaWiki-2017WikitextEditor and VisualEditor .
    • Coarse, summary answer is fine (e.g. "N% of all sessions have used the Citoid at least once")
    • Use Superset's SQL Lab to write a query grouping all presto.event.visualeditorfeatureuse events by edit session ID, selecting a count of citoid.automatic-generate events for that group. See the count_if function.
    • Save the query as a dataset.
    • Create charts based on this dataset, for example
  • How often do users interact with the Citoid successfully. Defined by adding a reference by using the reference generation.
    • Chart "Citoid success"
  • How often do users fail to add an automatic generated reference. Defined by interacting with the input field and then aborting the dialog.
    • The dialog "abort" event isn't comparable to successful insert events, because it includes more than just the automatic lookup sessions. Chart "Citoid success ratio" shows the successful inserts divided by lookups, so the conversion between clicking "Create" and "Insert".
  • How often and in which situations does the tool fail in retrieving results? Defined by how often the error message is triggered.
    • Error Message: We couldn't make a citation for you. You can create one manually using the "Manual" tab above.
    • Instrument using ve.track and document the new action in the feature use dictionary.

Implemented:

  • feature citoid actions
    • automatic-generate-fail - Automatic reference generation fails, error message is triggered
    • automatic-generate-fail-network- Tool fails to retrieve search results for generating a citation
    • automatic-generate-fail-searchResults - Tool encounters a network error while attempting to generate a citation.

Outcomes

Citoid usage and events board (superset): https://superset.wikimedia.org/superset/dashboard/518/

Citoid service dashboard (grafana): https://grafana.wikimedia.org/d/NJkCVermz/citoid?orgId=1&refresh=5m

Event data already includes:

  • feature citoid actions
    • automatic-generate - "generate" button was pressed
    • automatic-insert - "insert" button was pressed
    • reuse-choose (TODO: document citoid vs Cite "reuse")
  • feature citoidEducationPopup action show (TODO: screenshot)

Event Timeline

WMDE-Fisch renamed this task from Usage statistics for Automatic Reference Creator in citoid to Usage statistics for automatic reference generation with Citoid.Apr 24 2024, 9:16 AM
WMDE-Fisch removed WMDE-Fisch as the assignee of this task.
WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch subscribed.

Note https://phabricator.wikimedia.org/T357613#9759164 . From my perspective this covers the data points here as well.

awight removed awight as the assignee of this task.May 7 2024, 8:34 AM
awight moved this task from Doing to Sprint Backlog on the WMDE-TechWish-Sprint-2024-04-24 board.
awight subscribed.

Change #1029171 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Citoid@master] Track Citoid service lookup failures

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

Change #1029171 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] Track Citoid service lookup failures

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

Nothing else to do here.

Quoting from T372438 thread:

Looking at how it was done...

automatic-generate-fail-searchResultsThe request made it all the way through the reliability check, tried to build the templates from the citoid results, and failed at that point (probably because there were no results, but could also include any other errors in building the templates)
automatic-generate-fail-networkThe promise from the mw.Api request was rejected - without any testing for further details, so I think this is a consolidation of any possible API errors + any network errors that interrupted the request

I think these events are misleadingly labelled, then.

automatic-generate-fail-network is more like no search results from the api. When we don't have results, it returns a 404 (or a 415 if we don't have results because it's a pdf). This likely is the majority of cases and the numbers roughly match the api numbers. Only rarely would it be some sort of connection issue.

You don't get to network success unless there are search results. So the automatic-generate-fail-searchResults thing means there were definitely search results from the API. However, in some rare cases even if there are results from the API, we fail to build a template. One reason might be if the template listed for it doesn't have any template data. Then we can't build the template, so it fails.

tl;dr I think these need to be renamed.

Maybe automatic-generate-fail-network should be automatic-generate-fail-api to make it clear the failure originates from the citoid api, and automatic-generate-fail-template or automatic-generate-fail-template-build to make it clear we had results from the api, but failed to build the template?

I think these events are misleadingly labelled, then.

automatic-generate-fail-network is more like no search results from the api. When we don't have results, it returns a 404 (or a 415 if we don't have results because it's a pdf). This likely is the majority of cases and the numbers roughly match the api numbers. Only rarely would it be some sort of connection issue.

You don't get to network success unless there are search results. So the automatic-generate-fail-searchResults thing means there were definitely search results from the API. However, in some rare cases even if there are results from the API, we fail to build a template. One reason might be if the template listed for it doesn't have any template data. Then we can't build the template, so it fails.

tl;dr I think these need to be renamed.

Maybe automatic-generate-fail-network should be automatic-generate-fail-api to make it clear the failure originates from the citoid api, and automatic-generate-fail-template or automatic-generate-fail-template-build to make it clear we had results from the api, but failed to build the template?

Thanks for the poke, we'll look into it.

If you're renaming them anyway, seize the moment and fix the feature-name as well.

Change #1087147 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Citoid@master] Rename some misleading event names

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

Change #1087147 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] Rename some misleading event names

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

Seems like new data is coming in with the new keys and is visible on the Superset Citoid all events chart