Skip to main content

Natural-language querying of legislative processes and contents

Italy - Senate

Use case ID: 029

Author: Senate of Italy

Date: 12 June 2024 

Objective: 

Enable users to query the progress and content of laws, bills and other parliamentary acts using natural language, improving accessibility and user experience by allowing intuitive, human-like interactions with the legislative database. 

Actors: 

  • Senate website users (citizens, researchers and journalists)
  • Senate IT and web development team 

Prerequisites: 

  • Existing database of legislative processes and documents
  • Trained large language model (LLM)-based artificial intelligence (AI) model for understanding and processing natural-language queries
  • Internet accessibility for users 

Scenario: 

  1. The user accesses the Senate website.
  2. The user enters a query in natural language (e.g. “What is the current status of the education reform bill?”) in the search bar.
  3. The LLM-based AI model processes the natural-language query to understand the intent and key terms.
  4. The AI system retrieves relevant information from the legislative database, including the current status, key milestones and content of the specified bill or act.
  5. The results are displayed to the user in a user-friendly format, with options to view detailed progress or full texts.
  6. The user can refine their search or ask follow-up questions in natural language to obtain more specific information.
  7. The system logs the query and results for continuous improvement of the LLM model. 

Alternate flows: 

  • If the LLM-based AI model cannot understand the query, it prompts the user to rephrase or provides suggestions.
  • If the search yields too many or too few results, the system offers advanced search options or filters to refine the search. 

Expected results: 

  • User satisfaction is improved owing to quick and accurate responses to queries.
  • It takes less time and effort for users to find specific information on legislative processes and documents.
  • Accessibility for users unfamiliar with legal terminology or the legislative process is improved. 

Potential challenges: 

  • Ensuring the LLM-based AI model can accurately understand diverse phrasing and terminologies related to legislative processes
  • Handling ambiguous queries or those with multiple possible interpretations
  • Continuously updating the LLM-based AI model to adapt to new terms and changes in the legislative process 

Data requirements: 

  • Database of current and past legislative processes, bills and acts
  • Real-time user query data for ongoing learning and adaptation 

Integrations with other systems: 

  • Existing legislative database and search infrastructure of the Senate website
  • LLM-based AI processing systems and models
  • User interface components for displaying query results 

Success metrics: 

  • Query response time
  • User satisfaction ratings and feedback
  • Accuracy and relevance of query results
  • Reduction in user queries requiring manual intervention or support

 

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]