diff --git a/app/services/quality_monitoring/check_result_invariants.rb b/app/services/quality_monitoring/check_result_invariants.rb deleted file mode 100644 index 5cd713c..0000000 --- a/app/services/quality_monitoring/check_result_invariants.rb +++ /dev/null @@ -1,33 +0,0 @@ -module QualityMonitoring - class InvariantViolatedError < StandardError; end - - # Ensures that Discovery Engine returns expected results for a set of invariants - class CheckResultInvariants - def initialize(search_service_klass: DiscoveryEngine::Query::Search) - @search_service_klass = search_service_klass - end - - def violations - invariants = QualityMonitoring::ResultInvariant.all - - invariants.filter_map { |invariant| - query_params = { q: invariant.query } - result_links = search_service_klass.new(query_params).result_set.results.map(&:link) - - missing_links = invariant.expected_links - result_links - next if missing_links.empty? - - missing_links.map do |missing_link| - ResultInvariantViolation.new( - query: invariant.query, - expected_link: missing_link, - ) - end - }.flatten - end - - private - - attr_reader :search_service_klass - end -end diff --git a/app/services/quality_monitoring/dataset_loader.rb b/app/services/quality_monitoring/dataset_loader.rb new file mode 100644 index 0000000..ce8a0e3 --- /dev/null +++ b/app/services/quality_monitoring/dataset_loader.rb @@ -0,0 +1,25 @@ +require "csv" + +module QualityMonitoring + class DatasetLoader + attr_reader :file_path, :data + + def initialize(file_path) + @file_path = file_path + @data = Hash.new([]) + + load_data + end + + private + + def load_data + CSV.foreach(file_path, headers: true) do + query = _1["query"] + link = _1["link"] + + data[query] += [link] + end + end + end +end diff --git a/app/services/quality_monitoring/judge.rb b/app/services/quality_monitoring/judge.rb new file mode 100644 index 0000000..f912937 --- /dev/null +++ b/app/services/quality_monitoring/judge.rb @@ -0,0 +1,37 @@ +module QualityMonitoring + class Judge + attr_reader :result_links, :expected_links + + # Returns a new instance of Judge for a given query and expected links and a cutoff + def self.for_query(query, expected_links, cutoff: 10) + if expected_links.count > cutoff + raise ArgumentError, "cannot have more than cutoff (#{cutoff}) expected links" + end + + query_params = { q: query } + result_links = DiscoveryEngine::Query::Search.new(query_params).result_set.results.map(&:link) + + new(result_links, expected_links) + end + + # Initializes a new instance of Judge for a given set of result links and expected links + def initialize(result_links, expected_links) + @result_links = Array(result_links) + @expected_links = Array(expected_links) + + raise ArgumentError, "at least one expected link is required" if expected_links.empty? + end + + # Calculates recall (how many of the expected links are in the result links) + def recall + expected_links.count { result_links.include?(_1) }.to_f / expected_links.count + end + + # Calculates precision (how many of the result links are in the expected links) + def precision + return 0 if result_links.empty? + + result_links.count { expected_links.include?(_1) }.to_f / result_links.count + end + end +end diff --git a/app/services/quality_monitoring/result_invariant.rb b/app/services/quality_monitoring/result_invariant.rb deleted file mode 100644 index aa450ea..0000000 --- a/app/services/quality_monitoring/result_invariant.rb +++ /dev/null @@ -1,12 +0,0 @@ -module QualityMonitoring - # Represents a query and the links that should always be returned on the first page of results - ResultInvariant = Data.define(:query, :expected_links) do - def self.all - config_values = Rails.application.config.result_invariants || {} - - config_values.map do |query, expected_link_or_links| - new(query: query.to_s, expected_links: Array(expected_link_or_links)) - end - end - end -end diff --git a/app/services/quality_monitoring/result_invariant_violation.rb b/app/services/quality_monitoring/result_invariant_violation.rb deleted file mode 100644 index ff01c94..0000000 --- a/app/services/quality_monitoring/result_invariant_violation.rb +++ /dev/null @@ -1,4 +0,0 @@ -module QualityMonitoring - # Represents a missing result link for a query - ResultInvariantViolation = Data.define(:query, :expected_link) -end diff --git a/app/services/quality_monitoring/runner.rb b/app/services/quality_monitoring/runner.rb new file mode 100644 index 0000000..c867f97 --- /dev/null +++ b/app/services/quality_monitoring/runner.rb @@ -0,0 +1,79 @@ +module QualityMonitoring + class Runner + class FailuresEncountered < StandardError; end + + attr_reader :file, :type, :cutoff, :report_query_below_score, :judge_by + + def initialize(file, type, cutoff: 10, report_query_below_score: nil, judge_by: :recall) + @file = Pathname.new(file) + @type = type + + @cutoff = cutoff + @report_query_below_score = report_query_below_score + @judge_by = judge_by + end + + def run + scores = [] + failure_details = [] + + data.each do |query, expected_links| + judge = Judge.for_query(query, expected_links, cutoff:) + score = judge.public_send(judge_by) + + scores << score + next unless report_query_below_score && score < report_query_below_score + + missing_links = expected_links - judge.result_links + failure_details << <<~DETAIL + '#{query}' #{judge_by}:#{score} is below #{report_query_below_score}, missing: + • #{missing_links.join("\n • ")} + DETAIL + rescue StandardError => e + GovukError.notify(e) + end + + mean_score = scores.sum / scores.size.to_f + Rails.logger.info( + sprintf( + "[%s] Completed run for %s dataset %s with %s:%f", + self.class.name, + type, + dataset_name, + judge_by, + mean_score, + ), + ) + # TODO: Send to Prometheus as `quality_monitoring_score{dataset: dataset_name, type: type}` + + if failure_details.any? + Rails.logger.warn( + sprintf( + "[%s] %d failure(s) encountered for %s dataset %s\n%s", + self.class.name, + failure_details.size, + type, + dataset_name, + failure_details.join("\n"), + ), + ) + + err = FailuresEncountered.new( + "Quality monitoring: #{failure_details.size} failures encountered " \ + "for #{type} dataset #{dataset_name}", + ) + GovukError.notify(err, extra: { dataset_name:, type:, failure_details: }) + end + end + + private + + def dataset_name + file.basename(".csv").to_s + end + + def data + @data ||= DatasetLoader.new(file).data + end + end +end diff --git a/config/application.rb b/config/application.rb index f05dd23..2a39d1b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -28,8 +28,5 @@ class Application < Rails::Application # Query configuration config.best_bets = config_for(:best_bets) - - # Quality monitoring configuration - config.result_invariants = config_for(:result_invariants) end end diff --git a/config/quality_monitoring_datasets/invariants/self_assessment.csv b/config/quality_monitoring_datasets/invariants/self_assessment.csv new file mode 100644 index 0000000..ef98286 --- /dev/null +++ b/config/quality_monitoring_datasets/invariants/self_assessment.csv @@ -0,0 +1,45 @@ +query,link +self assessment,/log-in-file-self-assessment-tax-return +personal tax account,/personal-tax-account +self assessment,/self-assessment-tax-returns +sign in,/log-in-register-hmrc-online-services +hmrc,/log-in-register-hmrc-online-services +gateway,/log-in-register-hmrc-online-services +tax return,/self-assessment-tax-returns +log in,/log-in-register-hmrc-online-services +self assesment,/log-in-file-self-assessment-tax-return +utr,/find-utr-number +login,/log-in-register-hmrc-online-services +government gateway,/log-in-register-hmrc-online-services +tax,/log-in-register-hmrc-online-services +tax,/log-in-file-self-assessment-tax-return +sa100,/self-assessment-tax-return-forms +tax return,/log-in-file-self-assessment-tax-return +personal tax,/log-in-register-hmrc-online-services +self assessment,/pay-self-assessment-tax-bill +pta,/personal-tax-account +self assessment,/log-in-register-hmrc-online-services +utr number,/find-utr-number +self assesment,/self-assessment-tax-returns +hmrc sign in,/log-in-register-hmrc-online-services +tax refund,/claim-tax-refund +self assessment tax return,/log-in-file-self-assessment-tax-return +self,/log-in-file-self-assessment-tax-return +pay self assessment,/pay-self-assessment-tax-bill +personal tax,/personal-tax-account +tax rebate,/claim-tax-refund +register for self assessment,/register-for-self-assessment +sa1,/guidance/register-for-self-assessment-if-you-are-not-self-employed +pay tax,/pay-self-assessment-tax-bill +tax account,/log-in-register-hmrc-online-services +hmrc login,/log-in-register-hmrc-online-services +personal tax account,/log-in-register-hmrc-online-services +paying hmrc,/pay-tax-debit-credit-card +register for self assessment,/guidance/register-for-self-assessment-if-you-are-not-self-employed +contact hmrc,/government/organisations/hm-revenue-customs/contact/self-assessment +tell hmrc about underpaid tax from previous years,/guidance/tell-hmrc-about-underpaid-tax-from-previous-years +sa100,/government/publications/self-assessment-tax-return-sa100 +hmrc services,/log-in-register-hmrc-online-services +64-8,/government/publications/tax-agents-and-advisers-authorising-your-agent-64-8 +tax,/self-assessment-tax-returns +self assessment login,/log-in-file-self-assessment-tax-return diff --git a/config/quality_monitoring_datasets/invariants/top_1000_pages_with_titles.csv b/config/quality_monitoring_datasets/invariants/top_1000_pages_with_titles.csv new file mode 100644 index 0000000..06d79b0 --- /dev/null +++ b/config/quality_monitoring_datasets/invariants/top_1000_pages_with_titles.csv @@ -0,0 +1,1001 @@ +query,link +HMRC online services: sign in or set up an account,/log-in-register-hmrc-online-services +File your Self Assessment tax return online,/log-in-file-self-assessment-tax-return +Sign in to your childcare account,/sign-in-childcare-account +View and prove your immigration status: get a share code,/view-prove-immigration-status +Self Assessment tax returns,/self-assessment-tax-returns +Personal tax account: sign in or set up,/personal-tax-account +Check your State Pension forecast,/check-state-pension +Check your Council Tax band,/council-tax-bands +Tax your vehicle,/vehicle-tax +Prove your right to work to an employer,/prove-right-to-work +Check if a vehicle is taxed,/check-vehicle-tax +Contact HMRC,/contact-hmrc +Sign in to your Universal Credit account,/sign-in-universal-credit +Check your National Insurance record,/check-national-insurance-record +Apply for your first provisional driving licence,/apply-first-provisional-driving-licence +View or share your driving licence information,/view-driving-licence +Companies House ,/government/organisations/companies-house +Find an apprenticeship,/apply-apprenticeship +Sign in to a service,/sign-in +Check the MOT status of a vehicle,/check-mot-status +Pay your Self Assessment tax bill,/pay-self-assessment-tax-bill +Renew or replace your adult passport,/renew-adult-passport +Check if you need a UK visa,/check-uk-visa +Apply online for a UK passport,/apply-renew-passport +Renew your driving licence,/renew-driving-licence +Book your theory test,/book-theory-test +Skilled Worker visa,/skilled-worker-visa +Book your driving test,/book-driving-test +Apply to the EU Settlement Scheme (settled and pre-settled status),/settled-status-eu-citizens-families +Cost of Living Payments 2023 to 2024,/guidance/cost-of-living-payment +Find your UTR number,/find-utr-number +Find a job,/find-a-job +Check the MOT history of a vehicle,/check-mot-history +"5. Axles, wheels, tyres and suspension",/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/5-axles-wheels-tyres-and-suspension +Introduction,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/introduction +"Tell DVLA you've sold, transferred or bought a vehicle",/sold-bought-vehicle +Get information about a company,/get-information-about-a-company +"4. Lamps, reflectors and electrical equipment",/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/4-lamps-reflectors-and-electrical-equipment +Update your UK Visas and Immigration account details,/update-uk-visas-immigration-account-details +Universal Credit,/universal-credit +Graduate visa,/graduate-visa +Change your driving test appointment,/change-driving-test +8. Nuisance,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/8-nuisance +Disclosure and Barring Service,/government/organisations/disclosure-and-barring-service +Create a goods movement reference,/guidance/get-a-goods-movement-reference +"6. Body, structure and attachments",/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/6-body-structure-and-attachments +Check your Income Tax for the current year,/check-income-tax-current-year +How to sign in to continue your visa application,/sign-in-visa +Check a job applicant's right to work: use their share code,/view-right-to-work +Student finance login,/student-finance-register-login +Biometric residence permits (BRPs),/biometric-residence-permits +How to apply for a visa to come to the UK,/apply-to-come-to-the-uk +Cold Weather Payment,/cold-weather-payment +Visit the UK as a Standard Visitor,/standard-visitor +"Family visas: apply, extend or switch",/uk-family-visa +Check your State Pension age,/state-pension-age +Personal Independence Payment (PIP),/pip +Health and Care Worker visa,/health-care-worker-visa +1. Brakes,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/1-brakes +Check someone's driving licence information,/check-driving-information +"Make, register or end a lasting power of attorney",/power-of-attorney +0. Identification of the vehicle,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/0-identification-of-the-vehicle +Pay your Corporation Tax bill,/pay-corporation-tax +Driver and Vehicle Licensing Agency,/government/organisations/driver-and-vehicle-licensing-agency +Pay your Simple Assessment tax bill,/simple-assessment +Self Assessment tax return forms,/self-assessment-tax-return-forms +Tell HMRC about a change to your personal details,/tell-hmrc-change-of-details +Child Benefit,/child-benefit +Change the address on your driving licence,/change-address-driving-licence +Sign in to your Help to Save account,/sign-in-help-to-save +Track your passport application,/track-passport-application +7. Other equipment,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/7-other-equipment +Check how to claim a tax refund,/claim-tax-refund +Register your vehicle as off the road (SORN),/make-a-sorn +Apply for or renew a Blue Badge,/apply-blue-badge +Help paying for childcare,/help-with-childcare-costs +Get vehicle information from DVLA,/get-vehicle-information-from-dvla +"Replace a lost, stolen, damaged or destroyed driving licence",/apply-online-to-replace-a-driving-licence +Contact DVLA,/contact-the-dvla +Get a passport for your child,/get-a-child-passport +Find a lost National Insurance number ,/lost-national-insurance-number +UC50 form: Universal Credit capability for work questionnaire,/government/publications/uc50-form-universal-credit-capability-for-work-questionnaire +Check if you can get indefinite leave to remain,/indefinite-leave-to-remain +Book and manage driving and riding tests for your pupils,/book-pupil-driving-test +Request a basic DBS check,/request-copy-criminal-record +Using the GOV.UK ID Check app,/guidance/using-the-govuk-id-check-app +Apply for citizenship if you have indefinite leave to remain or 'settled status',/apply-citizenship-indefinite-leave-to-remain +Apply for free childcare if you're working,/apply-free-childcare-if-youre-working +Set up as self-employed (a 'sole trader'): step by step,/set-up-self-employed +Benefits calculators,/benefits-calculators +Driver and vehicles account: sign in or set up,/driver-vehicles-account +DBS Update Service,/dbs-update-service +Pay the Dartford Crossing charge (Dart Charge),/pay-dartford-crossing-charge +HM Land Registry,/government/organisations/land-registry +UK visa sponsorship for employers,/uk-visa-sponsorship-employers +Order COVID-19 rapid lateral flow tests,/order-coronavirus-rapid-lateral-flow-tests +UK Visas and Immigration,/government/organisations/uk-visas-and-immigration +Apply for a Certificate of Exemption to keep an XL Bully dog,/guidance/apply-for-a-certificate-of-exemption-to-keep-an-xl-bully-dog +Tax-Free Childcare,/tax-free-childcare +Get your State Pension,/get-state-pension +Construction Industry Scheme (CIS),/what-is-the-construction-industry-scheme +Register for Self Assessment if you are not self-employed,/guidance/register-for-self-assessment-if-you-are-not-self-employed +Search probate records for documents and wills (England and Wales),/search-will-probate +"Order a birth, death, marriage or civil partnership certificate",/order-copy-birth-death-marriage-certificate +Renew your driving licence if you're 70 or over,/renew-driving-licence-at-70 +Register of licensed sponsors: workers,/government/publications/register-of-licensed-sponsors-workers +Rates and thresholds for employers 2023 to 2024,/guidance/rates-and-thresholds-for-employers-2023-to-2024 +Appendix 2: Facilities and security,/guidance/mot-testing-guide/appendix-2-facilities-and-security +Apply for a National Insurance number,/apply-national-insurance-number +Minimum wage rates for 2024,/government/publications/minimum-wage-rates-for-2024 +Check how to register for Self Assessment,/register-for-self-assessment +File your accounts and Company Tax Return,/file-your-company-accounts-and-tax-return +Check you're eligible for free childcare if you're working,/check-eligible-free-childcare-if-youre-working +Report and pay your Capital Gains Tax,/report-and-pay-your-capital-gains-tax +Claim tax relief for your job expenses,/tax-relief-for-employees +Income Tax rates and Personal Allowances ,/income-tax-rates +Change your address on your vehicle log book (V5C),/change-address-v5c +Carer's Allowance,/carers-allowance +2. Steering,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/2-steering +Pay your tax bill by debit or corporate credit card,/pay-tax-debit-credit-card +Sign in to your HMRC business tax account,/guidance/sign-in-to-your-hmrc-business-tax-account +Search for land and property information,/search-property-information-land-registry +Use a lasting power of attorney,/use-lasting-power-of-attorney +Prove your right to rent in England,/prove-right-to-rent +Contact UK Visas and Immigration for help,/contact-ukvi-inside-outside-uk +3. Visibility,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/3-visibility +Get a vehicle log book (V5C),/vehicle-log-book +Get free childcare if you're working: step by step,/get-free-childcare-if-youre-working +Income Tax: general enquiries,/government/organisations/hm-revenue-customs/contact/income-tax-enquiries-for-individuals-pensioners-and-employees +H. Documentation ,/guidance/mot-testing-guide/h-documentation +How to complete your tax return for Self Assessment,/government/publications/self-assessment-tax-return-sa100 +Student visa ,/student-visa +Set up as a sole trader,/set-up-sole-trader +Help online for Self Assessment,/guidance/help-online-for-self-assessment +Overseas British passport applications,/overseas-passports +Find an energy certificate,/find-energy-certificate +Find pension contact details,/find-pension-contact-details +Appendix 3: Grounds for refusal,/guidance/mot-testing-guide/appendix-3-grounds-for-refusal +National Insurance rates and categories,/national-insurance-rates-letters +Foreign travel advice,/foreign-travel-advice +HM Revenue & Customs,/government/organisations/hm-revenue-customs +Using your UK Visas and Immigration account,/guidance/using-your-uk-visas-and-immigration-account +Department for Work and Pensions,/government/organisations/department-for-work-pensions +Visa processing times: applications outside the UK,/guidance/visa-processing-times-applications-outside-the-uk +Get your National Insurance number,/government/publications/national-insurance-get-your-national-insurance-number-in-writing-ca5403 +Check if you're eligible for the Warm Home Discount,/check-if-youre-eligible-for-warm-home-discount +Employment and Support Allowance (ESA),/employment-support-allowance +Download the HMRC app,/guidance/download-the-hmrc-app +Visa fees,/visa-fees +Apply for a vehicle registration certificate (form V62),/government/publications/application-for-a-vehicle-registration-certificate +British National (Overseas) visa,/british-national-overseas-bno-visa +Appendix B: Tyre load index tables,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/appendix-b-tyre-load-index-tables +A. Introduction,/guidance/mot-testing-guide/a-introduction +Child Trust Fund,/child-trust-funds +Register to vote,/register-to-vote +Take a practice theory test,/take-practice-theory-test +Tax codes,/tax-codes +Get your SA302 tax calculation,/sa302-tax-calculation +Download and order DVLA forms,/dvlaforms +Find a passport office for your Fast Track or Premium appointment,/find-regional-passport-office +Check someone's immigration status: use their share code,/check-immigration-status +HMRC tools and calculators,/guidance/hmrc-tools-and-calculators +Private (personalised) number plates,/personalised-vehicle-registration-numbers +Lasting power of attorney forms,/government/publications/make-a-lasting-power-of-attorney +Check for flooding ,/check-flooding +Cancel a lost or stolen passport,/report-a-lost-or-stolen-passport +Contact the Pension Service,/contact-pension-service +Searching the Companies House register,/guidance/search-the-companies-house-register +The new State Pension,/new-state-pension +Get a passport urgently,/get-a-passport-urgently +Using a Veteran Card as a service leaver,/guidance/using-a-veteran-card-as-a-service-leaver +Stop being self-employed,/stop-being-self-employed +Tell DVLA you've changed address: step by step,/tell-dvla-changed-address +View a lasting power of attorney,/view-lasting-power-of-attorney +Check your Driver CPC periodic training hours,/check-your-driver-cpc-periodic-training-hours +Applying for probate,/applying-for-probate +D. Requirements for authorisation,/guidance/mot-testing-guide/d-requirements-for-authorisation +Attendance Allowance claim form,/government/publications/attendance-allowance-claim-form +Budgeting Loans,/budgeting-help-benefits +How to claim Universal Credit: step by step,/how-to-claim-universal-credit +Prepare for the ban on XL Bully dogs,/guidance/prepare-for-the-ban-on-xl-bully-dogs +Apply for an electronic travel authorisation (ETA),/guidance/apply-for-an-electronic-travel-authorisation-eta +Request your personal information from the Department for Work and Pensions,/guidance/request-your-personal-information-from-the-department-for-work-and-pensions +Find out your rubbish collection day,/rubbish-collection-day +Get an immigration health surcharge refund if you work in health and care,/apply-immigration-health-surcharge-refund +Pay Class 2 National Insurance if you do not pay through Self Assessment,/pay-class-2-national-insurance +Student finance for undergraduates,/student-finance +Check and challenge your business rates valuation: step by step,/guidance/check-and-challenge-your-business-rates-valuation-step-by-step +Warm Home Discount Scheme,/the-warm-home-discount-scheme +Find a business rates valuation,/find-business-rates +Attendance Allowance,/attendance-allowance +Self Assessment: general enquiries,/government/organisations/hm-revenue-customs/contact/self-assessment +Taking sick leave,/taking-sick-leave +Using your GOV.UK One Login,/using-your-gov-uk-one-login +Cancel your vehicle tax and get a refund,/vehicle-tax-refund +Check if you can become a British citizen,/british-citizenship +Apply for an older person's bus pass,/apply-for-elderly-person-bus-pass +How to claim New Style Employment and Support Allowance (ESA): step by step,/how-to-claim-new-style-esa +Pay your VAT bill,/pay-vat +Working for yourself,/working-for-yourself +Check your payroll calculations manually,/government/collections/how-to-manually-check-your-payroll-calculations +Find out about money taken off your Universal Credit payment,/guidance/find-out-about-money-taken-off-your-universal-credit-payment +Pension Credit,/pension-credit +Universal Credit if you receive a Migration Notice letter,/guidance/tax-credits-and-some-benefits-are-ending-move-to-universal-credit +Pay your Council Tax,/pay-council-tax +UK bank holidays,/bank-holidays +Report a change of circumstances if you have a visa or BRP,/change-circumstances-visa-brp +Coronavirus (COVID-19): guidance and support,/coronavirus +Strike off a company from the register (DS01),/government/publications/strike-off-a-company-from-the-register-ds01 +Get an EORI number,/eori +Pay employers' PAYE,/pay-paye-tax +Vehicle tax rates,/vehicle-tax-rate-tables +Use the Employer Checking Service,/employee-immigration-employment-status +Manage your tax credits,/manage-your-tax-credits +How to apply for a certificate of residence to claim tax relief abroad,/guidance/get-a-certificate-of-residence +Maternity pay and leave,/maternity-pay-leave +Pay for UK healthcare as part of your immigration application,/healthcare-immigration-application +Send money to someone in prison,/send-prisoner-money +Expenses if you're self-employed,/expenses-if-youre-self-employed +Send your fit note for your ESA claim,/send-fit-note +Work out your rental income when you let property,/guidance/income-tax-when-you-rent-out-a-property-working-out-your-rental-income +Track your driving licence application,/track-your-driving-licence-application +Holiday entitlement,/holiday-entitlement-rights +Apply to the EU Settlement Scheme (settled and pre-settled status) translations,/guidance/settled-status-for-eu-citizens-and-their-families-translations +Employee’s statement of sickness to claim Statutory Sick Pay,/government/publications/statutory-sick-pay-employees-statement-of-sickness-sc2 +Send details to support your VAT repayment claim,/guidance/send-details-to-support-your-vat-repayment-claim +Disability Living Allowance (DLA) for children claim form,/government/publications/disability-living-allowance-for-children-claim-form +Immigration Rules Appendix Shortage Occupation List,/guidance/immigration-rules/immigration-rules-appendix-shortage-occupation-list +Passport advice and complaints,/passport-advice-line +Sign in to your VAT online account,/sign-in-vat-account +Check when you can expect a reply from HMRC,/guidance/check-when-you-can-expect-a-reply-from-hmrc +" Trade Tariff: look up commodity codes, duty and VAT rates",/trade-tariff +Egypt travel advice,/foreign-travel-advice/egypt +Marriage Allowance,/marriage-allowance +Register for the Goods Vehicle Movement Service,/guidance/register-for-the-goods-vehicle-movement-service +"Capital Gains Tax: what you pay it on, rates and allowances",/capital-gains-tax +High Income Child Benefit Charge,/child-benefit-tax-charge +Check benefits and financial support you can get,/check-benefits-financial-support +"Import of products, animals, food and feed system (IPAFFS)",/guidance/import-of-products-animals-food-and-feed-system +Manage your trust's details,/guidance/manage-your-trusts-registration-service +Selling a vehicle,/responsibilities-selling-vehicle +Calculate holiday entitlement,/calculate-your-holiday-entitlement +DBS online account guidance,/guidance/dbs-online-account-guidance +Life in the UK Test,/life-in-the-uk-test +Get your postponed import VAT statement,/guidance/get-your-postponed-import-vat-statement +Get help with NHS prescriptions and health costs,/help-nhs-costs +Social Security abroad: NI38,/government/publications/social-security-abroad-ni38 +Register a trust as a trustee,/guidance/register-a-trust-as-a-trustee +"Cancel your visa, immigration or citizenship application",/cancel-visa +"Getting P45, P60 and other forms: employer guide",/get-paye-forms-p45-p60 +M. System rules and user roles,/guidance/mot-testing-guide/m-system-rules-and-user-roles +Bereavement Support Payment,/bereavement-support-payment +Check a UK VAT number,/check-uk-vat-number +Child Maintenance Service,/child-maintenance-service +Jobseeker's Allowance (JSA),/jobseekers-allowance +"General rules, techniques and advice for all drivers and riders (103 to 158) ",/guidance/the-highway-code/general-rules-techniques-and-advice-for-all-drivers-and-riders-103-to-158 +Estimate your Income Tax for the current year,/estimate-income-tax +Find an immigration adviser,/find-an-immigration-adviser +Child Trust Fund,/government/organisations/hm-revenue-customs/contact/child-trust-fund +London,/guidance/find-a-skills-bootcamp/london +Appendix A: Structural integrity and corrosion,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/appendix-a-structural-integrity-and-corrosion +Child Tax Credit,/child-tax-credit +"P45, P60 and P11D forms: workers' guide",/paye-forms-p45-p60-p11d +Probate forms and guidance,/government/collections/probate-forms +Repay and manage benefit money you owe,/repay-manage-benefit-owed +Free courses for jobs,/guidance/free-courses-for-jobs +Starter checklist for PAYE,/guidance/starter-checklist-for-paye +Find a Skills Bootcamp,/guidance/find-a-skills-bootcamp +Budgeting Loan claim form,/government/publications/budgeting-loan-claim-form +Legislation.gov.uk,https://www.legislation.gov.uk/ +Apply for the Boiler Upgrade Scheme,/apply-boiler-upgrade-scheme +Import goods into the UK: step by step,/import-goods-into-uk +Youth Mobility Scheme visa,/youth-mobility +Find your local council,/find-local-council +Statutory Sick Pay (SSP) ,/statutory-sick-pay +Getting your first adult passport,/apply-first-adult-passport +Checking a job applicant's right to work,/check-job-applicant-right-to-work +Set up a private limited company,/limited-company-formation +Child Benefit tax calculator,/child-benefit-tax-calculator +Disability Living Allowance (DLA) for adults,/dla-disability-living-allowance-benefit +Student Loans Company,/government/organisations/student-loans-company +Apply to change a company's disputed registered office address (RP07),/government/publications/apply-to-change-a-companys-disputed-registered-office-address-rp07 +Using the road (159 to 203),/guidance/the-highway-code/using-the-road-159-to-203 +How and when your benefits are paid,/how-to-have-your-benefits-paid +Winter Fuel Payment,/winter-fuel-payment +Testing for COVID-19 - NHS,https://www.nhs.uk/nhs-services/covid-19-services/testing-for-covid-19/ +Apply for a Home Office travel document,/apply-home-office-travel-document +Get help with the cost of living from your local council,/cost-living-help-local-council +Apply for a visa under the Ukraine Sponsorship Scheme (Homes for Ukraine),/guidance/apply-for-a-visa-under-the-ukraine-sponsorship-scheme +Make a subject access request to HMRC,/guidance/hmrc-subject-access-request +Indefinite leave to remain if you have family in the UK,/indefinite-leave-to-remain-family +Pension Credit calculator,/pension-credit-calculator +Corporation Tax,/corporation-tax +Claim back tax on a flexibly accessed pension overpayment (P55),/guidance/claim-back-tax-on-a-flexibly-accessed-pension-overpayment-p55 +Spain travel advice,/foreign-travel-advice/spain +Get a divorce,/divorce +Authorise a tax agent (64-8),/government/publications/tax-agents-and-advisers-authorising-your-agent-64-8 +Ultra Low Emission Zone - Transport for London,https://tfl.gov.uk/modes/driving/ultra-low-emission-zone +Drive in a clean air zone,/clean-air-zones +Complain about HMRC,/complain-about-hmrc +Find energy grants for your home (Help to Heat),/government/collections/find-energy-grants-for-you-home-help-to-heat +Manage your student loan balance,/sign-in-to-manage-your-student-loan-balance +Check if a dog is an XL Bully,/government/publications/official-definition-of-an-xl-bully-dog +Getting married abroad,/marriage-abroad +Register for VAT,/register-for-vat +Immigration Rules Appendix Skilled Occupations,/guidance/immigration-rules/immigration-rules-appendix-skilled-occupations +Check or update your company car tax,/update-company-car-details +"'Show me, tell me' questions: car driving test",/government/publications/car-show-me-tell-me-vehicle-safety-questions +Claim a tax refund when you've taken a small pension lump sum (P53),/guidance/claim-a-tax-refund-when-youve-taken-a-small-pension-lump-sum-p53 +Prove your English language abilities with a secure English language test (SELT),/guidance/prove-your-english-language-abilities-with-a-secure-english-language-test-selt +Travelling to the United States - ESTA,https://esta.cbp.dhs.gov/ +USA travel advice,/foreign-travel-advice/usa +Make a court claim for money,/make-court-claim-for-money +Change your name or personal details on your passport,/changing-passport-information +Cost of living support,/cost-of-living +HMRC rates and allowances,/government/collections/rates-and-allowances-hm-revenue-and-customs +LP12 Make and register your lasting power of attorney: a guide (web version),/government/publications/make-a-lasting-power-of-attorney/lp12-make-and-register-your-lasting-power-of-attorney-a-guide-web-version +Set up a limited company and register for Corporation Tax: service availability and issues,/government/publications/set-up-a-limited-company-and-register-for-corporation-tax-service-availability-and-issues +How domestic properties are assessed for Council Tax bands,/guidance/understand-how-council-tax-bands-are-assessed +HMRC manuals,/government/collections/hmrc-manuals +Get an electronic visa waiver to enter the UK,/get-electronic-visa-waiver +File your company's annual accounts with Companies House,/file-your-company-annual-accounts +B. Authorised examiners,/guidance/mot-testing-guide/b-authorised-examiners +Online immigration status (eVisa),/guidance/online-immigration-status-evisa +Tell HMRC about underpaid tax from previous years,/guidance/tell-hmrc-about-underpaid-tax-from-previous-years +Find a visa application centre,/find-a-visa-application-centre +Data items 2023 to 2024,/guidance/complete-the-school-census/data-items-2023-to-2024 +Register a lasting power of attorney,/government/publications/register-a-lasting-power-of-attorney +Indefinite leave to remain in the UK: your rights and status,/guidance/indefinite-leave-to-remain-in-the-uk +Housing Benefit,/housing-benefit +What to do when someone dies: step by step,/when-someone-dies +Change your name on your vehicle log book (V5C),/change-name-v5c +National Minimum Wage and National Living Wage rates,/national-minimum-wage-rates +The basic State Pension,/state-pension +Calculate your child maintenance ,/calculate-child-maintenance +India travel advice,/foreign-travel-advice/india +PAYE Online for employers,/paye-online +Get your Income Tax right if you're leaving the UK (P85),/guidance/get-your-income-tax-right-if-youre-leaving-the-uk-p85 +Home Responsibilities Protection,/home-responsibilities-protection-hrp +Get a faster decision on your visa or settlement application,/faster-decision-visa-settlement +Pension administrators: check a member's GMP,/guidance/pension-administrators-check-a-members-gmp +Pay voluntary Class 3 National Insurance,/pay-voluntary-class-3-national-insurance +Apply to remove material about a director (RP06),/government/publications/apply-to-remove-material-about-a-director-rp06 +"How Inheritance Tax works: thresholds, rules and allowances",/inheritance-tax +Sure Start Maternity Grant,/sure-start-maternity-grant +Visit the UK for a holiday or to see family or friends,/visit-uk-holiday-family-friends +Capital Gains Tax rates and allowances,/guidance/capital-gains-tax-rates-and-allowances +Sign in to your apprenticeship service account,/sign-in-apprenticeship-service-account +Check the long term flood risk for an area in England,/check-long-term-flood-risk +Skilled Worker visa: shortage occupations,/government/publications/skilled-worker-visa-shortage-occupations +Appendix 8: Disciplinary procedures,/guidance/mot-testing-guide/appendix-8-disciplinary-procedures +Universal Credit advances,/guidance/universal-credit-advances +Get your document legalised,/get-document-legalised +Apply for Specified Adult Childcare credits,/guidance/apply-for-specified-adult-childcare-credits +PAYE and payroll for employers,/paye-for-employers +Set up a limited company: step by step,/set-up-limited-company +Get a copy of a decree absolute or final order,/copy-decree-absolute-final-order +"Find driving schools, lessons and instructors",/find-driving-schools-and-lessons +Maternity Allowance,/maternity-allowance +Pay your tax bill by Direct Debit,/pay-tax-direct-debit +Change the name or gender on your driving licence,/change-name-driving-licence +Change your theory test appointment,/change-theory-test +Waiting and parking (238 to 252) ,/guidance/the-highway-code/waiting-and-parking-238-to-252 +Penalty points (endorsements),/penalty-points-endorsements +Check a tenant's right to rent in England: use their share code,/view-right-to-rent +Import VAT and Customs Duty on gifts,/guidance/import-vat-and-customs-duty-on-gifts +Pay a court fine,/pay-court-fine-online +Working Tax Credit,/working-tax-credit +Early years foundation stage (EYFS) statutory framework,/government/publications/early-years-foundation-stage-framework--2 +Disability Living Allowance (DLA) for children,/disability-living-allowance-children +Apply for rectification by the registrar of companies (RP02A),/government/publications/apply-for-rectification-by-the-registrar-of-companies-rp02a +Update Service and other DBS online services,/guidance/digital-and-online-services +Change the register (AP1),/government/publications/change-the-register-ap1 +Driving licence categories,/driving-licence-categories +Find government grants,/guidance/find-government-grants +Report benefit fraud,/report-benefit-fraud +Apply to pay voluntary National Insurance contributions when abroad (CF83),/guidance/apply-to-pay-voluntary-national-insurance-contributions-when-abroad-cf83 +Company Tax Returns,/company-tax-returns +EU Settlement Scheme: evidence of UK residence,/guidance/eu-settlement-scheme-evidence-of-uk-residence +Travelling to the EU and Schengen area,/travel-to-eu-schengen-area +Vehicle tax Direct Debit payments,/vehicle-tax-direct-debit +Petition Parliament and the government,/petition-government +Apply for support from the Great British Insulation Scheme,/apply-great-british-insulation-scheme +Financial help if you're disabled,/financial-help-disabled +Understand your Self Assessment tax bill,/understand-self-assessment-bill +Tax on savings interest,/apply-tax-free-interest-on-savings +Check how to get your import VAT certificate (C79),/guidance/get-your-import-vat-certificates +10. Seat belt installation checks,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/10-seat-belt-installation-checks +Youth Mobility Scheme visa: ballot system,/guidance/youth-mobility-scheme-visa-ballot-system +Apply for Council Tax Reduction,/apply-council-tax-reduction +Become an apprentice,/become-apprentice +Right to work checklist,/government/publications/right-to-work-checklist +Repaying your student loan,/repaying-your-student-loan +Payrolling employees: taxable benefits and expenses,/guidance/paying-your-employees-expenses-and-benefits-through-your-payroll +Contact the Disability Service Centre,/disability-benefits-helpline +Apply to keep a vehicle registration number and put it on another vehicle (form V317),/government/publications/application-to-transfer-or-retain-a-vehicle-registration-number +"Check how much tax relief you can claim for uniforms, work clothing and tools",/guidance/job-expenses-for-uniforms-work-clothing-and-tools +Calculate your statutory redundancy pay,/calculate-your-redundancy-pay +Visa processing times: applications inside the UK,/guidance/visa-processing-times-applications-inside-the-uk +If you cannot pay your tax bill on time,/difficulties-paying-hmrc +Support your child or partner’s student finance application – 2023 to 2024,/government/publications/support-your-child-or-partners-student-finance-application-2023-to-2024 +Appendix 6: Tester training and demonstration tests,/guidance/mot-testing-guide/appendix-6-tester-training-and-demonstration-tests +Vehicle insurance,/vehicle-insurance +Voluntary National Insurance,/voluntary-national-insurance-contributions +Check if you need to send a Self Assessment tax return,/check-if-you-need-tax-return +Prove you qualify for Child Benefit,/child-benefit-proof +Get Tax-Free Childcare: step by step,/get-tax-free-childcare +Apply for a driver digital tachograph card,/apply-driver-digital-tachograph-card +Check a used vehicle you’re buying,/checks-when-buying-a-used-car +School term and holiday dates,/school-term-holiday-dates +Immigration Rules Appendix Skilled Worker,/guidance/immigration-rules/immigration-rules-appendix-skilled-worker +Self-employed National Insurance rates,/self-employed-national-insurance-rates +Buy a personalised registration number,/buy-a-personalised-registration-number +Get help with funeral costs (Funeral Expenses Payment),/funeral-payments +Help with your energy bills,/get-help-energy-bills +Using the ‘UK Immigration: ID Check’ app,/guidance/using-the-uk-immigration-id-check-app +Apply for the Global Talent visa ,/global-talent +Apply for Home Responsibilities Protection,/guidance/apply-for-home-responsibilities-protection +Appendix C: Seat belt fitment tables,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/appendix-c-seat-belt-fitment-tables +Tax on foreign income,/tax-foreign-income +Get proof of employment history ,/get-proof-employment-history +Capability for work questionnaire,/government/publications/capability-for-work-questionnaire +Sponsor a Skilled Worker,/government/publications/workers-and-temporary-workers-sponsor-a-skilled-worker +E. Tester,/guidance/mot-testing-guide/e-tester +Healthcare for UK nationals visiting the EU,/guidance/uk-residents-visiting-the-eueea-and-switzerland-healthcare +Australia travel advice,/foreign-travel-advice/australia +The Charity Commission,/government/organisations/charity-commission +What to do after someone dies,/after-a-death +Applying for or renewing a passport online: step-by-step leaflets,/government/collections/applying-for-or-renewing-a-passport-online-step-by-step-leaflets +Easy read: Cold Weather Payments,/government/publications/easy-read-cold-weather-payments +Household Support Fund: guidance for local councils,/government/publications/household-support-fund-guidance-for-local-councils +Claim a refund of Income Tax deducted from savings and investments (R40),/guidance/claim-a-refund-of-income-tax-deducted-from-savings-and-investments +Claim a tax refund when you've flexibly accessed all of your pension (P53Z),/guidance/claim-a-tax-refund-when-youve-flexibly-accessed-all-of-your-pension-p53z +Birth certificate application form,/government/publications/birth-certificate-application-form +Rates and allowances: travel — mileage and fuel allowances,/government/publications/rates-and-allowances-travel-mileage-and-fuel-allowances +Change your name by deed poll,/change-name-deed-poll +India Young Professionals Scheme visa,/india-young-professionals-scheme-visa +NHS health services - NHS,https://www.nhs.uk/nhs-services/ +Get help with savings if you’re on a low income (Help to Save),/get-help-savings-low-income +Confirmation statement (CS01),/government/publications/confirmation-statement-cs01 +Pay the heavy goods vehicle (HGV) levy,/hgv-levy +Marriages and civil partnerships in England and Wales,/marriages-civil-partnerships +Research your family history using the General Register Office,/research-family-history +Sign up for flood warnings ,/sign-up-for-flood-warnings +Registered title(s): whole transfer (TR1),/government/publications/registered-titles-whole-transfer-tr1 +J. Vehicle prohibitions,/guidance/mot-testing-guide/j-vehicle-prohibitions +Tax overpayments and underpayments,/tax-overpayments-and-underpayments +Get information about property and land,/get-information-about-property-and-land +Problems using Government Gateway,/guidance/problems-using-government-gateway +Entering the UK,/uk-border-control +Access to Work: get support if you have a disability or health condition,/access-to-work +HM Courts & Tribunals Service,/government/organisations/hm-courts-and-tribunals-service +Claim an Income Tax refund,/government/publications/income-tax-tax-claim-r38 +Traffic signs,/guidance/the-highway-code/traffic-signs +Stamp Duty Land Tax,/stamp-duty-land-tax +File your confirmation statement (annual return) with Companies House,/file-your-confirmation-statement-with-companies-house +Company authentication codes for online filing,/guidance/company-authentication-codes-for-online-filing +Prevent duty training,/guidance/prevent-duty-training +National Insurance: introduction,/national-insurance +Tax on your private pension contributions,/tax-on-your-private-pension +Apply online for student finance,/apply-online-for-student-finance +File your dormant accounts (AA02),/government/publications/file-your-dormant-accounts-aa02 +Request copies of your personal immigration and borders information,/government/publications/requests-for-personal-data-uk-visas-and-immigration +Self Assessment: UK property (SA105),/government/publications/self-assessment-uk-property-sa105 +Tell HMRC when you change your address,/tell-hmrc-change-address +Check your Simple Assessment tax bill,/check-simple-assessment +Child Benefit: general enquiries,/government/organisations/hm-revenue-customs/contact/child-benefit +Can I drive while my application is with DVLA? (INF188/6),/government/publications/inf1886-can-i-drive-while-my-application-is-with-dvla +Immigration Rules Appendix FM: family members,/guidance/immigration-rules/immigration-rules-appendix-fm-family-members +Set up a Direct Debit for a duty deferment account on the Customs Declaration Service,/guidance/set-up-a-direct-debit-for-a-duty-deferment-account-on-the-customs-declaration-service +Report a free NHS COVID-19 rapid lateral flow test result,/report-covid19-result +Change vehicle details on a V5C registration certificate (log book),/change-vehicle-details-registration-certificate +Inheritance Tax account (IHT400),/government/publications/inheritance-tax-inheritance-tax-account-iht400 +Proposed benefit and pension rates 2024 to 2025,/government/publications/proposed-benefit-and-pension-rates-2024-to-2025 +Register child under 18 as British citizen (form MN1),/government/publications/register-child-under-18-as-british-citizen-form-mn1 +Application for transfer of residence relief (ToR1),/guidance/application-for-transfer-of-residence-relief-tor1 +Abbreviations and definitions,/guidance/mot-testing-guide/abbreviations-and-definitions +Self Assessment: Capital gains summary (SA108),/government/publications/self-assessment-capital-gains-summary-sa108 +United Arab Emirates travel advice,/foreign-travel-advice/united-arab-emirates +Export goods from the UK: step by step,/export-goods +Immigration Rules,/guidance/immigration-rules +School admissions,/schools-admissions +Tell HMRC your company is dormant for Corporation Tax,/tell-hmrc-your-company-is-dormant-for-corporation-tax +Charity Commission online services: sign in or set up an account,/guidance/online-services-for-charities +"Pay taxes, penalties or enquiry settlements",/guidance/pay-taxes-penalties-and-enquiry-settlements +"Indefinite leave to remain if you have a Skilled Worker, T2 or tier 2 visa",/indefinite-leave-to-remain-tier-2-t2-skilled-worker-visa +Indefinite leave to remain (private life),/apply-indefinite-leave-to-remain-private-life +Home Office,/government/organisations/home-office +Self Assessment: self-employment (short) (SA103S),/government/publications/self-assessment-self-employment-short-sa103s +Claim back Income Tax when you've stopped working (P50),/guidance/claim-back-income-tax-when-youve-stopped-working +"Maternity, Adoption and paternity calculator for employers",/maternity-paternity-calculator +Statutory Maternity Pay and Leave: employer guide,/employers-maternity-pay-leave +Apply for a court order to make arrangements for a child or resolve a dispute about their upbringing: Form C100,/government/publications/form-c100-application-under-the-children-act-1989-for-a-child-arrangements-prohibited-steps-specific-issue-section-8-order-or-to-vary-or-discharge +Report changes that affect your Child Benefit,/report-changes-child-benefit +Self-employment and Universal Credit,/self-employment-and-universal-credit +HM Land Registry: Registration Services fees,/guidance/hm-land-registry-registration-services-fees +Changing the sign in details for your GOV.UK One Login,/guidance/changing-the-sign-in-details-for-your-govuk-one-login +Exchange a foreign driving licence,/exchange-foreign-driving-licence +Ecuador travel advice,/foreign-travel-advice/ecuador +HM Passport Office,/government/organisations/hm-passport-office +Skilled Worker visa: eligible occupations,/government/publications/skilled-worker-visa-eligible-occupations +Employer form SSP1: Statutory Sick Pay and an employee's claim for benefit,/government/publications/statutory-sick-pay-employee-not-entitled-form-for-employers +The Personal Independence Payment (PIP) toolkit,/guidance/the-personal-independence-payment-pip-toolkit +Set up a business,/set-up-business +Apply for a Council Tax discount,/apply-for-council-tax-discount +Become a car driving instructor: step by step,/become-car-driving-instructor +Contact Jobcentre Plus,/contact-jobcentre-plus +Find out which DBS check is right for your employee,/find-out-dbs-check +Who can get a Blue Badge,/government/publications/blue-badge-can-i-get-one +MOT testing guide for test stations,/guidance/mot-testing-guide +Manage your vehicle operator licence,/manage-vehicle-operator-licence +Get MOT reminders,/mot-reminder +UK residence cards,/uk-residence-card +Appeal a benefit decision,/appeal-benefit-decision +Global Entry: apply for faster entry to the USA ,/global-entry-usa +Paternity pay and leave,/paternity-pay-leave +Contact HM Land Registry,/guidance/contact-hm-land-registry +Tax treaties,/government/collections/tax-treaties +New Style Employment and Support Allowance,/guidance/new-style-employment-and-support-allowance +Get a passport photo,/photos-for-passports +Book a National Driver Offender Retraining Scheme course,/book-national-driver-offender-retraining-course +Find a job in teaching or education,/find-teaching-job +Register your company,/government/publications/construction-industry-scheme-company-registration-cis305 +Universal Credit: Landlord request for a managed payment or rent arrears deduction,/government/publications/universal-credit-landlord-request-for-a-managed-payment-or-rent-arrears-deduction +North-west,/guidance/find-a-skills-bootcamp/north-west +Visit someone in prison,/prison-visits +Apply for a Start Up Loan for your business,/apply-start-up-loan +Challenge your Council Tax band,/challenge-council-tax-band +Universal Credit statistics,/government/collections/universal-credit-statistics +Apply to extend your stay in the UK: form FLR(FP),/government/publications/apply-to-extend-your-stay-in-the-uk-form-flrfp +Change a company's registered office address (AD01),/government/publications/change-a-registered-office-address-ad01 +Immigration Rules part 1: leave to enter or stay in the UK,/guidance/immigration-rules/immigration-rules-part-1-leave-to-enter-or-stay-in-the-uk +Individual Savings Accounts (ISAs),/individual-savings-accounts +Speeding penalties,/speeding-penalties +South-east,/guidance/find-a-skills-bootcamp/south-east +Claim tax relief for your job expenses if you cannot claim online,/guidance/send-an-income-tax-relief-claim-for-job-expenses-by-post-or-phone +"Send your rent, lease or ownership details to the Valuation Office Agency",/send-rent-lease-details +Shortage occupation lists,/government/collections/migration-advisory-committee-recommended-shortage-lists +UK Visa and Citizenship Application Services,/ukvcas +Claiming Gift Aid as a charity or CASC,/claim-gift-aid +Find postgraduate teacher training courses,/find-postgraduate-teacher-training-courses +Report Capital Gains Tax on UK property,/government/publications/report-capital-gains-tax-on-uk-property +Winter Fuel Payment claim form,/government/publications/winter-fuel-payment-claim-form +Tax your vehicle without a vehicle tax reminder,/tax-vehicle-without-v11-reminder +Carer's Allowance claim form,/government/publications/carers-allowance-claim-form +Review of the shortage occupation list 2023,/government/publications/review-of-the-shortage-occupation-list-2023 +I. Discipline,/guidance/mot-testing-guide/i-discipline +VAT guide (VAT Notice 700),/guidance/vat-guide-notice-700 +Search for a trade mark,/search-for-trademark +Travel urgently from abroad without your UK passport,/travel-urgently-from-abroad-without-uk-passport +Apply for a sponsor licence,/apply-sponsor-licence +Check what help you could get with childcare costs,/childcare-calculator +Get childcare: step by step,/get-childcare +West Midlands ,/guidance/find-a-skills-bootcamp/west-midlands +Tax on dividends,/tax-on-dividends +"Healthcare for UK nationals visiting the EU, Iceland, Liechtenstein, Norway or Switzerland",/guidance/uk-residents-visiting-the-eueea-and-switzerland-healthcare +Tax when you get a pension,/tax-on-pension +Request your employment history from National Insurance records,/government/publications/national-insurance-employment-history-request +Death certificate application form,/government/publications/death-certificate-application-form +Become a British citizen by naturalisation (form AN),/government/publications/become-a-british-citizen-by-naturalisation-form-an +Get copies of your duty deferment statements,/guidance/get-copies-of-your-duty-deferment-statements +India Young Professionals Scheme visa: ballot system,/guidance/india-young-professionals-scheme-visa-ballot-system +Tax-free allowances on property and trading income,/guidance/tax-free-allowances-on-property-and-trading-income +Lifetime ISA,/lifetime-isa +Passport fees,/passport-fees +Vehicle registration,/vehicle-registration +Check your driving test appointment details,/check-driving-test +Check your theory test appointment details,/check-theory-test +Dormant companies and associations,/dormant-company +Apply for probate by post if there is not a will: Form PA1A,/government/publications/apply-for-probate-by-post-if-there-is-not-a-will +Certificate of identity for a private individual (ID3),/government/publications/certificate-of-identity-for-a-private-individual-id3 +Make an application to a court ('application notice'): Form N244,/government/publications/form-n244-application-notice +"Complete a tax check for a taxi, private hire or scrap metal licence",/guidance/complete-a-tax-check-for-a-taxi-private-hire-or-scrap-metal-licence +"C. Designated councils, taxis and private hire vehicles",/guidance/mot-testing-guide/c-designated-councils-taxis-and-private-hire-vehicles +Thailand travel advice,/foreign-travel-advice/thailand +Employment and Support Allowance: permitted work form,/government/publications/employment-and-support-allowance-permitted-work-form +Turkey travel advice,/foreign-travel-advice/turkey +Clean air zones,/guidance/driving-in-a-clean-air-zone +UK Ancestry visa,/ancestry-visa +Contracts Finder,/contracts-finder +The electoral register and the 'open register',/electoral-register +Department for Work and Pensions – Complaints procedure,/government/organisations/department-for-work-pensions/about/complaints-procedure +Challenge a benefit decision (mandatory reconsideration),/mandatory-reconsideration +Estimate your Income Tax for a previous tax year,/check-income-tax +Department for Education,/government/organisations/department-for-education +Ofsted,/government/organisations/ofsted +A to Z,/guidance/style-guide/a-to-z-of-gov-uk-style +Apply for Marriage Allowance online,/apply-marriage-allowance +Check an EORI number,/check-eori-number +Closing a limited company,/closing-a-limited-company +Get a prescription prepayment certificate,/get-a-ppc +Sustainable Farming Incentive guidance,/government/collections/sustainable-farming-incentive-guidance +Converting foreign currency amounts to include in the customs value,/guidance/converting-foreign-currency-amounts-to-include-in-the-customs-value +Upload documents and get messages for the Customs Declaration Service,/guidance/send-documents-to-support-declarations-for-the-customs-declaration-service +News and communications,/search/news-and-communications +Claim Child Benefit if you cannot claim online,/government/publications/claim-child-benefit-if-you-cannot-claim-online +TV Licence,/find-licences/tv-licence +Early years funding – extension of the entitlements,/government/consultations/early-years-funding-extension-of-the-entitlements +Charities: change of details form (ChV1),/government/publications/charities-change-of-details-form-chv1 +Check how much Income Tax you paid last year,/check-income-tax-last-year +Vehicle tax rates (V149 and V149/1),/government/publications/rates-of-vehicle-tax-v149 +Self Assessment: Partnership Tax Return (SA800),/government/publications/self-assessment-partnership-tax-return-sa800 +SFI Handbook for the SFI 2023 offer,/government/publications/sfi-handbook-for-the-sfi-2023-offer +Verify identity: citizen (ID1),/government/publications/verify-identity-citizen-id1 +Qualified teacher status (QTS): qualify to teach in England,/guidance/qualified-teacher-status-qts +Report a company using your personal details without your permission,/guidance/report-a-company-using-your-personal-details-without-your-permission +Sign in to your agent services account,/guidance/sign-in-to-your-agent-services-account +Private renting,/private-renting +Send a VAT Return,/submit-vat-return +Find a nursery school place,/find-nursery-school-place +Immigration health surcharge: applying for reimbursement,/government/publications/immigration-health-surcharge-applying-for-a-refund +Minimum wage rates for 2023,/government/publications/minimum-wage-rates-for-2023 +Check if a document allows someone to work in the UK,/legal-right-work-uk +Tuberculosis tests for visa applicants,/tb-test-visa +MOT inspection manual: cars and passenger vehicles,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles +Child Benefit payment dates,/child-benefit-payment-dates +Apply for an SIA licence,/guidance/apply-for-an-sia-licence +Assured tenancy forms,/guidance/assured-tenancy-forms +Appeal against a penalty charge notice,/appeal-against-a-penalty-charge-notice +Armed forces pensions,/guidance/pensions-and-compensation-for-veterans +Tax when you sell property,/tax-sell-property +"Check if you can get Maternity or Paternity Leave or Pay, or Maternity Allowance",/maternity-paternity-pay-leave +Apply for an EU Settlement Scheme family permit to join family in the UK,/family-permit +英国访问签证申请材料指南,/government/publications/visitor-visa-guide-to-supporting-documents/4897638 +Apply for an export health certificate,/guidance/apply-for-an-export-health-certificate +"Apply for healthcare cover in the EU, Iceland, Liechtenstein, Norway or Switzerland (CA8454)",/guidance/apply-for-health-care-cover-in-the-european-economic-area-ca8454 +Ofsted services: forgotten your Government Gateway user ID and password,/guidance/ofsted-services-forgotten-your-government-gateway-user-id-and-password +Universal Credit childcare costs,/guidance/universal-credit-childcare-costs +Prove your knowledge of English for citizenship and settling,/english-language +Renew your short-term medical driving licence,/renew-medical-driving-licence +Change the photo on your driving licence,/renew-photo-driving-licence +How to value an estate for Inheritance Tax and report its value,/valuing-estate-of-someone-who-died +National Insurance forms,/government/collections/national-insurance-forms +Rural Payments Agency,/government/organisations/rural-payments-agency +Higher and degree apprenticeships,/government/publications/higher-and-degree-apprenticeships +Immigration Rules Appendix V: Visitor,/guidance/immigration-rules/immigration-rules-appendix-v-visitor +Send a quarterly return for your non-resident landlord tax,/guidance/send-a-quarterly-return-for-your-non-resident-landlord-tax +Business rates,/introduction-to-business-rates +Record MOT test results,/mot-testing-service +Report an immigration or border crime,/report-immigration-crime +Charity Worker visa (Temporary Work),/temporary-worker-charity-worker-visa +Self Assessment: Employment (SA102),/government/publications/self-assessment-employment-sa102 +Claim for loss of notice pay ,/claim-loss-notice +Driving licence fees,/driving-licence-fees +Council Tax challenge form,/government/publications/council-tax-challenge-form +Criminal records checks for overseas applicants,/government/publications/criminal-records-checks-for-overseas-applicants +Pension Credit claim form,/government/publications/pension-credit-claim-form--2 +Career skills and training,/career-skills-and-training +"Residence, remittance basis etc (Self Assessment SA109)",/government/publications/self-assessment-residence-remittance-basis-etc-sa109 +Get a National Insurance contributions statement if you live abroad,/guidance/get-a-national-insurance-contributions-statement-if-you-live-abroad +Compare the performance of schools and colleges in England,/school-performance-tables +"Indefinite leave to remain (permission to stay as a refugee, humanitarian protection or Discretionary Leave)",/settlement-refugee-or-humanitarian-protection +UK visa sponsorship management system,/sponsor-management-system +South-west,/guidance/find-a-skills-bootcamp/south-west +Search the charity register,/find-charity-information +Fit note,/government/collections/fit-note +Making Tax Digital for VAT,/government/collections/making-tax-digital-for-vat +National Insurance: general enquiries,/government/organisations/hm-revenue-customs/contact/national-insurance-enquiries-for-employees-and-individuals +"Check if a vehicle, part or accessory has been recalled",/check-vehicle-recall +N. MOT contingency testing procedures,/guidance/mot-testing-guide/n-mot-contingency-testing-procedures +Apply for teacher training,/apply-for-teacher-training +Claim Gift Aid online,/claim-gift-aid-online +Hong Kong British Nationals (Overseas) welcome programme,/government/collections/hong-kong-uk-welcome-programme +Inheritance Tax forms,/government/collections/inheritance-tax-forms +Security Industry Authority,/government/organisations/security-industry-authority +Find a register office,/register-offices +Ask for a visa administrative review,/ask-for-a-visa-administrative-review +Driving test: cars,/driving-test +France travel advice,/foreign-travel-advice/france +International State Pension claim form,/government/publications/guidance-on-claiming-a-state-pension-if-you-retire-abroad +Apply for National Insurance credits if you’re a parent or carer,/government/publications/national-insurance-credits-for-parents-and-carers-cf411a +How to fill in your tax return (2022) ,/government/publications/self-assessment-tax-return-sa100/how-to-fill-in-your-tax-return-2022 +Check if a health condition affects your driving,/health-conditions-and-driving +Housing costs and Universal Credit,/housing-and-universal-credit +Tell DVLA your vehicle has been written off,/written-off-vehicle +Find a prisoner,/find-prisoner +Claim capital allowances,/capital-allowances +Child Benefit when your child turns 16,/child-benefit-16-19 +Calculate tax on employees' company cars,/calculate-tax-on-company-cars +Lasting and enduring powers of attorney forms,/government/collections/lasting-power-of-attorney-forms +HM Passport Office – About our services,/government/organisations/hm-passport-office/about/about-our-services +Change a company name (NM01),/government/publications/change-a-company-name-nm01 +Apply for probate by post if there is a will: Form PA1P,/government/publications/form-pa1p-apply-for-probate-the-deceased-had-a-will +Sure Start Maternity Grant claim form,/government/publications/sure-start-maternity-grant-claim-form +Certify an export health certificate,/guidance/certify-an-export-health-certificate +Claim a refund of Construction Industry Scheme deductions if you're a limited company or an agent,/guidance/claim-a-refund-of-construction-industry-scheme-deductions-if-youre-a-limited-company +DVLA services update,/guidance/dvla-services-update +Immigration Rules part 9: grounds for refusal,/guidance/immigration-rules/immigration-rules-part-9-grounds-for-refusal +VAT rates on different goods and services,/guidance/rates-of-vat-on-different-goods-and-services +Sign in to the Construction Industry Scheme (CIS) online service,/use-construction-industry-scheme-online +Form PA1S: Find a will or probate document,/government/publications/find-a-will-or-probate-document-form-pa1s +Apply for citizenship if your spouse is a British citizen,/apply-citizenship-spouse +Council housing,/council-housing +Driving licence codes,/driving-licence-codes +Double Taxation: Treaty Relief (Form DT-Individual),/government/publications/double-taxation-treaty-relief-form-dt-individual +Anti-money laundering registration,/anti-money-laundering-registration +Applying for more time to file your company’s accounts,/guidance/applying-for-more-time-to-file-your-companys-accounts +Yorkshire and the Humber,/guidance/find-a-skills-bootcamp/yorkshire-and-the-humber +Rates and thresholds for employers 2022 to 2023,/guidance/rates-and-thresholds-for-employers-2022-to-2023 +Find out how to use the Self Assessment for Agents online service,/guidance/self-assessment-for-agents-online-service +Car driving test,/guidance/understanding-your-driving-test-result/car-driving-test +International Pension Centre,/international-pension-centre +Renew your approved driving instructor (ADI) registration,/renew-approved-driving-instructor-adi-registration +Social Fund Cold Weather Payments,/government/collections/social-fund-cold-weather-payments +Environment Agency,/government/organisations/environment-agency +Easy read: Attendance Allowance,/government/publications/easy-read-attendance-allowance +Self Assessment: Foreign (SA106),/government/publications/self-assessment-foreign-sa106 +Claim a tax refund if you've stopped work and flexibly accessed all of your pension (P50Z),/guidance/claim-a-tax-refund-if-youve-stopped-work-and-flexibly-accessed-all-of-your-pension-p50z +New Style Jobseeker's Allowance,/guidance/new-style-jobseekers-allowance +Statutory Sick Pay: employee fitness to work,/guidance/statutory-sick-pay-employee-fitness-to-work +Log in and file your Stamp Duty Land Tax return,/sdlt-online +Seasonal Worker visa (Temporary Work),/seasonal-worker-visa +Simplified expenses if you're self-employed,/simpler-income-tax-simplified-expenses +Construction Skills Certification Scheme,https://www.cscs.uk.com/ +How to rent: the checklist for renting in England,/government/publications/how-to-rent/how-to-rent-the-checklist-for-renting-in-england +Dispose of household waste,/dispose-household-waste +Singapore travel advice,/foreign-travel-advice/singapore +Help to Save scheme,/government/organisations/hm-revenue-customs/contact/help-to-save-scheme +Exchange rate policy,/government/publications/exchange-rate-policy +Apply for a primary school place,/apply-for-primary-school-place +Report an excepted estate for Inheritance Tax,/government/publications/inheritance-tax-return-of-estate-information-iht205-2011 +Working together to safeguard children,/government/publications/working-together-to-safeguard-children--2 +"Health conditions, disability and Universal Credit",/health-conditions-disability-universal-credit +Register a birth,/register-birth +Theory test: cars,/theory-test +Visa to pass through the UK in transit,/transit-visa +Easy read: Tell Us Once,/government/publications/tell-us-once-easy-read-guide +"Charge, reclaim and record VAT",/charge-reclaim-record-vat +Valuation Office Agency,/government/organisations/valuation-office-agency +Apply for help with court and tribunal fees: Form EX160,/government/publications/apply-for-help-with-court-and-tribunal-fees +Claim compensation for Childcare service issues,/government/publications/childcare-service-compensation +Form AN: guidance,/government/publications/form-an-guidance +Benefit overpayments,/benefit-overpayments +How to pay a debt to HMRC with a Time to Pay arrangement,/guidance/find-out-how-to-pay-a-debt-to-hmrc-with-a-time-to-pay-arrangement +Appendix 7: Convictions and repute,/guidance/mot-testing-guide/appendix-7-convictions-and-repute +G. Vehicle presenters,/guidance/mot-testing-guide/g-vehicle-presenters +Make a disclosure using the Worldwide Disclosure Facility,/guidance/worldwide-disclosure-facility-make-a-disclosure +Find ways to save energy in your home,/improve-energy-efficiency +Report tax fraud or avoidance to HMRC,/report-tax-fraud +Apply for Tax-Free Childcare,/apply-for-tax-free-childcare +Complain about UK Visas and Immigration (UKVI),/complain-uk-visas-immigration +Expenses and benefits for employers,/employer-reporting-expenses-benefits +Statutory Sick Pay (SSP): employer guide,/employers-sick-pay +Check a list of genuine HMRC contacts,/government/collections/check-a-list-of-genuine-hmrc-contacts +Office of the Public Guardian,/government/organisations/office-of-the-public-guardian +Changes to National Insurance contributions from 6 January 2024,/government/publications/changes-to-national-insurance-contributions-from-6-january-2024 +Statutory Paternity Pay and Leave: becoming a birth parent (SC3),/government/publications/ordinary-statutory-paternity-pay-and-leave-becoming-a-birth-parent-sc3 +Apply for a certificate to confirm you pay UK National Insurance when working in 2 or more countries (CA8421),/guidance/check-which-countrys-social-security-legislation-applies-to-you-ca8421i +L. Accounts and fees,/guidance/mot-testing-guide/l-accounts-and-fees +Student finance forms,/student-finance-forms +"5. Wheels, tyres and suspension",/guidance/mot-inspection-manual-for-motorcycles/5-wheels-tyres-and-suspension +Tell Companies House about changes to your limited company,/file-changes-to-a-company-with-companies-house +Applying for a Discretionary Housing Payment,/government/publications/claiming-discretionary-housing-payments +Self Assessment: additional information (SA101),/government/publications/self-assessment-additional-information-sa101 +Standard industrial classification of economic activities (SIC),/government/publications/standard-industrial-classification-of-economic-activities-sic +Advisory fuel rates,/guidance/advisory-fuel-rates +How Council Tax works,/council-tax +"Visiting the UK as an EU, EEA or Swiss citizen",/guidance/visiting-the-uk-as-an-eu-eea-or-swiss-citizen +Junior Individual Savings Accounts (ISA),/junior-individual-savings-accounts +What you must do as a Construction Industry Scheme (CIS) contractor,/what-you-must-do-as-a-cis-contractor +Become a qualified heavy goods vehicle (HGV) or bus driver,/become-lorry-bus-driver +"Your benefits, tax and pension after the death of a partner",/death-spouse-benefits-tax-pension +"Medical conditions, disabilities and driving",/driving-medical-conditions +Expenses and benefits: business travel mileage for employees' own vehicles,/expenses-and-benefits-business-travel-mileage +Find a theory test centre,/find-theory-test-centre +Self Assessment: Register a partner for Self Assessment and Class 2 NICs (SA401),/government/publications/self-assessment-register-a-partner-for-self-assessment-and-class-2-nics-sa401 +Cancelling your VAT registration (VAT Notice 700/11),/government/publications/vat-notice-70011-cancelling-your-registration +Sponsor a worker: sponsor guidance part 2,/government/publications/workers-and-temporary-workers-guidance-for-sponsors-part-2-sponsor-a-worker +Rules for pedestrians (1 to 35),/guidance/the-highway-code/rules-for-pedestrians-1-to-35 +Parking fines and penalty charge notices,/parking-tickets +Respond to a court claim for money,/respond-to-court-claim-for-money +Transfer your visa from your passport or replace your visa,/transfer-visa +Visas when you separate or divorce,/visas-when-you-separate-or-divorce +Claim asylum in the UK,/claim-asylum +Become an appointee for someone claiming benefits,/become-appointee-for-someone-claiming-benefits +Countersigning passport applications and photos,/countersigning-passport-applications +China travel advice,/foreign-travel-advice/china +Veterans UK,/government/organisations/veterans-uk +Corporation Tax for Company Tax Return (CT600 (2023) Version 3),/government/publications/corporation-tax-company-tax-return-ct600-2015-version-3 +How to rent,/government/publications/how-to-rent +Immigration Health Surcharge (IHS): equality impact assessment 2023,/government/publications/immigration-health-surcharge-ihs-equality-impact-assessment-2023 +"Being made redundant: finding work, claiming benefits and managing debts",/guidance/redundancy-help-finding-work-and-claiming-benefits +Road markings,/guidance/the-highway-code/road-markings +Pay a penalty for filing your company accounts late,/pay-a-penalty-for-filing-company-accounts-late +Redundancy: your rights,/redundancy-your-rights +Report an untaxed vehicle,/report-untaxed-vehicle +Tax if you leave the UK to live abroad,/tax-right-retire-abroad-return-to-uk +Employees: if your visa sponsor loses their licence,/employee-lose-sponsor-licence +Sri Lanka travel advice,/foreign-travel-advice/sri-lanka +Visit visa: guide to supporting documents,/government/publications/visitor-visa-guide-to-supporting-documents +East of England,/guidance/find-a-skills-bootcamp/east-of-england +Living in Spain,/guidance/living-in-spain +Track or view your DBS certificate,/guidance/track-a-dbs-application +National Insurance credits,/national-insurance-credits +Reapply for your driving licence if you've been disqualified,/reapply-licence-revoked +Get a visa application fee waiver from inside the UK,/visa-fee-waiver-in-uk +NHS,https://www.nhs.uk/ +Getting a refund from SLC,/government/publications/getting-a-refund-from-slc +Indonesia travel advice,/foreign-travel-advice/indonesia +Get help from HMRC if you need extra support,/get-help-hmrc-extra-support +Getting an MOT,/getting-an-mot +"MOT manuals, checklists and special notices",/government/collections/mot-manuals-and-special-notices +Application for a State Pension forecast,/government/publications/application-for-a-state-pension-statement +Medical examination report for a lorry or bus driving licence (D4),/government/publications/d4-medical-examiner-report-for-a-lorry-or-bus-driving-licence +Christmas Bonus,/christmas-bonus +Self Assessment: register a partnership for Self Assessment (SA400),/government/publications/self-assessment-register-a-partnership-for-self-assessment-sa400 +Apply for a repayment of the higher rates of Stamp Duty Land Tax,/government/publications/stamp-duty-land-tax-apply-for-a-repayment-of-the-higher-rates-for-additional-properties +Terminate an appointment of a director (TM01),/government/publications/terminate-an-appointment-of-a-director-tm01 +Change your VAT registration details,/guidance/change-your-vat-registration-details +Equality Act 2010: guidance,/guidance/equality-act-2010-guidance +6. Structure and attachments,/guidance/mot-inspection-manual-for-motorcycles/6-structure-and-attachments +Veterans' UK Armed Forces pension and insurance declaration forms,/guidance/veterans-uk-armed-forces-pensions-forms +Making a will,/make-will +Vehicles exempt from vehicle tax,/vehicle-exempt-from-vehicle-tax +National Savings and Investments - NS&I,https://www.nsandi.com/ +Check someone's criminal record as an employer,/dbs-check-applicant-criminal-record +Court of Protection,/courts-tribunals/court-of-protection +Business rates valuation account: sign in or set up,/business-rates-valuation-account +Understanding your employees' tax codes,/employee-tax-codes +First Homes scheme: discounts for first-time buyers,/first-homes-scheme +Kenya travel advice,/foreign-travel-advice/kenya +Mexico travel advice,/foreign-travel-advice/mexico +HMRC services for tax agents,/government/collections/hmrc-online-services-for-agents +Medicines and Healthcare products Regulatory Agency,/government/organisations/medicines-and-healthcare-products-regulatory-agency +Extend your stay in the UK as a partner or dependent child: form FLR (M),/government/publications/apply-to-extend-stay-in-the-uk-as-a-partner-or-dependent-child-form-flrm +Appoint a director (AP01),/government/publications/appoint-a-director-ap01 +"Dart Charge, Mersey Gateway, clean air zones - Challenge a traffic enforcement order: Form TE9",/government/publications/form-te9-dart-charge-mersey-gateway-clear-air-zones-challenge-a-traffic-enforcement-order +Corporation Tax: trading and non-trading,/guidance/corporation-tax-trading-and-non-trading +"4. Lamps, reflectors and electrical equipment",/guidance/mot-inspection-manual-for-motorcycles/4-lamps-reflectors-and-electrical-equipment +Index,/guidance/the-highway-code/index +Motorways (253 to 274),/guidance/the-highway-code/motorways-253-to-273 +Universal Credit and earnings,/guidance/universal-credit-and-earnings +Innovator Founder visa,/innovator-founder-visa +Get a parking permit,/parking-permit +Pay a DVLA fine,/pay-dvla-fine +Tax credits overpayments,/tax-credits-overpayments +Help for Households,https://helpforhouseholds.campaign.gov.uk +Employee rights when on leave,/employee-rights-when-on-leave +Make or update a rural payments claim,/claim-rural-payments +Morocco travel advice,/foreign-travel-advice/morocco +Vietnam travel advice,/foreign-travel-advice/vietnam +Coronavirus (COVID-19): guidance,/government/collections/coronavirus-covid-19-list-of-guidance +CDS Declaration and Customs Clearance Request Instructions (UK Trade Tariff: volume 3 for CDS),/government/collections/uk-trade-tariff-volume-3-for-cds--2 +HMCTS Civil Business Centre performance information,/government/publications/hmcts-civil-business-centres-performance-information +Register an enduring power of attorney,/government/publications/register-an-enduring-power-of-attorney +East Midlands,/guidance/find-a-skills-bootcamp/east-midlands +Scrapping your vehicle and insurance write-offs,/scrapped-and-written-off-vehicles +Workplace pensions,/workplace-pensions +Respond to a divorce application,/respond-divorce-application +Dual citizenship,/dual-citizenship +Customs Declaration Service,/government/collections/customs-declaration-service +Landlord's guide to right to rent checks,/government/publications/landlords-guide-to-right-to-rent-checks +Migrants detected crossing the English Channel in small boats,/government/publications/migrants-detected-crossing-the-english-channel-in-small-boats +Check employment status for tax,/guidance/check-employment-status-for-tax +Appendix 4: Liability for loss or damage,/guidance/mot-testing-guide/appendix-4-liability-for-loss-or-damage +Healthy Start,/healthy-start +How to claim New Style Jobseeker's Allowance (JSA): step by step,/how-to-claim-new-style-jsa +Request information about a vehicle or its registered keeper from DVLA ,/request-information-from-dvla +Disability premiums,/disability-premiums +Tax on your UK income if you live abroad,/tax-uk-income-live-abroad +Driving lessons and learning to drive,/driving-lessons-learning-to-drive +"Bringing your pet dog, cat or ferret to Great Britain",/bring-pet-to-great-britain +Confirm someone’s identity online for a passport application,/confirm-identity-online-for-passport-application +Apply for free school meals,/apply-free-school-meals +Barbados travel advice,/foreign-travel-advice/barbados +Canada travel advice,/foreign-travel-advice/canada +Japan travel advice,/foreign-travel-advice/japan +Get a divorce: step by step,/get-a-divorce +HM Land Registry portal: login and guides,/government/collections/how-to-use-the-land-registry-portal +Joint Service Publication (JSP),/government/collections/joint-service-publication-jsp +Agent Dedicated Line: Self Assessment or PAYE for individuals,/government/organisations/hm-revenue-customs/contact/agent-dedicated-line-self-assessment-or-paye-for-individuals +Tax credits: dispute recovery of an overpayment (TC846),/government/publications/tax-credits-overpayment-tc846 +The National Minimum Wage in 2023,/government/publications/the-national-minimum-wage-in-2023 +Personal Allowances: adjusted net income,/guidance/adjusted-net-income +View your Annual Tax Summary,/guidance/annual-tax-summary +Introduction,/guidance/mot-inspection-manual-for-motorcycles/introduction +Road users requiring extra care (204 to 225) ,/guidance/the-highway-code/road-users-requiring-extra-care-204-to-225 +PAYE80010 - PAYE operation: review of claims and deductions: expenses / P87,/hmrc-internal-manuals/paye-manual/paye80010 +Who can get a Blue Badge?,/government/publications/blue-badge-can-i-get-one/can-i-get-a-blue-badge +Login or register for an account,/government/collections/defence-and-security-accelerator-submit-your-research-proposal +Ministers,/government/ministers +Technical support with HMRC online services,/government/organisations/hm-revenue-customs/contact/online-services-helpdesk +Claim a National Insurance refund,/claim-national-insurance-refund +Creating and assigning a CoS: SMS guide 8,/government/publications/creating-and-assigning-a-cos-sms-guide-8 +Form MN1: guidance,/government/publications/form-mn1-guidance +Self Assessment: claim to reduce payments on account (SA303),/government/publications/self-assessment-claim-to-reduce-payments-on-account-sa303 +Self Assessment: Self-employment (full) (SA103F),/government/publications/self-assessment-self-employment-full-sa103f +Request by an individual for information about a vehicle (form V888),/government/publications/v888-request-by-an-individual-for-information-about-a-vehicle +Filing your company's confirmation statement,/guidance/confirmation-statement-guidance +Countryside Stewardship: get funding to protect and improve the land you manage,/guidance/countryside-stewardship-get-funding-to-protect-and-improve-the-land-you-manage +Immigration Rules part 8: family members,/guidance/immigration-rules/immigration-rules-part-8-family-members +Start paying Council Tax,/guidance/start-paying-council-tax +Renting out your property,/renting-out-a-property +Exchange your paper driving licence for a photocard licence,/exchange-paper-driving-licence +County court judgments for debt,/county-court-judgments-ccj-for-debt +Certifying a document,/certifying-a-document +Israel travel advice,/foreign-travel-advice/israel +Saudi Arabia travel advice,/foreign-travel-advice/saudi-arabia +Court and tribunal forms,/government/collections/court-and-tribunal-forms +Local Housing Allowance (LHA) rates,/government/collections/local-housing-allowance-lha-rates +Maternity Allowance claim form,/government/publications/maternity-allowance-claim-form +Prevent duty guidance: England and Wales (2023),/government/publications/prevent-duty-guidance +Register a used vehicle for the first time (V55/5),/government/publications/register-a-used-vehicle-for-the-first-time-v555 +Top up your Dart Charge account,/government/publications/top-up-your-dart-charge-account +Make a statutory off road notification (SORN) (form V890),/government/publications/v890-statutory-off-road-notification-sorn +How to correct VAT errors and make adjustments or claims (VAT Notice 700/45),/guidance/how-to-correct-vat-errors-and-make-adjustments-or-claims-vat-notice-70045 +How to get a Debt Relief Order (DRO),/guidance/how-to-get-a-debt-relief-order-dro +1. Brakes,/guidance/mot-inspection-manual-for-motorcycles/1-brakes +The Highway Code,/guidance/the-highway-code +School attendance and absence,/school-attendance-absence +"Taking your pet dog, cat or ferret abroad",/taking-your-pet-abroad +Record Driver CPC training you provide,/record-driver-cpc-training-you-deliver +Criminal record checks when you apply for a role,/criminal-record-checks-apply-role +Stay in the UK ('settled status'): step by step,/eusettledstatus +Find free early education and childcare,/find-free-early-education +Retirement calculator,/government/case-studies/retirement-calculator +Calculating holiday entitlement for workers,/government/publications/calculating-holiday-entitlement-for-workers +DBS application form: guide for applicants,/government/publications/dbs-application-forms-guide-for-applicants +Apply for a divorce or to dissolve a civil partnership: Form D8,/government/publications/form-d8-application-for-a-divorce-dissolution-or-to-apply-for-a-judicial-separation-order +Using chatbots and webchat tools,/guidance/using-chatbots-and-webchat-tools +Identity documents needed for a driving licence application,/id-for-driving-licence +Moving or retiring abroad,/moving-or-retiring-abroad +Manage permissions for tax software,/permission-software-tax-information +Checking your tenant's right to rent,/check-tenant-right-to-rent-documents +When you need to make a SORN,/sorn-statutory-off-road-notification +Student finance calculator,/student-finance-calculator +Study in the UK on a Student visa ,/study-uk-student-visa +Appendix 5: Tester qualifications,/guidance/mot-testing-guide/appendix-5-tester-qualifications +Child car seats: the law,/child-car-seats-the-rules +Jamaica travel advice,/foreign-travel-advice/jamaica +South Africa travel advice,/foreign-travel-advice/south-africa +EU Settlement Scheme: applicant information,/government/collections/eu-settlement-scheme-applicant-information +Central Agent Authorisation Team,/government/organisations/hm-revenue-customs/contact/central-agent-authorisation-team +Apply for a non-molestation or occupation order: Form FL401,/government/publications/apply-for-a-non-molestation-or-occupation-order-fl401 +Proposed benefit and pension rates 2024 to 2025,/government/publications/proposed-benefit-and-pension-rates-2024-to-2025/proposed-benefit-and-pension-rates-2024-to-2025 +Right to work checks: an employer's guide,/government/publications/right-to-work-checks-employers-guide +SA100 postal output project,/government/publications/sa100-postal-output-project +Skilled Worker visa: shortage occupations,/government/publications/skilled-worker-visa-shortage-occupations/skilled-worker-visa-shortage-occupations +Local Housing Allowance,/guidance/local-housing-allowance +Benefit cap,/benefit-cap +Stamp Duty Land Tax online and paper returns,/guidance/stamp-duty-land-tax-online-and-paper-returns +Teacher misconduct: attend a professional conduct panel hearing or meeting,/guidance/teacher-misconduct-attend-a-professional-conduct-panel-hearing-or-meeting +Uploading evidence as part of your visa application,/guidance/uploading-evidence-as-part-of-your-visa-application +Reapply for a driving licence following a medical condition,/reapply-driving-licence-medical-condition +Registering land or property with HM Land Registry,/registering-land-or-property-with-land-registry +Making staff redundant,/staff-redundant +Support for Mortgage Interest (SMI),/support-for-mortgage-interest +Download HMRC's Basic PAYE Tools,/basic-paye-tools +Employing an apprentice,/employing-an-apprentice +Expenses and benefits: travel and subsistence,/expenses-and-benefits-travel +Citizenship application forms,/government/collections/citizenship-application-forms +"Pension provision: NI contributions, qualifying years and second tier pensions",/government/collections/national-insurance-contributions-statistics +Notarial and document services abroad,/government/collections/notarial-services +Application registration card (ARC) enquiry form,/government/publications/application-registration-card-arc-enquiry +How to complete form RP07 and send your application - important information,/government/publications/apply-to-change-a-companys-disputed-registered-office-address-rp07/checklist-guidance-for-rp07 +"Change your name by deed poll: Forms LOC020, LOC021 and LOC025",/government/publications/apply-to-change-your-name-forms-loc020-loc021-and-loc025 +Confirming ID: referees,/government/publications/confirming-identity-countersignatory-and-digital-referees +'Find my National Insurance Number (NINO)' service,/government/publications/find-my-national-insurance-number-nino-service +Funeral Expenses Payment claim form,/government/publications/funeral-payment-claim-form +Income Tax: personal savings allowance,/government/publications/income-tax-personal-savings-allowance +Tell HMRC if you're sending employees to work abroad (CA3821),/government/publications/national-insurance-sending-employees-to-work-abroad-ca3821 +Employers' right to work checklist,/government/publications/right-to-work-checklist/employers-right-to-work-checklist-accessible-version +"Work clubs, job search and CV support",/guidance/district-provision-tool/work-clubs-job-search-and-cv-support +"Medals: campaigns, descriptions and eligibility",/guidance/medals-campaigns-descriptions-and-eligibility +9. Supplementary tests for buses and coaches,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/9-supplementary-tests-for-buses-and-coaches +Income Tax: introduction,/income-tax +Reply to a jury summons ,/reply-jury-summons +Italy travel advice,/foreign-travel-advice/italy +Find your lost theory test pass certificate number,/find-theory-test-pass-number +Find a driving test centre,/find-driving-test-centre +Right to work checks: employer guidance,/government/collections/right-to-work-checks-employer-guidance +XL Bully dogs,/government/collections/xl-bully-dogs +Civil Service – Working for the Civil Service,/government/organisations/civil-service/about/recruitment +Late filing penalties from Companies House,/government/publications/late-filing-penalties +Rates and allowances: National Insurance contributions,/government/publications/rates-and-allowances-national-insurance-contributions +Apply for a Ukraine Family Scheme visa,/guidance/apply-for-a-ukraine-family-scheme-visa +North-east,/guidance/find-a-skills-bootcamp/north-east +Reclaim tax relief for pension scheme members with relief at source,/guidance/pension-administrators-reclaim-tax-relief-using-relief-at-source +Sign in to your childcare provider account for Tax-Free Childcare,/guidance/sign-in-to-your-childcare-provider-account-for-tax-free-childcare +Record delegated driving test details,/record-delegated-driving-test-details +Rest breaks at work,/rest-breaks-work +Cambodia travel advice,/foreign-travel-advice/cambodia +Replace or correct a UK citizenship certificate,/get-replacement-citizenship-certificate +VAT penalties and interest,/government/collections/vat-penalties-and-interest +How Double Taxation Treaties affect non-UK residents with UK income,/government/publications/double-taxation-treaties-territory-residents-with-uk-income +Request a search for a divorce decree absolute: Form D440,/government/publications/form-d440-request-for-search-for-divorce-decree-absolute +"Dart Charge, Mersey Gateway, clean air zones - Apply for more time to challenge a traffic enforcement order: Form TE7",/government/publications/form-te7-dart-charge-mersey-gateway-clear-air-zones-apply-for-more-time-to-challenge-a-traffic-enforcement-order +UK property notes (2022),/government/publications/self-assessment-uk-property-sa105/uk-property-notes-2022 +Rural land and entitlements RLE1 form and guidance,/government/publications/tell-the-rural-payments-agency-about-land-changes-and-entitlement-transfers +Find a school census code,/guidance/complete-the-school-census/find-a-school-census-code +How to apply for a repayment of import duty and VAT if you've overpaid (C285),/guidance/how-to-apply-for-a-repayment-of-import-duty-and-vat-if-youve-overpaid-c285 +Recruit teachers from overseas,/guidance/recruit-teachers-from-overseas +Register or update your money laundering supervision with HMRC,/guidance/register-or-renew-your-money-laundering-supervision-with-hmrc +Salary sacrifice for employers,/guidance/salary-sacrifice-and-the-effects-on-paye +UK visa support for Ukrainian nationals,/guidance/support-for-family-members-of-british-nationals-in-ukraine-and-ukrainian-nationals-in-ukraine-and-the-uk +Jury service,/jury-service +Marriage Visitor visa,/marriage-visa +Pay a parking fine,/pay-parking-fine +Register a death,/register-a-death +Renew or change a lorry or bus licence,/renew-lorry-bus-coach-licence diff --git a/config/quality_monitoring_datasets/invariants/top_200_query_result_pairs.csv b/config/quality_monitoring_datasets/invariants/top_200_query_result_pairs.csv new file mode 100644 index 0000000..504a1a1 --- /dev/null +++ b/config/quality_monitoring_datasets/invariants/top_200_query_result_pairs.csv @@ -0,0 +1,199 @@ +query,link +self assessment,/log-in-file-self-assessment-tax-return +childcare account,/sign-in-childcare-account +personal tax account,/personal-tax-account +universal credit,/sign-in-universal-credit +childcare,/sign-in-childcare-account +share code,/view-prove-immigration-status +self assessment,/self-assessment-tax-returns +pension,/check-state-pension +mot,/check-mot-status +contact hmrc,/contact-hmrc +sign in,/sign-in +council tax,/council-tax-bands +hmrc,/log-in-register-hmrc-online-services +apprenticeship,/apply-apprenticeship +gateway,/log-in-register-hmrc-online-services +council tax band,/council-tax-bands +right to work,/prove-right-to-work +passport,/renew-adult-passport +car tax,/vehicle-tax +sign in,/log-in-register-hmrc-online-services +vehicle tax,/vehicle-tax +share code,/prove-right-to-work +student finance,/student-finance-register-login +tax return,/self-assessment-tax-returns +companies house,/government/organisations/companies-house +driving test,/book-driving-test +gmr,/guidance/get-a-goods-movement-reference +log in,/log-in-register-hmrc-online-services +tax,/log-in-register-hmrc-online-services +theory test,/book-theory-test +state pension,/check-state-pension +graduate visa,/graduate-visa +help to save,/sign-in-help-to-save +jobs,/find-a-job +self assesment,/log-in-file-self-assessment-tax-return +update,/update-uk-visas-immigration-account-details +car tax,/check-vehicle-tax +login,/log-in-register-hmrc-online-services +passport,/apply-renew-passport +dbs,/government/organisations/disclosure-and-barring-service +sorn,/make-a-sorn +login,/sign-in +utr,/find-utr-number +government gateway,/log-in-register-hmrc-online-services +child trust fund,/child-trust-funds +paye,/log-in-register-hmrc-online-services +tax free childcare,/sign-in-childcare-account +apprenticeships,/apply-apprenticeship +visa,/check-uk-visa +road tax,/vehicle-tax +passport,/find-regional-passport-office +national insurance,/check-national-insurance-record +pip,/pip +universal credit,/universal-credit +provisional,/apply-first-provisional-driving-licence +mot,/check-mot-history +personal tax,/log-in-register-hmrc-online-services +personal tax account,/log-in-register-hmrc-online-services +renew driving licence,/renew-driving-licence +brp,/biometric-residence-permits +dvla,/government/organisations/driver-and-vehicle-licensing-agency +euss,/settled-status-eu-citizens-families +blue badge,/apply-blue-badge +child benefit,/child-benefit +tax,/vehicle-tax +contact,/contact-hmrc +universal credit,/government/publications/uc50-form-universal-credit-capability-for-work-questionnaire +provisional license,/apply-first-provisional-driving-licence +driving test,/change-driving-test +simple assessment,/simple-assessment +income tax,/check-income-tax-current-year +tax return,/log-in-file-self-assessment-tax-return +uc50,/government/publications/uc50-form-universal-credit-capability-for-work-questionnaire +cost of living,/guidance/cost-of-living-payment +tax,/guidance/sign-in-to-your-hmrc-business-tax-account +vat,/log-in-register-hmrc-online-services +cold weather payment,/cold-weather-payment +visa,/apply-to-come-to-the-uk +sa100,/self-assessment-tax-return-forms +self assessment,/log-in-register-hmrc-online-services +land registry,/government/organisations/land-registry +power of attorney,/power-of-attorney +road tax,/check-vehicle-tax +find a job,/find-a-job +pay your corporation tax bill,/pay-corporation-tax +pension forecast,/check-state-pension +pensions,/check-state-pension +self assessment tax returns,/self-assessment-tax-returns +self assessment,/pay-self-assessment-tax-bill +p60,/paye-forms-p45-p60-p11d +tax,/check-vehicle-tax +cis,/what-is-the-construction-industry-scheme +pta,/personal-tax-account +tax,/log-in-file-self-assessment-tax-return +company tax returns,/file-your-company-accounts-and-tax-return +dbs,/request-copy-criminal-record +visa,/sign-in-visa +share code,/view-right-to-work +tax vehicle,/vehicle-tax +passport,/get-a-child-passport +mot history,/check-mot-history +skilled worker visa,/skilled-worker-visa +personal tax,/personal-tax-account +renew passport,/renew-adult-passport +self assesment,/self-assessment-tax-returns +utr number,/find-utr-number +council tax bands,/council-tax-bands +right to work,/view-right-to-work +mot check,/check-mot-history +passport renewal,/renew-adult-passport +national insurance number,/lost-national-insurance-number +cost of living payment,/guidance/cost-of-living-payment +theory,/book-theory-test +vehicle tax,/check-vehicle-tax +tax car,/vehicle-tax +change of address,/tell-hmrc-change-of-details +status,/view-prove-immigration-status +epc,/find-energy-certificate +hmrc sign in,/log-in-register-hmrc-online-services +lpa,/power-of-attorney +tax refund,/claim-tax-refund +driving licence,/view-driving-licence +driving licence,/renew-driving-licence +skilled worker,/skilled-worker-visa +rp07,/government/publications/apply-to-change-a-companys-disputed-registered-office-address-rp07 +company house,/government/organisations/companies-house +child care account,/sign-in-childcare-account +v62,/government/publications/application-for-a-vehicle-registration-certificate +pension,/check-national-insurance-record +change address,/tell-hmrc-change-of-details +job,/find-a-job +tax,/government/organisations/hm-revenue-customs/contact/income-tax-enquiries-for-individuals-pensioners-and-employees +sa302,/sa302-tax-calculation +state pension,/get-state-pension +self assessment tax return,/log-in-file-self-assessment-tax-return +council tax,/pay-council-tax +eta,/guidance/apply-for-an-electronic-travel-authorisation-eta +suspension,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/5-axles-wheels-tyres-and-suspension +veterans id card,/government/news/new-veterans-id-cards-rolled-out-to-service-leavers +birth certificate,/order-copy-birth-death-marriage-certificate +prove,/prove-right-to-work +travel,/foreign-travel-advice +tax account,/log-in-register-hmrc-online-services +tax rebate,/claim-tax-refund +tax code,/personal-tax-account +pay corporation tax,/pay-corporation-tax +spouse visa,/uk-family-visa +child care,/sign-in-childcare-account +provisional licence,/apply-first-provisional-driving-licence +bno visa,/british-national-overseas-bno-visa +corporation tax,/pay-corporation-tax +sharecode,/view-prove-immigration-status +corporation tax,/log-in-register-hmrc-online-services +paying hmrc,/pay-corporation-tax +student visa,/student-visa +attendance allowance,/attendance-allowance +pay self assessment,/pay-self-assessment-tax-bill +universal credit,/government/collections/universal-credit-statistics +renew driving license,/renew-driving-licence +uc,/sign-in-universal-credit +carers allowance,/carers-allowance +hmrc,/contact-hmrc +tyres,/guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/5-axles-wheels-tyres-and-suspension +dbs,/dbs-update-service +ds01,/government/publications/strike-off-a-company-from-the-register-ds01 +probate,/applying-for-probate +dart charge,/pay-dartford-crossing-charge +check your business rate valuation,/guidance/check-and-challenge-your-business-rates-valuation-step-by-step +sa1,/guidance/register-for-self-assessment-if-you-are-not-self-employed +tax,/check-income-tax-current-year +change driving test,/change-driving-test +immigration status,/view-prove-immigration-status +register for self assessment,/register-for-self-assessment +register to vote,/register-to-vote +driving licence,/apply-first-provisional-driving-licence +driving license,/apply-first-provisional-driving-licence +check mot,/check-mot-history +covid tests,/order-coronavirus-rapid-lateral-flow-tests +self employed,/set-up-self-employed +sign in,/sign-in-visa +paying hmrc,/pay-tax-debit-credit-card +eu,/settled-status-eu-citizens-families +ni38,/government/publications/social-security-abroad-ni38 +view,/view-prove-immigration-status +psw,/graduate-visa +minimum wage,/government/publications/minimum-wage-rates-for-2024 +probate,/search-will-probate +id check,/guidance/using-the-govuk-id-check-app +view and prove,/view-prove-immigration-status +tax my car,/vehicle-tax +dbs,/guidance/dbs-online-account-guidance +national insurance number,/government/publications/national-insurance-get-your-national-insurance-number-in-writing-ca5403 +book driving test,/book-driving-test +esta,https://esta.cbp.dhs.gov/ +rp02a,/government/publications/apply-for-rectification-by-the-registrar-of-companies-rp02a +family visa,/uk-family-visa +hmrc login,/log-in-register-hmrc-online-services +band check,/council-tax-bands diff --git a/config/result_invariants.yml b/config/result_invariants.yml deleted file mode 100644 index f38ae6d..0000000 --- a/config/result_invariants.yml +++ /dev/null @@ -1,255 +0,0 @@ -# Defines expected top results for business-critical queries as a mapping from query keywords to -# either a single link or an array of links (relative to GOV.UK for internal content, absolute for -# external content). These are run regularly through `QualityMonitoring::CheckInvariants` to ensure -# we catch high-impact regressions as early as possible. -production: &production - "64-8": /government/publications/tax-agents-and-advisers-authorising-your-agent-64-8 - "apprenticeship": /apply-apprenticeship - "apprenticeships": /apply-apprenticeship - "attendance allowance": /attendance-allowance - "band check": /council-tax-bands - "birth certificate": /order-copy-birth-death-marriage-certificate - "blue badge": /apply-blue-badge - "bno visa": /british-national-overseas-bno-visa - "book driving test": /book-driving-test - "brp": /biometric-residence-permits - "car tax": - - /vehicle-tax - - /check-vehicle-tax - "carers allowance": /carers-allowance - "change address": /tell-hmrc-change-of-details - "change driving test": /change-driving-test - "change of address": /tell-hmrc-change-of-details - "check mot": /check-mot-history - "check your business rate valuation": /guidance/check-and-challenge-your-business-rates-valuation-step-by-step - "child benefit": /child-benefit - "child care account": /sign-in-childcare-account - "child care": /sign-in-childcare-account - "child trust fund": /child-trust-funds - "childcare account": /sign-in-childcare-account - "childcare": /sign-in-childcare-account - "cis": /what-is-the-construction-industry-scheme - "cold weather payment": /cold-weather-payment - "companies house": /government/organisations/companies-house - "company house": /government/organisations/companies-house - "company tax returns": /file-your-company-accounts-and-tax-return - "contact hmrc": - - /contact-hmrc - - /government/organisations/hm-revenue-customs/contact/self-assessment - "contact": /contact-hmrc - "corporation tax": - - /pay-corporation-tax - - /log-in-register-hmrc-online-services - "cost of living payment": /guidance/cost-of-living-payment - "cost of living": /guidance/cost-of-living-payment - "council tax band": /council-tax-bands - "council tax bands": /council-tax-bands - "council tax": - - /council-tax-bands - - /pay-council-tax - "covid tests": /order-coronavirus-rapid-lateral-flow-tests - "dart charge": /pay-dartford-crossing-charge - "dbs": - - /government/organisations/disclosure-and-barring-service - - /request-copy-criminal-record - - /dbs-update-service - - /guidance/dbs-online-account-guidance - "driving licence": - - /view-driving-licence - - /renew-driving-licence - - /apply-first-provisional-driving-licence - "driving license": /apply-first-provisional-driving-licence - "driving test": - - /book-driving-test - - /change-driving-test - "ds01": /government/publications/strike-off-a-company-from-the-register-ds01 - "dvla": /government/organisations/driver-and-vehicle-licensing-agency - "epc": /find-energy-certificate - "esta": https://esta.cbp.dhs.gov/ - "eta": /guidance/apply-for-an-electronic-travel-authorisation-eta - "eu": /settled-status-eu-citizens-families - "euss": /settled-status-eu-citizens-families - "family visa": /uk-family-visa - "find a job": /find-a-job - "gateway": /log-in-register-hmrc-online-services - "gmr": /guidance/get-a-goods-movement-reference - "government gateway": /log-in-register-hmrc-online-services - "graduate visa": /graduate-visa - "help to save": /sign-in-help-to-save - "hmrc login": /log-in-register-hmrc-online-services - "hmrc services": /log-in-register-hmrc-online-services - "hmrc sign in": /log-in-register-hmrc-online-services - "hmrc": - - /log-in-register-hmrc-online-services - - /contact-hmrc - "id check": /guidance/using-the-govuk-id-check-app - "immigration status": /view-prove-immigration-status - "income tax": /check-income-tax-current-year - "job": /find-a-job - "jobs": /find-a-job - "land registry": /government/organisations/land-registry - "log in": /log-in-register-hmrc-online-services - "login": - - /log-in-register-hmrc-online-services - - /sign-in - "lpa": /power-of-attorney - "minimum wage": /government/publications/minimum-wage-rates-for-2024 - "mot check": /check-mot-history - "mot history": /check-mot-history - "mot": - - /check-mot-status - - /check-mot-history - "national insurance number": - - /lost-national-insurance-number - - /government/publications/national-insurance-get-your-national-insurance-number-in-writing-ca5403 - "national insurance": /check-national-insurance-record - "ni38": /government/publications/social-security-abroad-ni38 - "p60": /paye-forms-p45-p60-p11d - "passport renewal": /renew-adult-passport - "passport": - - /renew-adult-passport - - /apply-renew-passport - - /find-regional-passport-office - - /get-a-child-passport - "pay corporation tax": /pay-corporation-tax - "pay self assessment": /pay-self-assessment-tax-bill - "pay tax": /pay-self-assessment-tax-bill - "pay your corporation tax bill": /pay-corporation-tax - "paye": /log-in-register-hmrc-online-services - "paying hmrc": - - /pay-corporation-tax - - /pay-tax-debit-credit-card - "pension forecast": /check-state-pension - "pension": - - /check-state-pension - - /check-national-insurance-record - "pensions": /check-state-pension - "personal tax account": - - /personal-tax-account - - /log-in-register-hmrc-online-services - "personal tax": - - /log-in-register-hmrc-online-services - - /personal-tax-account - "pip": /pip - "power of attorney": /power-of-attorney - "probate": - - /applying-for-probate - - /search-will-probate - "prove": /prove-right-to-work - "provisional licence": /apply-first-provisional-driving-licence - "provisional license": /apply-first-provisional-driving-licence - "provisional": /apply-first-provisional-driving-licence - "psw": /graduate-visa - "pta": - - /register-for-self-assessment - - /guidance/register-for-self-assessment-if-you-are-not-self-employed - "register for self assessment": /register-for-self-assessment - "register to vote": /register-to-vote - "renew driving licence": /renew-driving-licence - "renew driving license": /renew-driving-licence - "renew passport": /renew-adult-passport - "right to work": - - /prove-right-to-work - - /view-right-to-work - "road tax": - - /vehicle-tax - - /check-vehicle-tax - "rp02a": /government/publications/apply-for-rectification-by-the-registrar-of-companies-rp02a - "rp07": /government/publications/apply-to-change-a-companys-disputed-registered-office-address-rp07 - "sa1": /guidance/register-for-self-assessment-if-you-are-not-self-employed - "sa100": - - /self-assessment-tax-return-forms - - /government/publications/self-assessment-tax-return-sa100 - "sa302": /sa302-tax-calculation - "self": /log-in-file-self-assessment-tax-return - "self assesment": - - /log-in-file-self-assessment-tax-return - - /self-assessment-tax-returns - "self assessment": - - /log-in-file-self-assessment-tax-return - - /self-assessment-tax-returns - - /log-in-register-hmrc-online-services - - /pay-self-assessment-tax-bill - "self assessment login": /log-in-file-self-assessment-tax-return - "self assessment tax return": /log-in-file-self-assessment-tax-return - "self assessment tax returns": /self-assessment-tax-returns - "self employed": /set-up-self-employed - "share code": - - /view-prove-immigration-status - - /prove-right-to-work - - /prove-right-to-work/get-a-share-code - - /view-right-to-work - "sharecode": /view-prove-immigration-status - "sign in": - - /sign-in - - /log-in-register-hmrc-online-services - - /sign-in-visa - "simple assessment": /simple-assessment - "skilled worker visa": /skilled-worker-visa - "skilled worker": /skilled-worker-visa - "sorn": /make-a-sorn - "spouse visa": /uk-family-visa - "state pension": - - /check-state-pension - - /get-state-pension - "status": /view-prove-immigration-status - "student finance": /student-finance-register-login - "student visa": /student-visa - "suspension": /guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/5-axles-wheels-tyres-and-suspension - "tax account": /log-in-register-hmrc-online-services - "tax car": /vehicle-tax - "tax code": /personal-tax-account - "tax free childcare": /sign-in-childcare-account - "tax my car": /vehicle-tax - "tax rebate": /claim-tax-refund - "tax refund": /claim-tax-refund - "tax return": - - /self-assessment-tax-returns - - /log-in-file-self-assessment-tax-return - "tax vehicle": /vehicle-tax - "tax": - - /log-in-register-hmrc-online-services - - /vehicle-tax - - /guidance/sign-in-to-your-hmrc-business-tax-account - - /check-vehicle-tax - - /log-in-file-self-assessment-tax-return - - /check-income-tax-current-year - - /self-assessment-tax-returns - "tell hmrc about underpaid tax from previous years": /guidance/tell-hmrc-about-underpaid-tax-from-previous-years - "theory test": /book-theory-test - "theory": /book-theory-test - "travel": /foreign-travel-advice - "tyres": /guidance/mot-inspection-manual-for-private-passenger-and-light-commercial-vehicles/5-axles-wheels-tyres-and-suspension - "uc": /sign-in-universal-credit - "uc50": /government/publications/uc50-form-universal-credit-capability-for-work-questionnaire - "universal credit": - - /sign-in-universal-credit - - /universal-credit - - /government/publications/uc50-form-universal-credit-capability-for-work-questionnaire - - /government/collections/universal-credit-statistics - "update": /update-uk-visas-immigration-account-details - "utr number": /find-utr-number - "utr": /find-utr-number - "v62": /government/publications/application-for-a-vehicle-registration-certificate - "vat": /log-in-register-hmrc-online-services - "vehicle tax": - - /vehicle-tax - - /check-vehicle-tax - "veterans id card": /government/news/new-veterans-id-cards-rolled-out-to-service-leavers - "view and prove": /view-prove-immigration-status - "view": /view-prove-immigration-status - "visa": - - /check-uk-visa - - /apply-to-come-to-the-uk - - /sign-in-visa -development: - <<: *production -test: - "query one": /expected/result/1 - "query two": - - /expected/result/2 - - /expected/result/2.5 - "query three": - - /expected/result/3 - - /expected/result/3.5 - "query four": /expected/result/4 diff --git a/lib/tasks/quality_monitoring.rake b/lib/tasks/quality_monitoring.rake index d3b64da..c8e5ea7 100644 --- a/lib/tasks/quality_monitoring.rake +++ b/lib/tasks/quality_monitoring.rake @@ -1,24 +1,17 @@ namespace :quality_monitoring do - desc "Check result invariants and log and report violations to Sentry" - task check_result_invariants: :environment do - violations = QualityMonitoring::CheckResultInvariants.new.violations - violation_count_text = "#{violations.count} #{'violation'.pluralize(violations.count)}" + desc "Runs the invariant dataset and validates 100% recall" + task assert_invariants: :environment do + dir = Rails.root.join("config/quality_monitoring_datasets/invariants") + invariant_dataset_files = Dir.glob("#{dir}/*.csv") - if violations.any? - violations.each do |violation| - Rails.logger.error(<<~MSG) - Result invariant violated for '#{violation.query}' - Expected to find link: #{violation.expected_link} - MSG - end - - GovukError.notify( - "⚠️ Result invariants check: #{violation_count_text}", - extra: { - violations: violations.map { "'#{_1.query}': missing #{_1.expected_link}" }.join("\n"), - }, - ) + invariant_dataset_files.each do |file| + QualityMonitoring::Runner.new( + file, + :invariants, + cutoff: 10, + report_query_below_score: 1.0, + judge_by: :recall, + ).run end - Rails.logger.info("Result invariant check complete, #{violation_count_text} found") end end diff --git a/spec/fixtures/files/quality_monitoring_datasets/example.csv b/spec/fixtures/files/quality_monitoring_datasets/example.csv new file mode 100644 index 0000000..7f187c0 --- /dev/null +++ b/spec/fixtures/files/quality_monitoring_datasets/example.csv @@ -0,0 +1,4 @@ +query,link +i want to fish,/i-want-to-fish +i want to fish,/i-really-want-to-fish +external,https://www.example.org diff --git a/spec/services/quality_monitoring/check_result_invariants_spec.rb b/spec/services/quality_monitoring/check_result_invariants_spec.rb deleted file mode 100644 index d2ee8cc..0000000 --- a/spec/services/quality_monitoring/check_result_invariants_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -RSpec.describe QualityMonitoring::CheckResultInvariants do - subject(:check_result_invariants) { described_class.new(search_service_klass:) } - - let(:search_service_klass) { double("DiscoveryEngine::Query::Search", new: client) } - let(:client) { double("SearchService::Client") } - - describe "#violations" do - subject(:violations) { check_result_invariants.violations } - - context "when all invariants are satisfied" do - before do - allow(client).to receive(:result_set).and_return( - ResultSet.new(results: [ - Result.new(link: "/expected/result/1"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/2"), - Result.new(link: "/expected/result/2.5"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/3.5"), - Result.new(link: "/expected/result/3"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/4"), - Result.new(link: "/expected/result/abcde"), - ]), - ) - end - - it { is_expected.to be_empty } - end - - context "when invariants are violated" do - let(:expected_violations) do - [ - QualityMonitoring::ResultInvariantViolation.new( - query: "query two", - expected_link: "/expected/result/2.5", - ), - QualityMonitoring::ResultInvariantViolation.new( - query: "query four", - expected_link: "/expected/result/4", - ), - ] - end - - before do - allow(client).to receive(:result_set).and_return( - ResultSet.new(results: [ - Result.new(link: "/expected/result/1"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/2"), - Result.new(link: "/expected/result/42"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/3.5"), - Result.new(link: "/expected/result/3"), - ]), - ResultSet.new(results: [ - Result.new(link: "/expected/result/123"), - Result.new(link: "/expected/result/321"), - ]), - ) - end - - it { is_expected.to eq(expected_violations) } - end - end -end diff --git a/spec/services/quality_monitoring/dataset_loader_spec.rb b/spec/services/quality_monitoring/dataset_loader_spec.rb new file mode 100644 index 0000000..74d3128 --- /dev/null +++ b/spec/services/quality_monitoring/dataset_loader_spec.rb @@ -0,0 +1,14 @@ +RSpec.describe QualityMonitoring::DatasetLoader do + subject(:csv_loader) { described_class.new(path) } + + let(:path) { file_fixture("quality_monitoring_datasets/example.csv") } + + describe "#data" do + it "returns a hash of queries and links based on the CSV data grouped by query" do + expect(csv_loader.data).to eq( + "i want to fish" => ["/i-want-to-fish", "/i-really-want-to-fish"], + "external" => ["https://www.example.org"], + ) + end + end +end diff --git a/spec/services/quality_monitoring/judge_spec.rb b/spec/services/quality_monitoring/judge_spec.rb new file mode 100644 index 0000000..c456396 --- /dev/null +++ b/spec/services/quality_monitoring/judge_spec.rb @@ -0,0 +1,95 @@ +RSpec.describe QualityMonitoring::Judge do + subject(:judge) { described_class.new(result_links, expected_links) } + + let(:expected_links) { %w[A B C D E F G H I J] } + + describe ".for_query" do + subject(:judge) { described_class.for_query(query, expected_links, cutoff:) } + + let(:query) { "query" } + let(:cutoff) { 10 } + + let(:search) { instance_double(DiscoveryEngine::Query::Search, result_set:) } + let(:result_set) { ResultSet.new(results:) } + let(:results) do + [ + Result.new(link: "X"), + Result.new(link: "Y"), + Result.new(link: "Z"), + ] + end + + before do + allow(DiscoveryEngine::Query::Search).to receive(:new) + .with({ q: query }).and_return(search) + end + + it "returns a correctly set up instance of Judge" do + expect(judge.result_links).to eq(%w[X Y Z]) + expect(judge.expected_links).to eq(expected_links) + end + end + + describe "#initialize" do + context "when expected links is empty" do + let(:result_links) { [] } + let(:expected_links) { [] } + + it "raises an error" do + expect { judge }.to raise_error(ArgumentError, "at least one expected link is required") + end + end + end + + describe "#precision" do + context "when there is a partial match" do + let(:result_links) { %w[U O I E A] } + + it "calculates precision correctly" do + expect(judge.precision).to eq(0.6) + end + end + + context "when there is a full match" do + let(:result_links) { expected_links } + + it "returns 1" do + expect(judge.precision).to eq(1) + end + end + + context "when there are no result links" do + let(:result_links) { [] } + + it "returns 0" do + expect(judge.precision).to eq(0) + end + end + end + + describe "#recall" do + context "when there is a partial match" do + let(:result_links) { %w[U O I E A] } + + it "calculates recall correctly" do + expect(judge.recall).to eq(0.3) + end + end + + context "when there is a full match" do + let(:result_links) { expected_links } + + it "returns 1" do + expect(judge.recall).to eq(1) + end + end + + context "when there are no result links" do + let(:result_links) { [] } + + it "returns 0" do + expect(judge.recall).to eq(0) + end + end + end +end