-
Notifications
You must be signed in to change notification settings - Fork 1
Add natural language search #3
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
base: main
Are you sure you want to change the base?
Conversation
Nice! I'll spin this up to review the UI/UX. 🙏 Once we think it's ok, it would be great to deploy this somewhere (ds.io or Netlify or so), so we can show it to people (e.g. at LPS 23-27 June. |
@vgeorge This is exciting! I was wondering if we could add one more thing -- would it be possible to use the Our current endpoint doesn’t handle pagination when returning items, so it would be fantastic if we could leverage the STAC API’s pagination features instead. |
Agree with @sunu - it would be great to let the client (STAC Browser) handle the actual STAC query and processing of results. UI/UX-wise, the map works nicely for validating the geo-coded area of interest - it would be great to show the AOI on the map as well, on top of the scenes and their footprints. As a user, I would like some more info about what happened and what query parameters the chatbot came up with. We should surface the
"explanation": "Considering the following collections:\n- sentinel-2-l2a: This collection specifically contains Sentinel-2 imagery, which is required for the user's query.\n- hls2-s30: This collection includes Sentinel-2 data for analysis and has a high temporal frequency fitting the user's needs.\n- io-lulc: Derived from Sentinel-2 imagery, this collection could provide relevant land cover data for Berlin.\n- io-lulc-annual-v02: This collection offers annual land cover data based on Sentinel-2 imagery, likely containing relevant information for Berlin." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UI looks great now, @vgeorge, thanks for addressing all my requests to make it easier for users to understand the submitted query and what happened.
I see you are not using return_search_params_only
yet, but relying on the semantic search app to return the items. It probably takes a larger rework to change this - but we need to, please.
A few issues, probably due to the search API response:
- The list of collections under the search bar has duplicates
- The query against https://stac-semantic-search.labs.sunu.in returns very weird results for me, geocoding-wise. Marrakesh, Morocco, even London, UK shows up somewhere in the ocean.
- I appreciate the warning that submitting a query will reset the form, @vgeorge . Could we clear the form right away when the user hits the Search button? That way, it is clear that this data is obsolete and that it gets replaced once the (new) query returns
@j08lue Thanks for the feedback. I’ve just updated the code to use Regarding the item list:
|
…ration to receive natural search area
🚀 Preview deployed! Your changes are now available at: https://developmentseed.github.io/developmentseed/stac-browser/preview/natural-language-search-demo-devseed/ This preview will be automatically updated on each push to this branch. |
4b93775
to
7b2e020
Compare
🚀 Preview deployed! Your changes are now available at: https://developmentseed.github.io/developmentseed/stac-browser/preview/natural-language-search-demo-devseed/ This preview will be automatically updated on each push to this branch. |
Co-authored-by: Anthony Lukach <[email protected]>
🚀 Preview deployed! Your changes are now available at: https://developmentseed.github.io/stac-browser/preview/natural-language-search-demo-devseed/ This preview will be automatically updated on each push to this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome this now works with client-side queries, @vgeorge.
Pagination in the client also works nicely now.
Two small change requests
One-click query
It would be great if the search was already triggered when the user submitted their natural language query, instead of that being a two-step process. Would that be possible?
Make form inactive why LLM request is processing
When the user submits an LLM query, the form should be locked / inactive / cleared until the query returns, so they get a clear indication that the data in the form is invalid and a change is underway.
That looks awesome @vgeorge ! 🚀 I have some questions around the UX... is seems confusing that the headings Natural Language Search and Temporal Extend are in the same form, like they complement each other. While actually the former populates the latter. Maybe a separator line, like before Sort, can help distinguish? And then, what is the radio button Natural Search Area doing? I understood the NLS request comes back with a bounding box, which we can use to populate the Spatial Extend checkbox and map? Jonas' request for a One-click query could be solved with a two-button system, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, this version works very nicely and all essential functionality is in place. We can track additional enhancements in separate tickets / PRs.
This adds a natural language search UI to the STAC Browser, if an API endpoint is provided.
Based on the work from @sunu available at sunu#1.
Changes included:
To run this locally:
Suggested next steps:
@j08lue @sunu @AliceR what else do you think we need to change or implement for the demo?
ps: I set the target of this PR to a branch on this repo, but we can change it if we decide to push upstream.