feat: enrich Gemini with Florence facts and canonical damage labels#62
Open
madhavcodez wants to merge 1 commit intomainfrom
Open
feat: enrich Gemini with Florence facts and canonical damage labels#62madhavcodez wants to merge 1 commit intomainfrom
madhavcodez wants to merge 1 commit intomainfrom
Conversation
Expand the system prompt with eight grounded facts about Hurricane Florence so factual queries return accurate answers instead of a refusal or hallucination. Widen the scope gate to admit disaster information and hurricane facts. Accept both canonical damage strings (no-damage, minor-damage, major-damage, destroyed, unknown) and the short aliases the frontend filter expects (none, minor, severe, destroyed, unknown) in set_classification_filter; a normalization map keeps Gemini's vocabulary consistent with the system prompt without breaking the UI contract. Pin to gemini-2.5-flash-lite for reliable tool-calling; the full flash model intermittently returns 503 UNAVAILABLE under load. Synthesize a natural-language reply from the action metadata when Gemini returns tool calls with no text, replacing the sterile fallback message. Addresses UTDisaster/frontend#48
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What this does
Makes the Gemini-powered chat actually know things about Hurricane Florence and reliably do what users ask.
Three related changes:
no-damage,minor-damage,major-damage,destroyed,unknown) and the short aliases the frontend filter expects (none,minor,severe,destroyed,unknown). A small normalization map keeps both vocabularies consistent without breaking the frontend contract.Pinned to
gemini-2.5-flash-litebecause the full flash model intermittently returns 503 UNAVAILABLE under load — the lite model handles our tool-calling loop reliably.How to verify
Addresses UTDisaster/frontend#48