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

[NL] Disable llm fallback for entity based queries. #4722

Merged
merged 3 commits into from
Nov 9, 2024

Conversation

clincoln8
Copy link
Contributor

Disabling the LLM fallback for entity based queries for now since the prompt is tailored to place+statvar queries.

@clincoln8 clincoln8 requested a review from chejennifer November 7, 2024 23:22
Copy link
Contributor

@chejennifer chejennifer left a comment

Choose a reason for hiding this comment

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

thanks!

@@ -122,6 +126,10 @@ def _has_no_entity(d: Detection) -> bool:
return not d.places_detected or not d.places_detected.entities_found


def _has_entity(d: Detection) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I don't think we need this helper since there's not really any logic here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The double negative is a little rough for readability -- I updated the code to only have _has_entity to avoid this issue. Is that okay?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll merge this for now so that the logic is in autopush. I can change the readability part if you prefer the _has_no_entity with the double negative as a follow up!

@clincoln8 clincoln8 merged commit c2c1d9d into datacommonsorg:master Nov 9, 2024
8 checks passed
@clincoln8 clincoln8 deleted the bio-llm-fallback branch November 9, 2024 04:23
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