๐ŸŒ OpenStreetMap Tool

An AI tool that allows large language models to find points of interest (POIs) on OpenStreetMap near a requested address or place.

Features

This tool can search a location for nearby grocery stores, restaurants and bakeries, recreational areas, educational institutions, transit options, and more. It's best used by asking the AI to find points of interest near a given address or area.

The tool first resolves the address or place, and then picks the center point of that area, and looks for points of interest in a certain radius around it.

For example, if you ask it to find grocery stores near "123 Main Street, Example Town", it will first figure out that "123 Main Street" in Example Town is at GPS coordinates X,Y. Then the tool will check a 4 km (by default) radius around that point for grocery stores.

Searching

It is best to be as specific as possible when searching. The tool is smart enough to find things near specific addresses, regions, or even entire cities. However, it calculates a center point based on the "bounding box" of the address search result. A bounding box is an imaginary box that gives us a small "portion of the map" where the resolved address or place is located.

So if you ask the tool to find POIs in an entire city, it'll look in a radius from roughly the geographical center of the city, because the bounding box will cover the entire city. Finding POIs from the geographical center of a city will give limited and probably not very useful results.

Handling 'Where is the closest X?'

In order to have the OSM tool be able to answer questions like "where is the nearest grocery store to me?", it needs access to your realtime location. This can be accomplished with the following steps in OpenWebUI:

OpenRouteService Integration

The tool can use OpenRouteService for more accurate results.

https://openrouteservice.org/

By default, the OSM tool calculates "as the crow flies" distances between GPS points to figure out the closest points of interest. But the tool can optionally use OpenRouteService to calculate the actual travel distance between two points in order to provide more accurate results. Just because something is close by geographically, doesn't mean it'll be the same distance to get there!

To use OpenRouteService, you must:

Sign up for ORS here.

Configuration

The OSM tool should work out of the box on any low-traffic instance of Open Web UI that uses sufficiently advanced large language models. The only settings you MUST set are the User-Agent and From headers.

Language Models

The tool is routinely tested with the following models:

For Llama 3.1, the 8b parameter model seems to perform better when the "Instruction Oriented Interpretation" setting is disabled. Mistral and Qwen 2.5 work well with the normal instructions setting.

Settings

These are the current settings:

Nominatim Terms of Use

The tool WILL NOT RUN without the User-Agent and From headers set. This is because the public instance of the Nominatim API will block you if you do not set these. Use of the public Nominatim instance is governed by their terms of use.

Nominatim Terms of Use

The default API services are suitable for applications with a low volume of traffic (absolute max 1 API call per second). If you are running a production service, you should set up your own Nominatim and Overpass services with caching.

โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—

โคด๏ธ [/projects/open-webui-filters] ๐Ÿ  Home