-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress low-confidence SVs in
strict
mode (#3768)
Currently, we have a low-confidence threshold (below which we print a message) of `0.7`, and a drop threshold (below which SVs are dropped) of `0.5` for SVs. The main change in this PR is, for`strict` mode, we increase the drop threshold to `0.7`. This is done by plumbing in the "threshold" value to the NL server, depending on the setting of `mode=strict`. Importantly, the `strict` mode is: * supported only for `api/data` API that nodejs uses * incompatible with LLM. Concretely, setting of `mode=strict` implies: `sv_threshold=0.7`, `detector=heuristic`, `use_default_place=False` Additionally, * Deprecate `udp=` param * Add support for `mode=strict` to NL app, since that exercises the `api/data` flow * Move tests from `explore_test.py` to `nl_test.py`, also for the same reason.
- Loading branch information
Showing
27 changed files
with
263 additions
and
390 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
} | ||
], | ||
"relatedThings": {}, | ||
"svSource": "CURRENT_QUERY", | ||
"svSource": "UNKNOWN", | ||
"userMessage": "" | ||
} |
47 changes: 47 additions & 0 deletions
47
server/integration_tests/test_data/strict_default_place/query_3/chart_config.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"config": { | ||
"categories": [ | ||
{ | ||
"blocks": [ | ||
{ | ||
"columns": [ | ||
{ | ||
"tiles": [ | ||
{ | ||
"type": "PLACE_OVERVIEW" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"placeDcid": [ | ||
"geoId/06" | ||
] | ||
} | ||
}, | ||
"context": {}, | ||
"debug": {}, | ||
"pastSourceContext": "", | ||
"place": { | ||
"dcid": "geoId/06", | ||
"name": "California", | ||
"place_type": "State" | ||
}, | ||
"placeFallback": {}, | ||
"placeSource": "CURRENT_QUERY", | ||
"places": [ | ||
{ | ||
"dcid": "geoId/06", | ||
"name": "California", | ||
"place_type": "State" | ||
} | ||
], | ||
"relatedThings": {}, | ||
"showForm": true, | ||
"svSource": "UNRECOGNIZED", | ||
"userMessage": "Could not recognize any topic from the query. See available topic categories for California." | ||
} |
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.