Skip to main content

Natural-language querying of parliament’s website

Italy - Senate

Use case ID: 024

Author: Senate of Italy

Date: 12 June 2024 

Objective:

Enable users to query the Senate website’s search engines using natural language processed by large language model (LLM)-based artificial intelligence (AI), enhancing the accessibility, accuracy and user experience of the search functionality. 

Actors: 

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

Prerequisites: 

  • Existing search engine integrated with the Senate website
  • Trained LLM-based AI model for understanding and processing natural-language queries
  • Database of Senate documents and information to be searched
  • Internet accessibility for users 

Scenario: 

  1. The user accesses the Senate website.
  2. The user enters a query in natural language (e.g. “What are the latest laws passed on education?”) in the search bar.
  3. The LLM-based AI model processes the natural-language query to understand the intent and key terms.
  4. The LLM-based AI model translates the natural-language query into a format that the search engine can understand.
  5. The search engine retrieves relevant documents and information based on the translated query.
  6. The results are displayed to the user in a user-friendly format.
  7. The user can refine their search or ask follow-up questions in natural language to further narrow down the results. 

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 more accurate and relevant search results.
  • Usage of the Senate website’s search functionality is increased.
  • It takes less time and effort for users to find specific information.
  • Accessibility for users unfamiliar with technical search terms or Senate document classifications is improved. 

Potential challenges:

  • None 

Data requirements: 

  • Historical search queries and user interactions for training and improving the LLM model
  • Database of Senate documents, laws and other relevant information 

Integrations with other systems: 

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

Success metrics: 

  • Query response time
  • User satisfaction ratings and feedback
  • Accuracy and relevance of search results
  • Increase in the number of natural-language queries
  • 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]