Skip to content
RAG Repo

Wikidata stores knowledge as data rather than text. Every item, from a person to a chemical element to a film, has a stable identifier and a set of statements that link it to other items and to outside databases. Because the facts are structured, you can ask precise questions like "which cities are capitals of European countries" and get exact answers, which is harder to do against free-flowing article text.

You can download the full dumps in JSON and RDF, a data format for describing things as subject, predicate, and object triples. You can also query the live data through a SPARQL endpoint, a query language built for knowledge graphs, or read individual items through the API. The data is multilingual, so labels and descriptions come in hundreds of languages.

For RAG, Wikidata is most useful as a fact layer that sits alongside your text corpus: resolve an entity mentioned in a document to its Wikidata item, then pull reliable attributes and links. It also underpins many other projects, since it absorbed much of the old Freebase data and now acts as a shared hub of identifiers across the open data world.

knowledge-basestructuredmultilingualpublic-domainwikimediaidentifiers

Related sources