Skip to content

Location-aware RAG

Location-aware RAG lets you attach optional GPS coordinates to ingested sources and use the chat user’s location at retrieval time. This is useful for branch finders, regional support, delivery coverage, and any assistant where proximity matters as part of the answer.

Use this feature when:

  • your knowledge varies by region, branch, store, campus, or service area
  • you want the assistant to prefer nearby sources over distant ones
  • you need a hard location filter, but still want semantic relevance to matter

If the assistant does not have Require GPS location enabled in the dashboard, any location payload sent by the client is ignored and the chat will not request browser location permission.

When you ingest a source, you can optionally attach:

  • latitude
  • longitude

Both values must be provided together and use WGS84 decimal degrees.

When Require GPS location is enabled, the chat client sends the user’s location with each request:

{
"location": {
"latitude": 52.3702,
"longitude": 4.8952
},
"radius": 25000,
"radiusUnit": "km"
}
  • location is the user’s current GPS position.
  • radius is optional; the assistant falls back to the dashboard default when omitted.
  • radiusUnit accepts km or miles.
  • The browser must grant geolocation permission before the assistant can use this data.

The Interaction settings expose four geo controls:

  • require_geolocation: turn on browser GPS requests and location-aware retrieval.
  • geo_radius_default: default radius used when the chat request does not include one.
  • geo_radius_unit: default radius unit.
  • prioritize_by_distance: blend proximity into ranking instead of using proximity as a hard filter only.

With location enabled, retrieval filters knowledge to the configured radius and can optionally favor closer matches when prioritize_by_distance is on. Without it, Ragtime behaves like standard semantic retrieval.