rag-postgres-openai-python icon indicating copy to clipboard operation
rag-postgres-openai-python copied to clipboard

geospatial use case

Open flutter-painter opened this issue 1 year ago • 2 comments

Hi @pamelafox, Congratulations for providing such a clear and comprehensive demo with a common use case.

Yet in this common retail scenario, I see little added value over a classic ecommerce search view. The keywords 'climbing' and 'gear' would match just the same with full text search over title/description. The price range could be typed by user using one text field max price : 30 While the conversational UI gives this "communication feeling", it is not handy to display dozens of matching products.

I wonder if other use cases would illustrate the unique querying capabilities of OpenAI. Do you think it could handle geocoordinates, or even postgis ? This would really change the experience

flutter-painter avatar Oct 23 '24 22:10 flutter-painter

I think that'd be quite doable! If I was going to add that, I would start with a table with lat/lng coordinates. Then when the user asked the question, I'd use the query rewriting step to pull out an address/location string. Then I'd send it to the Bing geocoding API, and use it with the PostGIS operators along with the vector/text search.

I don't know when I'd have time to try it out, but it sounds pretty compelling and doable.

Is that what you were thinking?

pamelafox avatar Oct 23 '24 22:10 pamelafox

This is encouraging ! Well I had nothing particular in mind, it just seems there are lots of efficients ways to search for products, but few when it comes to combining products & locations.

You could stick to this retail scenario but twist it for a company use-case, for example ; help a salesman find available stock for a product P across dozens of stores.

You could spice it up a bit by linking each stores to multiple stockrooms and split the stockrooms in different categories (remote, damaged, staff sales only). There it would make a lot of sense to ditch the GUI for a chat.

I don't know what is possible with this this sample PostGIS dataset (countries and capital), but I presume if you pin the stores in a few well-known capital the requests could become really valuable, e.g. is there any product P available for staff-sales in New-York or Ottawa ?

flutter-painter avatar Oct 24 '24 20:10 flutter-painter