Skip to content
RAG Repo

Hansard is the official, near-verbatim record of what is said in the UK Parliament: debates, oral and written questions, ministerial statements, and the outcomes of votes, across both the House of Commons and the House of Lords. The record reaches back to the early nineteenth century, so alongside today's business you get a remarkably long, consistent view of British political and legislative history from a single source.

You can search the full text on the Hansard website, and the underlying records are published as `XML` and as linked data, a way of publishing facts as connected, machine-readable statements you can query. That structured layer is what matters most for RAG. Each contribution carries the speaker, their party and constituency, the date, the debate title, and the House, so you can feed debates into a retrieval pipeline with all of that context attached and answer questions about who said what, when, and in which debate.

This is a strong fit for any system that reasons over UK policy and politics: tracking how a minister's position has shifted over the years, summarising the debate on a particular bill, or answering constituents' questions about parliamentary business. The speaker and date metadata make it especially good for time-aware and attribution-sensitive queries, where getting the "who" and "when" right matters as much as the words themselves.

On licensing you are on solid ground. Hansard is published under the Open Parliament Licence, which permits commercial reuse as long as you attribute Parliament as the source, so keep a clear attribution line in your product.

Two caveats. Hansard records speech, so it captures rhetoric and argument rather than settled fact, and should never be read as a neutral statement of policy. Older material also varies in structure and formatting. For the legislation those debates produce, pair Hansard with legislation.gov.uk; together they cover both the argument and the resulting law.

ukparliamentgovernmenttranscriptslinked-data

Related sources