In this tutorial, we'll enhance our restaurant recommendation system using Full Text Search (FTS) Indexes and Geospatial APIs.
- Extract User Preferences: Identify key details from user input such as preferred cuisines and location.
- Construct Query String: Synthesize these details into a structured query string for searching.
- Perform FTS Index Search: Use the query string to find relevant restaurant recommendations.
- Apply Geospatial Filtering: Use a Geospatial API to locate the user and refine recommendations based on proximity.
We can enhance later on by adding a filter to sort the recommendations based on distance
-
Install Dependencies: Ensure you have Python installed. Then, install the required packages:
pip install lancedb pandas sentence-transformers requests openai tantivy
-
Prepare Data: Place your restaurant data CSV file in the
data.csv
format in the project directory. -
Run the Notebook: Open the
geospatial-recommendation.ipynb
notebook in Jupyter or Google Colab and execute the cells sequentially.
For a detailed explanation of how this works, check out the blog post: