Function Repository Resource:

LLMWikidataSearch

Source Notebook

Search for entities or properties in Wikidata [For use by LLMs]

Contributed by: C. Alan Joyce

ResourceFunction["LLMWikidataSearch"][type,keywords]

Find Wikidata entities or properties matching keywords.

Details

type may be either "Item" or "Property".
keywords may be a single string or a list of strings.
LLMWikidataSearch also processes ExternalIdentifier objects to remove the ExternalIdentifier Head and the Keys of the internal Association, to save tokens and simplify the result for LLMs.

Examples

Basic Examples

Find Wikidata entities or properties:

In[1]:=
ResourceFunction["LLMWikidataSearch"]["Item", "zebra"]
Out[1]=
In[2]:=
ResourceFunction["LLMWikidataSearch"]["Property", "population"]
Out[2]=
In[3]:=
ResourceFunction[
 "LLMWikidataSearch"]["Property", {"birth date", "surname", "birthplace"}]
Out[3]=

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 26 January 2024

License Information