Wikidata
Wikidata stores knowledge as data rather than prose. Each of its 100 million-plus items, whether a person, a chemical element, a city, or a film, has a stable identifier (like Q42) and a set of statements linking it to other items and to hundreds of outside databases. Because the facts are structured, you can ask precise questions, such as which cities are capitals of European countries, and get exact answers rather than hoping the right sentence turns up in an article.
You have several ways in. The full dumps come in JSON and RDF (a format that describes things as subject, predicate, object triples), and the JSON dump is the usual choice for bulk processing, though it is large and best streamed rather than loaded whole. For targeted work you can run a live SPARQL query against the public endpoint (SPARQL is a query language built for knowledge graphs) or fetch individual items through the REST API. Labels and descriptions come in hundreds of languages, so the same item serves multilingual pipelines.
For RAG, Wikidata works best as a fact layer beside your text corpus rather than as the corpus itself. Resolve an entity mentioned in a document to its Wikidata item, then pull reliable attributes, dates, and links to ground the answer and disambiguate names. Its stable identifiers also act as a shared key across the open data world, since it absorbed much of the old Freebase project and now anchors entities for Wikipedia and many other datasets.
Two caveats. Coverage and depth are uneven, being community edited, so popular topics are rich while niche ones can be sparse or partly unsourced. On licensing it is refreshingly simple: the data is released into the public domain under CC0, so you can use it commercially with no attribution or share-alike obligation. Pair it with Wikipedia when you need the prose behind the facts.
Related sources
DBpedia
A knowledge graph built by pulling the structured parts of Wikipedia, mainly the infoboxes, into machine-readable data. It holds billions of facts about people, places, organisations, and more as RDF triples, small subject, predicate, object statements, which you can search with the SPARQL query language.
Freebase
A collaborative knowledge base once run by Google, now retired but still available as downloadable data dumps. It holds structured facts about millions of entities, and much of its content has since moved into Wikidata.
OpenCyc
The open release of Cyc, one of the oldest attempts to hand-build common-sense knowledge for machines. It holds hundreds of thousands of concepts and millions of assertions about how the everyday world fits together. Now archived, but the data is still available.
Structured Wikipedia
Wikipedia rendered as pre-parsed, machine-readable JSON: abstracts, short descriptions, infoboxes, sections, parsed tables and references, with links to Wikidata entities. A beta from Wikimedia Enterprise covering nine languages, also mirrored on Hugging Face. The section-segmented shape a RAG pipeline actually wants.