Wikifunctions:Status updates/2026-10-02
| ◀ | ▶ |
Refreshing results: Cache usage reporting and "Run with latest data"
Starting this week Wikifunctions is offering two new capabilities addressing the issues of caching and freshness of function call results. Before describing these capabilities, let’s set the stage with some general background information.
A cache is a temporary storage place for results that have been previously computed, or data that's been retrieved from some source. Caches are designed and located so they can be accessed very quickly. In Wikifunctions, there are two types of caching relevant here: caching of entire results from previous function calls, and caching of entities fetched from Wikidata.
Why caching?
Wikifunctions, like most Websites showing results that involve substantial processing to produce, relies heavily on caching to improve responsiveness and lessen the consumption of computing and networking resources.
- For example, running some function
Z1234with inputsZ1234K1andZ1234K2might take several seconds, in the case of a complex function. However, if the same function has already been run recently, with the exact same inputs, and the result of that previous run has been cached, the cached result can typically be retrieved in milliseconds. - Similarly, if a function-call requires fetching several entities from Wikidata, those fetches might take a second or more, depending on the sizes of the entities, but if they have been recently cached, they can be retrieved in milliseconds.
A challenge created by caching
Unfortunately, the use of cached results and entities sometimes causes the presentation of stale results. A stale result is one which is not completely up-to-date with recent changes made to ZObjects or Wikidata entities used in the generation of the result. Stale results can be a significant hindrance to the development and maintenance of Wikifunctions functions.
- For example, if you are developing a new function to generate text for Abstract Wikipedia articles, you may find that a Wikidata item or lexeme required by your function needs to be created or extended. If you make that change in Wikidata, and return to testing your new function, the use of caching might prevent you from seeing the benefit of your change right away.
The solution
Starting this week, Wikifunctions offers a 2-part solution:
- reporting cache usage along with the result (in the Details dialog that accompanies each result), and
- allowing for rerunning a possibly-stale function without any cache usage, so as to guarantee a completely fresh result.
Cache usage reporting
The use of cached data in producing a function-call result is now indicated in the Provenance section of the Details dialog, which is available under the result after running a function.
If cached data has been used, the Provenance section's English summary will be This response was retrieved from the cache. In this case, the Provenance section can be opened to reveal additional details:
A bullet like
- Cached function call: 17 hours ago
indicates that the same function-call was run, and its result cached, 17 hours ago. In such cases, the entire result has been retrieved from a cache.
A bullet like
indicates that those Wikidata entities, involved in generating the result, were retrieved from a cache.
If no cached data has been used, the Provenance section's English summary will be This response was not retrieved from the cache.
We emphasize that the use of cached data does not, by itself, indicate that the result is stale with respect to the data sources; it only indicates the possibility that the result may be stale. In fact, most of the time cached data is up-to-date with respect to the data sources.
Result-freshening (Run with latest data)
When a function-call result, or Wikidata entities used in a result, have been retrieved from a cache, and there is reason to believe the result is not completely fresh, it may be useful to rerun the function without the use of any caches. For this purpose, Wikifunctions provides the Run with latest data button, in the Provenance section. This button appears there when cached content has been used in the result.
- What it does: When this button is pressed, the Details dialog disappears and the function-call is immediately rerun without retrieving any content from caches. The function call result is regenerated from scratch, and any required Wikidata entities are re-fetched from Wikidata, so the result is guaranteed to be completely fresh. Caches are then updated with the re-fetched and regenerated content, so the latest content will be available for subsequent function calls.
- Permissions group requirement: Because it's important to avoid overuse of this capability, the button is only made available to logged-in users, in the autoconfirmed group or above.
- Rate limiting: For the same reason, it's also necessary to limit the frequency of use per user. Currently, users in the autoconfirmed group can use it 2 times per minute; those in functioneer, 5 times per minute; and those in function maintainer, 10 times per minute.
This button should be used sparingly, to help minimize its impact on network and computing resources. It is meant to be used when you know, or suspect, that a ZObject or Wikidata entity relevant to the result has changed recently, and you believe that change may produce a different result.
This content is also available in a Help page, linked from the Details dialog. Additional (more technical) information about caching for Wikifunctions and Abstract Wikipedia can be found at Abstract Wikipedia team/Architecture/Storage on the MediaWiki wiki.
Working with our first pilot communities
We are working towards a major milestone: the first Abstract Wikipedia articles appearing on language Wikipedias. We are currently working with three initial pilot communities that have expressed interest in using abstract articles on their Wikipedias: Malayalam, Dagbani, and Igbo.
Over the coming months, we will run more Wikidata and Wikifunctions workshops with each of them, so they are well placed to integrate a first abstract article if and when they decide to. Working this closely also helps us spot friction points early and improve the experience for the communities that follow.
The first technical step starts this week. We are deploying the functionality that lets wikis integrate articles from Abstract Wikipedia on Malayalam Wikipedia. Dagbani and Igbo will follow in the coming weeks. Communities turn integration on through Community Configuration, and nothing is added automatically: whether and which articles to integrate is always the local community's decision.
So which articles might they choose first? That is ultimately up to the communities. But to identify potential gaps, we looked into articles that exist on Abstract Wikipedia but not yet on the pilot wikis, and one gap stood out: cities. City articles share a common structure and include facts that quickly go out of date, like population or the current mayor. As last week's update showed with Paris, a single article can serve many Wikipedias, and drawing on Wikidata helps keep its facts current.
That makes cities a promising place to focus, though the pilot communities will decide for themselves which articles, if any, they integrate. If you are interested in working on city articles, this query lists the city articles already started on Abstract Wikipedia, how many pilot wikis are missing each one, and how widely each is covered in other Wikipedias. You can find more queries on cities and the pilot communities at this page.
Recent Changes in the software
This week, we want to thank User:Mormegil who has updated the old labels for the rights to edit Type converters that were renamed everywhere else two years ago (T367926).
Volunteers’ Corner on October 12th 2026
The next Volunteers’ Corner will be on Monday, 12 October 2026 at 17:30 UTC (not 5 October). We plan to have the following agenda: there will be time to ask questions and discuss all matters arising. If we have time, we will write a function together. Everyone is welcome to join us on Google Meet.
News in Types: Change in anonymous functions
The (explicitly marked as experimental) anonymous function type and the argument declaration for anonymous functions has been changed from taking a Type to represent the return type or the argument type respectively, to taking a Wikifunctions object reference. This is a potentially disruptive change for anyone using anonymous functions, particularly syntactic phrase functions which are built with these. We propagated this change through the system within a few hours, in order to minimize disruption. Apologies for any disruptions! We hope that this will reduce warning levels considerably when using syntactic phrase functions. Let us know if you catch anything unusual!
Fresh Functions weekly: 166 new Functions
This week we had 166 new functions. Here is an incomplete list of functions with implementations and passing tests to get a taste of what functions have been created. Thanks everybody for contributing!
- prepend element to Typed list conditionally (Z42808)
- is complex (as pair of Integers) a Gaussian prime? (Z42810)
- square of Integer as Natural number (Z42815)
- is complex128 a Gaussian prime? (Z42818)
- Japanese particle for a case or role (Z42828)
- Japanese predicate for a relation item (Z42837)
- English predicate for a relation item (Z42843)
- print Gregorian year and month in Italian (Z42851)
- print month in Italian (Z42855)
- predicate clause from Wikidata values, Japanese (Z42865)
- predicate clause from Wikidata values, English (Z42866)
- predicate clause from Wikidata values, mul fb (Z42867)
- predicate sentence from Wikidata values, Japanese (Z42878)
- predicate sentence from Wikidata values, English (Z42879)
- predicate sentence from Wikidata values, mul fb (Z42880)
- predicate sentence from Wikidata values (mono) (Z42891)
- predicate sentence from Wikidata values (HTML) (Z42892)
- qualifier as subject clause, Japanese (Z42930)
- qualifier as subject clause, English (Z42932)
- qualifier as subject clause, mul fallback (Z42934)
- qualifier as subject-sentence, Japanese (Z42941)
- qualifier as subject-sentence, English (Z42943)
- qualifier as subject-sentence, mul fallback (Z42945)
- qualifier as subject-sentence (mono) (Z42948)
- qualifier as subject-sentence (HTML) (Z42950)
- six-hump camel back for coordinates (Z42961)
- property values as roles with a relation, Japanese (Z42968)
- property values as roles with a relation, English (Z42970)
- property values as roles with a relation, mul fb (Z42972)
- property values as roles with a relation (mono) (Z42975)
- property values as roles with a relation (HTML) (Z42977)
- does Lexeme have this lexical category? (Z42989)
- filter Lexeme list by lexical categories (QIDs) (Z42993)
- statement with reference marker before punctuation (Z43001)
- split string to list by chars (Z43028)
- chemical atomic number fallback element name (Z43033)
- throw error with zero params (Z43041)
- select Statements by predicate Property reference (Z43049)
- link to AW article for Day of Roman year (Z43065)
- display Day of Roman Year, mul fallback (Z43069)
- key–value pairs from object (Z43076)
- wrap in mul tags (Z43089)
- HTML fragment as monolingual string (Z43092)
- German positive adjective from item reference (Z43097)
- gendered name of occupation or position (Z43100)
- has parts-sentence in Russian (Z43105)
- specific property of subject is value, Russian (Z43112)
- add German adjective to German noun (Z43120)
- birth-(death) date monolingual text for person, Ru (Z43121)
- Russian person description (Z43126)
- replace identifier in anonymous function (Z43131)
- birth sentence from Wikidata, Russian (Z43135)
- cast member as character from Wikidata statement (Z43146)
- cast member as character from statement, monoling (Z43148)
- cast member as character from statement, English (Z43150)
- preferred value and reason sentence, Japanese (Z43161)
- preferred value and reason sentence, English (Z43162)
- preferred value and reason sentence, mul fallback (Z43163)
- preferred value and reason sentence (mono) (Z43164)
- preferred value and reason sentence (HTML) (Z43165)
- insert string after leading HTML container tags (Z43183)
- lowercase a leading English pronoun in HTML (Z43184)
- sentence with a discourse adverbial, Japanese (Z43185)
- sentence with a discourse adverbial, English (Z43186)
- sentence with a discourse adverbial, mul fallback (Z43187)
- format external ID-typed Wikidata statement as URL (Z43211)
- Japanese complement particle for a relation item (Z43213)
- Japanese verb for a relation item (Z43214)
- counted property value clause, Japanese (Z43215)
- counted property value clause, English (Z43216)
- counted property value clause, mul fallback (Z43217)
- counted property values with a relation, Japanese (Z43218)
- counted property values with a relation, English (Z43219)
- counted property values with a relation, mul fb (Z43220)
- counted property values with a relation (mono) (Z43221)
- counted property values with a relation (HTML) (Z43222)
- filter list for selected Type (Z43261)
- conjugation table for English Lexeme (Z43263)
- conjugation table for English noun Lexeme (Z43264)
- switch id in argument declaration for anon func (Z43267)
- does IPA transcription start with vowel sound? (Z43269)
- object type as ZID or object (Z43291)
- qualifier of each value sentence, Japanese (Z43296)
- qualifier of each value sentence, English (Z43297)
- qualifier of each value sentence, mul fallback (Z43298)
- qualifier of each value sentence (mono) (Z43299)
- qualifier of each value sentence (HTML) (Z43300)
- semantic role of a property value (Z43320)
- property values by place sentence, Japanese (Z43326)
- property values by place sentence, English (Z43327)
- property values by place sentence, mul fallback (Z43328)
- property values by place sentence (mono) (Z43329)
- property values by place sentence (HTML) (Z43330)
- French noun from Wikidata item reference (Z43368)
- is Lexeme instance of referenced Item? (Z43374)
- discard lexicographic data from Lexeme object (Z43382)
- text(s) of English noun Lexeme (Z43388)
- select Form(s) from English noun Lexeme (Z43391)
- Malayalam noun fragment from Lexeme (Z43398)
- French noun from singular and plural (Z43404)
- Malayalam independent vowel from Latin (Z43407)
- Malayalam consonant from Latin (Z43410)
- Malayalam vowel sign from Latin (Z43416)
- Malayalam syllable from Latin consonant and vowel (Z43419)
- Malayalam dead consonant from Latin (Z43422)
- Malayalam anusvara (Z43425)
- Malayalam Latin consonants (Z43428)
- Initial Malayalam Latin vowel (Z43434)
- Longest initial string from list (Z43435)
- Initial Malayalam Latin consonant (Z43439)
- Malayalam transliterate Latin text (Z43443)
- Wikidata statement has no end time? (Z43444)
- unions representing workers of organization (Z43460)
- Initial Malayalam Latin token (Z43467)
- Tokenize Malayalam Latin text (Z43471)
- French noun fragment from string (Z43474)
- create HTML tag from string and wrap around string (Z43477)
- replace typewriter (ASCII) apostrophes with proper (Z43484)
- sentence as HTML with links and markers (Z43488)
- property values by place, core, Japanese (Z43492)
- property values by place, core, English (Z43493)
- property values by place, core, mul fallback (Z43494)
- property values by place, core (HTML) (Z43495)
- qualifier of each value, core, Japanese (Z43507)
- qualifier of each value, core, English (Z43508)
- qualifier of each value, core, mul fallback (Z43509)
- qualifier of each value, core (HTML) (Z43510)
- add a full stop unless one ends the sentence (Z43522)
- value if the place matches (Z43526)
- values listed at a place (Z43527)
- place clause from listed values, Japanese (Z43528)
- place clause from listed values, English (Z43529)
- place clause from listed values, mul fallback (Z43530)
- wrap in quotation marks, Japanese (Z43542)
- wrap in quotation marks, English (Z43543)
- wrap in quotation marks, mul fallback (Z43544)
- wrap in quotation marks of the language (Z43545)
- wrap in quotation marks, German (Z43560)
- wrap in quotation marks, Swiss languages (Z43563)
- NLG ✏️🔧links sentence as [mul], html (Z43571)
A complete list of all functions sorted by when they were created is available.