chatbot-model-bills / src /components /render_tab_info.py
penguinsfly's picture
reorganize into component files, add info, and add pca plot
fd4a87f verified
import streamlit as st
def render(tab):
tab.markdown('''
## Bill scope
### Queries
The bills analyzed here were collected with LegiScan across all legislative sessions.
Three main queries were used to cover potential chatbot / companion bills, as well as bills to disclose interaction with AI or prohibit certain claims in certain settings.
Note that certain queries may have generated bills out of scope, but this is alright as over-inclusion is more acceptable than under-inclusion.
Specifically:
1. **Chatbot** query to include terms like chatbots, AI companions, AI relationships or conversational AI:
```
"chatbot" OR "chat-bot" OR "chat bot" OR
(AI NEAR companion) OR (artificial NEAR intelligence NEAR companion) OR
(AI NEAR relationship) OR (artificial NEAR intelligence NEAR relationship) OR
(conversational NEAR AI) OR (conversational NEAR artificial NEAR intelligence)
```
2. **Interaction** query to find instances where the term "artificial intelligence" is near terms "interaction", "communication", "engagement". Note that the acronym "AI" is not used in this case for the time being.
```
(artificial NEAR intelligence NEAR interact) OR
(artificial NEAR intelligence NEAR interaction) OR
(artificial NEAR intelligence NEAR interacting) OR
(artificial NEAR intelligence NEAR communicate) OR
(artificial NEAR intelligence NEAR communication) OR
(artificial NEAR intelligence NEAR communicating) OR
(artificial NEAR intelligence NEAR engage) OR
(artificial NEAR intelligence NEAR engagement) OR
(artificial NEAR intelligence NEAR engaging)
```
3. **Advertsement & Health** query to find instances where AI is mentioned in the same bill about mental health and the word "advertise" is used. This is generally a very broad query, but the intent is to include bills that prohibit/restrict AI being advertised as a health care professional.
```
(artificial NEAR intelligence)
AND advertise
AND (
"behavioral health care" OR
"mental health professional" OR
"therapist" OR "counselor" OR "physician"
OR "psychiatrist" OR "psychologist"
)
```
### Filters
First, 654 unique bills returned with the above queries on May 10, 2026.
Note that bills may appear across multiple queries.
Additionally, the following filters were applied to limit:
1. Any bill whose title has the terms "chatbot/companion/relationship/conversation" were automatically included.
2. Only bills with at least `relevance > 5` from LegiScan (in any of the above queries) were included.
3. Budget bills, i.e. whose titles include "appropriation/budget/fiscal", were largely excluded.
In other words the criteria were: `1 OR (2 AND 3)`.
From these criteria, 560 / 654 were further carried on.
However, certain bills had really large texts so an additional filtering based on a LegiScan's encoded bill text's size was done.
Specifically, bills with at least one version whose size is more than 5MB were excluded.
Only 3 IL "General revisory" bills were excluded, and were way too "broad":
[SB2394](https://legiscan.com/IL/bill/SB2394/2025),
[SB3731](https://legiscan.com/IL/bill/SB3731/2025),
[HB4844](https://legiscan.com/IL/bill/HB4844/2023).
Hence, the dataset contains 557 bills, from the original 654 bills, to be analyzed and compared with 4 model bills.
## Model bills
Four model bills were included to be compared against.
Model bills were manually sectioned, then automatically segmented into sentences to be compared with the above 557 bills using fuzzy ratios.
Please visit the **Models** tab for more information and the segmentation of these bills.
Select the thresholds and parameters above to view the analysis of similar bills.
''')