Using LLMs for Querying and Understanding Long Legislative Texts
Arhanth Sarnikar · 2025
With over 2,000 bills being passed in the California State Legislature each year, it can be very confusing for the average citizen to understand what is being approved. This process can be made much easier with recent advancements to large language models (LLMs). Specifically, using Retrieval Augmented Generation (RAG). This research paper will study two different approaches to using LLMs to answer questions about bills passed in our state legislature. The first approach will employ standard RAG protocol to scan and retrieve any information relevant to the user’s prompt and summarize it in an easy-to-read manner. Our second approach expands the context window of the model to consider a wider range of legislature when scanning for keywords entered by the user. By analyzing the performance of each LLM, we can find the best model that guarantees contextually rich answers to any questions surrounding the state legislature.