GeocodeGPT (Custom GPT for Geocoding Addresses)
Giving ChatGPT the ability to reach out to an external geocoding service
ChatGPT on its own can’t geocode addresses. On occasion it will hallucinate coordinates. If it’s a really common location (e.g. the White House), it might correctly assign coordinates. The ability to geocode unlocks powerful geospatial use cases for ChatGPT, so I developed a Custom GPT with an action that calls Geocodio’s API. Check out the video demo below where we read a PDF of hospital addresses in Washington DC, geocode them, and perform a simple analysis on the results!
*video has no sound
As you saw, once the latitude and longitude are made available to ChatGPT, it can perform spatial calculations/statistics on the results. I used a pretty simple example of finding average distance between the hospitals.
What if I asked ChatGPT (using GPT 4) to geocode without GeocodeGPT?
See screenshot below:
Note on the utility of Custom GPT’s
Custom GPT’s where people set custom instructions and upload “training” data don’t seem to offer a big improvement over the baseline ChatGPT experience. Maybe they’ll be more powerful in the future. Custom GPTs with external actions to reliable data sources (like a geocoding service) will be helpful for people today.
Excited for the launch of the Custom GPT marketplace to see what gets built! Very curious for how pricing will work as well.
Edit:
Batch geocoding works now. I struggled to send multiple values directly from ChatGPT external action to the geocoding service, so instead now the external action is sent to a Google Cloud function that I manage that then sends the bulk geocoding request to the geocoding service.