Finding Hope in Rubble: Vector Search for Disaster Response
This article describes the development of a geocoding application using vector databases (LanceDB and Pgvector) and sentence transformers to search for locations and addresses in the aftermath of a disaster. The application leverages address information and geographical coordinates to find similar addresses and closest points.
Summary
- The application was motivated by the challenges faced during the rescue efforts following the 2023 earthquake in Turkey, where lack of access to accurate and up-to-date location data hindered aid delivery.
- The application uses address data containing city, district, neighborhood, street, building number, and location information.
- Sentence transformers are used to convert addresses into vectors for similarity search.
- LanceDB and Pgvector are used as vector databases to store and query the address vectors and geographical coordinates.
- The application can find addresses similar to a given address and find the closest locations to a given point.
- The chosen model for sentence transformers is 'emrecan/bert-base-turkish-cased-mean-nli-stsb-tr'.
- The vector dimensions are 768 for address embeddings and 2 for geographical coordinates.
- The application uses Euclidean distance (L2 metric) for similarity search.