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

Data Model for LLM Bill Summaries #1610

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

Data Model for LLM Bill Summaries #1610

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

Comments

@Mephistic
Copy link
Collaborator

Problem

Now that our LLM work is setup, we want to store LLM-generated summaries of bills in Firebase so we can serve them on the bill details page.

  • A bill can have multiple summaries (it likely makes sense for this to be a sub-collection under bills)
    • For the first pass, we will only generate summaries when the model changes and we manually decide to generate new summaries
  • A bill summary has the following elements:
    • summaryText: The text of the generated summary
    • createdAt: Timestamp when the summary was added to our DB - For V1, I think we can safely assume that the most recently created summary is the currently active summary (we can look into more finely tuned control once we have a live MVP to experiment with).
    • source: String that specifies the reason the bill summary was generated (e.g. something like bill-update in response to a bill update, model-update or model-v7 in response to a model update, or manual for a manual override - actually setting this will be the responsibility
  • Bill Summaries should be readable, but not writable, from the Front End
  • The only actual query pattern for V1 should be fetching the most recently created summary for a given bill (to display on the bill details page).

Success Criteria

  • A "Bill Summary" data model meeting the above criteria is added to our Firebase types (Firebase auto-generates this stuff on the first field write - should just need to make sure the indexes/rules are set up right).
  • A corresponding BillSummary Typescript type is added for use in the maple codebase
  • At least one example BillSummary added to a bill on the dev environment to kick

Additional Links

  • Ticket for job to generate and backfilling summaries into the new data model:
  • Python code that generates the summaries: <TBD - link to cloud wrapper ticker>
@Mephistic Mephistic added backend Backend Development enhancement New feature or request labels Sep 3, 2024
@Mephistic Mephistic self-assigned this Oct 22, 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