Skip to content

Auto-summarize New/Updated Bills #1612

Open
@Mephistic

Description

@Mephistic

Problem

When a new bill is added or the text of an existing bill is updated, any LLM-generated bill summaries will become (potentially) out-of-date. To keep our LLM Bill Summaries relevant, we should automatically generate a new summary whenever a bill is added OR a bill's text is updated.

(This is intentionally not an explicit ask for the first pass to be extra cautious with our LLM credits during the initial churn of the model generation - we want to be extremely careful that we cannot end up in a loop where we erroneously generate new summaries each time we scrape a bill, and the surest way to be resilient to that error is to keep the summary generation outside of automated paths at first).

Success Criteria

  • Whenever a bill is newly added OR a bill's text is updated, queue up a request to generate a new bill summary
    • We should add a hard limit on the number of times a bill can have a summary generated (updates to bill text are infrequent, as should be updates to the model after the initial development - we want to cap the potential impact of a bug that triggers an infinite summarization loop).
    • At the start of a new session, we will likely get a batch of thousands of bills added over a very short period of time - we may want to consider introducing jitter to the summarization requests at minimum, and potentially a temporary queue for summarization requests that a longer-running cloud function could poll. Summaries don't need to be generated with particular speed, as long as we keep things relatively up-to-date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ready for DevelopmentAutomatically assigned to issues that are ready to be picked upbackendBackend DevelopmentenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions