Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-summarize New/Updated Bills #1612

Open
Mephistic opened this issue Sep 3, 2024 · 0 comments
Open

Auto-summarize New/Updated Bills #1612

Mephistic opened this issue Sep 3, 2024 · 0 comments
Labels
backend Backend Development enhancement New feature or request

Comments

@Mephistic
Copy link
Collaborator

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.
@Mephistic Mephistic added backend Backend Development enhancement New feature or request labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend Development enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant