Verify can use an AI address parser to improve the results for addresses that are hard to parse. The parser is built into the Spatial API, and is off by default.
When a request asks for AI parsing, Verify parses the address twice: once as normal, and once using the AI parser. It then returns whichever result scores better.
In our testing on UK addresses, AI parsing changed the result for around 8% of addresses. Results vary with the address data and the country.
An address returned by the AI parser has ai in its MatchRuleLabel, for example C1a ai.
AI parsing is not used for certified requests (CASS, SERP, AMAS). These are always parsed as normal.
The AI data is installed by the install manager alongside the standard data, if your license includes the AI products. See the Runbook for installing data.
Not all countries have an AI model yet. These countries are currently supported:
Addresses in other countries are parsed as normal.
AI parsing must be enabled on both the Spatial API and the Query Coordinator. If it is only enabled on one, requests are parsed as normal.
Set the LOQATE_ALLOW_AIPARSER environment variable to true before running the helmfile. This sets app.allow_aiparser on both the spatial-api and querycoordinator releases.
Linux:
export LOQATE_ALLOW_AIPARSER=true
Windows:
$env:LOQATE_ALLOW_AIPARSER="true"
Set app.allow_aiparser to true when installing both charts:
helm install -n loqate spatial-api loqate/spatial-api --set imageCredentials.username=<DOCKERHUB USERNAME> --set imageCredentials.password=<DOCKERHUB PASSWORD> --set app.memberlistService=memberlist.loqate.svc --set app.allow_aiparser=true
helm install -n loqate querycoordinator loqate/querycoordinator --set imageCredentials.username=<DOCKERHUB USERNAME> --set imageCredentials.password=<DOCKERHUB PASSWORD> --set app.memberlistService=memberlist.loqate.svc --set app.allow_aiparser=true
The AI parser runs its own threads, in addition to the Spatial API’s workers. When AI parsing is on, halve the Spatial API worker count (app.workerCount).
By default the worker count is the number of CPUs available to the pod. For example, for a pod with 8 CPUs, set app.workerCount to 4.
This applies to the Spatial API only. The Query Coordinator’s worker count does not need to change.
The Spatial API autoscaling uses the percentage of workers in use (ngv_sa_workers_used, see Observability), so changing the worker count also changes when scaling is triggered.
Requests ask for AI parsing with the aiparse option. The value is the string "true", not a JSON boolean.
For example:
The responses above show only some of the fields.