Skip to content
The Temple of the Sacred Tooth Relic in Kandy

BSc IT final-year research project

About Lankora AI

A final-year research project on personalised, weather-aware trip planning for Sri Lanka: what it is, how it works, what it achieved and where it falls short.

The project

Lankora AI is a hybrid machine-learning framework that extracts a traveller's interests from their own social media posts and builds a daily itinerary for Sri Lanka that fits those interests, the weather, real road travel times and a budget.

Research title
A Hybrid Machine Learning Framework for Personalized Tourism Itinerary Recommendation in Sri Lanka Using Social Media Interest Extraction and Weather-Aware Constraint Optimization
Institute
Nāgānanda International Institute for Buddhist Studies (NIIBS)
Researcher
Buddhi Rangana
Programme
BSc in Information Technology, final-year research project
Status
Working prototype; evaluation in progress

The problem

Planning a trip to Sri Lanka is harder than the map suggests.

Manual profiling

Travel sites ask long questionnaires. Many people abandon them, and new users get generic recommendations (the cold-start problem).

Weather blindness

Sri Lanka's monsoons and microclimates change quickly, yet most planners suggest outdoor activities regardless of the forecast.

Fixed lists

Typical “top 10” lists ignore distances, real travel times, opening hours and budget, so tourists end up rebuilding the plan by hand.

Objectives

  • Read interests from posts

    Turn unstructured captions into a normalised profile across heritage, adventure, wildlife, beach and water sports, and relaxation, using NLP and open-source libraries.

  • Respect the weather

    Score places with live meteorological data and penalise or hold back weather-sensitive activities during unfavourable conditions.

  • Plan realistic days

    Solve an Orienteering Problem with Time Windows with a genetic algorithm, using real road travel times, opening hours and budget limits.

  • Evaluate with people

    Measure the system against baselines and with a within-subject user study of 50 participants using the System Usability Scale.

How it works

Four stages turn a handful of posts into a day-by-day plan.

  1. 1

    Interest extraction

    A BERT model fine-tuned on about 9,600 Sri Lankan tourist reviews, labelled by a keyword lexicon and audited, scores each post for five interest categories. A multilingual sentence model adds a second, zero-shot signal, and a small learned aggregator turns the post scores into a profile of five numbers.

    • BERT (bert-base-uncased)
    • MiniLM zero-shot
    • Logistic aggregator
  2. 2

    Weather-aware scoring

    Each place is scored as (0.7 × interest match + 0.3 × rating) × a weather factor. Thunderstorms, rain of 7.6 mm/h or more, or wind of about 50 km/h or more hold back weather-sensitive places for the hours they last; milder weather only lowers the score. Without a forecast the system uses seasonal averages.

    • OpenWeatherMap
    • Hourly forecast
    • Redis / in-memory cache
  3. 3

    Real road travel times

    Travel times and distances come from the Sri Lanka road network, queried in-process with no separate routing server. A precomputed matrix covers all 363 places, and one extra query connects the traveller's start point.

    • OSRM (native bindings)
    • Contraction hierarchies
    • OpenStreetMap
  4. 4

    Itinerary solver

    A genetic algorithm orders the candidate places so that each visit fits opening hours, closures, the daily time window, the budget level and the weather hours, and waits out bad weather where it can. It is compared with a greedy baseline and an exact solver.

    • Genetic algorithm
    • OPTW
    • OR-Tools (evaluation)

The planner works over 363 curated places in 64 weather zones and 32 activity types, with entry fees, opening hours, closure days and weather tolerances for each.

Results so far

Measured against the targets in the research proposal. Every result is reported, including the ones that miss.

MeasureResultStatus
Route optimality (GA vs exact solver, 50 instances of 12 places)Mean gap 0.20%, worst 1.83%Met
Constraint feasibility (50 scenarios × 10 runs)100% of 500 runs fully feasibleMet
Planning time (warm cache)Mean 1.2 s, slowest 3.4 sMet
Weather conflicts, hourly forecast134 conflicts reduced to 0 in rainy windowsMet
Weather conflicts, 3-hourly forecast (free plan)59% to 69% fewerNot met
Interest extraction, MRR (86 profiles, cross-validated)0.88Met
Interest extraction, macro F10.68Not met
Usability (SUS, 50 participants)Study not yet runPending

Privacy and ethics

The system handles social media text, so privacy comes first. It is designed around Sri Lanka's Personal Data Protection Act, No. 9 of 2022.

Informed consent

Nothing is read until a participant ticks a versioned consent notice. The version and time are recorded against their account, and they can withdraw at any stage.

Public data, no passwords

Only public captions, bios and hashtags are read. Private accounts and messages are never accessed, and no participant password is requested. Facebook users can instead upload their own data file, which is read in their browser.

De-identification

Usernames are hashed with SHA-256, and phone numbers, e-mail addresses and personal names are removed with named-entity recognition before any text reaches the model.

Zero persistence of posts

Raw posts are processed in memory and never stored. Only five interest numbers are kept, they are purged after the itinerary is generated, and the participant can delete them (and their account) at any time.

Accounts add a name and e-mail address (or a Google or Facebook identity) so that each planning session is private to its owner. Passwords are stored only as Argon2id hashes, and sessions use short-lived signed tokens. Data collection is limited to a controlled group of opt-in participants.

Technology

Frontend

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • shadcn/ui
  • Framer Motion
  • Leaflet
  • Recharts
  • jsPDF

Backend

  • Python 3.13
  • FastAPI
  • Pydantic
  • Uvicorn
  • Argon2
  • JWT

NLP and ML

  • PyTorch
  • Hugging Face Transformers
  • spaCy
  • scikit-learn
  • Instaloader
  • facebook-scraper

Data and routing

  • MongoDB Atlas
  • Redis
  • OSRM
  • OpenStreetMap
  • OpenWeatherMap
  • OR-Tools

Delivery

  • GitHub Actions
  • Render
  • Vercel
  • Hugging Face Hub
  • pytest

Data sources and credits

Limits and next steps

A research prototype is honest about what it does not do yet.

Known limits
  • The interest model reaches an F1 of 0.68, below the 0.88 target, and its labels need a second annotator.
  • The language model reads English; Sinhala and Tamil captions are understood only through the zero-shot signal.
  • Facebook blocks automated reading of posts, so Facebook participants provide their own data file.
  • Poya (full-moon) holidays move each year and are not modelled; opening hours and prices are study assumptions.
  • Accommodation is suggested but not counted in the budget.
Next steps
  • Relabel the profile set with two annotators and collect more consented profiles.
  • Run the 50-participant usability study (SUS, task time and errors) against static guides.
  • Add Sinhala and Tamil support to the interest model.
  • Compare against the Apriori baseline, if the supervisor approves it.
  • Deploy the full stack on a plan with enough memory for the language models.

Try it, or read the code

Plan a trip in a few minutes, or browse the open repository and its evaluation scripts.