Skip to content

Use fuzzy_row_match for updating metadata - #935

Closed
AVHopp wants to merge 2 commits into
mainfrom
fix/reuse_fuzzy_matching_for_metadata
Closed

AVHopp wants to merge 2 commits into
mainfrom
fix/reuse_fuzzy_matching_for_metadata

Conversation

@AVHopp

@AVHopp AVHopp commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

The campaign currently uses rec.index for updating the metadata. This PR changes this behavior by using fuzzy_row_match instead of explicitly matching against rec.index.

Using rec.index can cause issues for recommenders that change or do not preserve the index. This has been observed during the development of the LLMRecommender in #855

The campaign did use `rec.index` for updating the
metadata. This can cause issues for recommenders
that might not preserve the original index order.
Comment thread baybe/campaign.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is constructed in the best possible manner?

  1. The fuzzy row match is not 100% free from a computaitional perspective, its application should thus only happen if needed. This PR as is adds cost for all paths
  2. all existing recommenders have the index correct by construction, applying a fuzzy row match here has no added benefit for them as its not needed and just adds cost
  3. I understand its needed for the LLM recommender. But since thats the only one, why are you not using the fuzzy row match within that recommender to set the correct index of the recommendations? This would result in the exact same behavior but adds no cost for all other paths

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this is even incorrect and I need to rethink this in general, but looking at it now, I agree that this should be part of the LLMRecommender. Closing this PR.

@AVHopp AVHopp closed this Oct 19, 2026
@AVHopp
AVHopp deleted the fix/reuse_fuzzy_matching_for_metadata branch October 19, 2026 07:00
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.

2 participants