Skip to content

Conversation

@sprice
Copy link
Member

@sprice sprice commented Oct 6, 2025

This feature changes:

  • our judgements from neutral to abstain (an MP can vote yes, no, or abstain so we want to match that)
  • moves the abstain judgement to the LLM system prompt rather than having our code swap a yes or no to neutral/abstain by checking if it's a social issue or if one tenet response is different from all others
  • for now I've removed the check for one tenet being different than all others (this doesn't make sense to me so if we want this lets unpack it. If all tenets but one are yes it should probably still be a yes?)
  • I'm not sure the best way to run mongo migrations so I've created a simple script to run them from a migrations folder. Happy to switch this up if we'd like
  • Addresses Change neutral to abstain and update prompt to judge yes, no, or abstain #61

@sprice
Copy link
Member Author

sprice commented Oct 6, 2025

I've run the migration and tested things out and it works as expected.

This one is a non-trivial refactor and would benefit from a careful code review.

@melkuo melkuo requested review from mikaalnaik and xrendan October 6, 2025 16:06
@xrendan
Copy link
Member

xrendan commented Oct 7, 2025

Did you run the migration against the prod database?

I will review this but I will let @mikaalnaik approve/not because he's most familiar with how this all works

@sprice
Copy link
Member Author

sprice commented Oct 7, 2025

No I have not run the migration on prod.

That would happen once this is approved and ready to go. And I should note that this is a fairly rudimentary migration (ie: run a mongo command).

It would be great to get the dev environment up to test this on.

  1. Bring dev environment online
  2. Sync prod db to dev db
  3. Test the deployment of this branch and migration on dev
  4. If it looks good, roll it out.

@sprice
Copy link
Member Author

sprice commented Oct 12, 2025

I've added a new script src/scripts/sync-db.ts which can be used to manage MongoDB dumps and restores for both dev and prod databases.

I've also updated the in memory page cache to only be turned on with process.env.NODE_ENV === "production"

@sprice
Copy link
Member Author

sprice commented Oct 12, 2025

src/app/page.tsx still had some logic that swapped the vote in the UI depending on the count of tenet evaluations.

We're now displaying the vote in the UI that the LLM returned. We want clean separation of concerns between how a bill is analyzed and how we display the analysis.

@sprice sprice merged commit 0e9106b into main Oct 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants