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

Batch Job for Generating Bill Summaries #1611

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

Batch Job for Generating Bill Summaries #1611

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

Comments

@Mephistic
Copy link
Collaborator

Problem

We now have an LLM-based summary generator for Bills and a data model that supports storing bill summaries - we just have to link the two together and actually generate summaries for our existing bills. We need a job that can be manually invoked whenever there is either a new batch of bills (e.g. with a new session) or a new model version to summarize all existing bills with the current model.

Success Criteria

  • Idempotent, Manually-invoked Script that iterates over existing bills, calls the Cloud Function to generate summaries, and saves the resulting summary to our Firestore DB
    • Ideally, job should have following flags (for testing + preserving external AI credits):
      • --dry-run (Doesn't actually generate summaries, only prints out the billIds that we would generate summaries for)
      • --bills billId1 billId2 (If specified, only generates summaries for the given bills. If not specified, defaults to generating summaries for all bills).
      • --version V1 (If specified, the version should be propagated into the resulting BillSummary document saved in the DB. We should also only generate and save a new summary if there is not an existing summary with the supplied version (for idempotency if a job fails halfway through).

Additional Links

  • Ticket for Cloud Function Wrapper for LLM Bill Summary Generator:
  • Ticket for the base Bill Summary data model setup:
@Mephistic Mephistic added backend Backend Development enhancement New feature or request labels Sep 3, 2024
@github-staff github-staff deleted a comment from maher-nakesh Oct 1, 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