Skip to main content

Semantic clustering of amendments

Brazil - Chamber of Deputies

Use case ID: 021

Author: Chamber of Deputies of Brazil

Date: 14 June 2024

Objective:

Read amendments proposed by MPs for a specific bill, interpret them, and group them according to semantic similarity.
Actors:

  • MPs
  • Lawmaking experts advising MPs
  • AI system designed for semantic clustering, optionally integrated with named-entity recognition and a document retrieval system

Prerequisites:

  • Automated text indexing or vectorization process, encompassing proper tokenization and semantic representation
  • Database to store user feedback needed to improve the AI system
  • Integration with digital services commonly used by MPs and lawmaking experts

Scenario:

  1. MPs present their amendments to a bill.
  2. The AI system semantically analyses the presented amendments and generates clusters of amendments that share similarities in terms of meaning or impact on the bill.
  3. An MP or a lawmaking expert selects the bill to view the clusters generated by the AI system.
  4. The AI system offers graphical and list-based visualizations of the amendment clusters. Examples of graphical resources include word clouds and 3D spatial distributions of the amendments.
  5. An MP or lawmaking expert provides feedback on the AI-generated clusters.

Alternate flows:

  • When necessary, the user can adjust the number of clusters the AI system generates.
  • Sometimes, lawmaking experts prefer to define specific named groups and request that the AI system assign the amendments to these groups. In this scenario, the AI system should utilize a document retrieval system that assesses the similarity of the amendments with these predefined groups.

Expected results:

  • The process of analysing and categorizing similar amendments is more efficient.
  • AI system results are continuously enhanced through the accumulation of feedback over time.

Potential challenges:

  • Ensuring continuous improvement of the AI system over time
  • Addressing performance and memory issues during sentence vectorization (text embeddings) and cluster reduction
  • Encouraging users to provide feedback

Data requirements:

  • New amendments to a given bill require the recreation of the corresponding clusters
  • Periodic verification of AI system performance

Integrations with other systems:

  • Digital services commonly used by MPs and lawmaking experts
  • Analytics and reporting tools

Success metrics:

  • Amount of feedback provided by users of the AI system
  • Visual inspection, a qualitative technique, allows for the visualization of clustering results using 2D or 3D graphics

 

The Use cases for AI in parliaments collection is published by the IPU’s Centre for Innovation in Parliament as part of the Parliamentary Data Science Hub’s project to create guidelines for AI governance in parliaments.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International licence. It may be freely shared and reused with acknowledgement of the author and the IPU. 

A use case describes how a system should work. It is used to plan, develop and measure implementation. A use case is not the same as a case study, which is a descriptive text of an actual project’s implementation. Please note that this use case is provided “as is” and neither the IPU nor the author accepts any responsibility for its use.

For more information about the IPU’s work on artificial intelligence, please visit www.ipu.org/AI or contact [email protected]