feat: optimize string comparisons to reduce llm calls#216
Closed
sushruth2003 wants to merge 1 commit intoucbepic:mainfrom
Closed
feat: optimize string comparisons to reduce llm calls#216sushruth2003 wants to merge 1 commit intoucbepic:mainfrom
sushruth2003 wants to merge 1 commit intoucbepic:mainfrom
Conversation
| return True, 0 | ||
|
|
||
| # For each key that exists in both items, try basic string matching | ||
| common_keys = set(item1.keys()) & set(item2.keys()) |
Collaborator
There was a problem hiding this comment.
One worry I have here is that it won't be performant...LLM calls are not performant but at least they can be multithreaded. Do you have an idea about the performance characteristics of slugify?
Collaborator
There was a problem hiding this comment.
We already check for case-insensitive exact matches in lines 80-86 (in the edited file), so I wonder what the marginal benefit of using slugify is
Collaborator
There was a problem hiding this comment.
tagging @redhog to give feedback on this, since they raised the issue
Contributor
Author
There was a problem hiding this comment.
Fair point, I'll see if I can profile on some of the test cases with it on and off, but most of what I can read online says that the slugify library is pretty efficient.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #125
Making some simple fixes to bypass llm calls in the case of easily solved string comparisons.