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

Enable more complex STAC filters #7

Open
batpad opened this issue Apr 11, 2023 · 0 comments
Open

Enable more complex STAC filters #7

batpad opened this issue Apr 11, 2023 · 0 comments

Comments

@batpad
Copy link
Member

batpad commented Apr 11, 2023

Currently, we only use the bbox and datetime parameters to search STAC: https://github.com/developmentseed/labs-gpt-stac/blob/main/main.py#L167

We should give ChatGPT access to the full range of search options, allowing it to make more nuanced queries based on user input.

This would likely involve:

  • Augmenting the stac action in main.py to accept a cql2-json JSON object with filter parameters
  • "Teach" ChatGPT in the prompt how to write cql2-json, what its different options are to filter by on properties, etc. and ask it to create valid cql2-json which we parse in the stac action.

This might be a bit more work to handle edge cases / where ChatGPT fails to write valid cql2-json - we may need to add a validator and ask it to validate its json until it gets it right.

It's unclear how well this would or wouldn't work, but definitely something we should try out - it would be cool to be able to ask it questions to filter out images with clouds, or from a particular satellite, etc.

cc @geohacker

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

No branches or pull requests

1 participant