Inspiration

Military families move to a new duty station every two or three years on average, sometimes with only a few weeks' notice. Whether the family will like living near the new base is hard to tell from far away. Qloo's taste data covers places, music, and TV, and its heatmap shows where people with a family's tastes are concentrated near a base.

What it does

The family enters places they will miss, music, shows, books, podcasts, and weekend activities, plus whether they have kids at home and an eating-out budget. The app returns a welcome kit for the new duty station:

  • areas near the base ranked by how well they match the family's tastes, shown on a map
  • restaurants, cafes, and venues for the first week, within budget
  • family-friendly places when there are kids
  • weekend trips within driving range
  • artists and shows that are popular locally and also fit the family, for small talk with new neighbors

Where Qloo returns explainability data, each item names the family favorite that led to it. The kit prints to PDF for the family's PCS binder.

How I built it

The agent runs five steps, and the app shows each one with its timing:

  1. Understand. A model turns free text such as "Rudy's, Tejano, Bluey, beach days" into typed favorites and interests.
  2. Ground. Tools look up each favorite with Qloo search and each interest with the Qloo tags endpoint. When the family enters its current city, place searches use a lat,lon filter around it. Locality, place, and tag hits are scored to catch wrong-country name matches and unrelated tags.
  3. Plan. The model is asked to check the matches, drop wrong ones, pick tags for housing, food, and activities, and set the weekend driving radius. Code keeps only IDs that came from the Ground step.
  4. Execute. Tools call Qloo Insights in parallel: a heatmap seeded with the family's favorites, places filtered by location and price level, destinations, local artists, and local TV shows. Most queries that come back empty are broadened and retried.
  5. Brief. The model is told to write the kit from tool results only, and a validator removes any listed item whose ID did not come from Qloo, so no restaurant reaches the lists unless Qloo returned it.

Every model step has a fallback that needs no model, so the app still works if the free model allowance runs out. It is built to run on a Cloudflare Worker with Workers AI (Meta's Llama 3.3 70B) on the Workers Free plan. The Qloo key stays on the server.

I used AI coding assistants to write and test most of the code.

Challenges I ran into

Turning a heatmap into neighborhoods a family can use. Qloo returns scored geohash cells, so the app groups them into areas about 5 km across and ranks them by average affinity with a small boost for popularity. Each area is labeled after places Qloo returns inside it, when it has any.

Keeping the model honest. Getting a model to name only real places took a check in code: any listed item without a Qloo ID is dropped before it reaches the page.

Wrong-country locality hits. Searching "San Antonio, Texas" on Qloo can return a Mexican locality whose name echoes the state. The app scores candidates with ancestor state and country, then centers place search on lat,lon (the search API rejects locality entity IDs for filter.location).

Accomplishments that I'm proud of

Every recommendation can be traced back to a Qloo result and, where Qloo returns explainability data, to the favorite that led to it. When the family enters its current city, place search is centered on that city's coordinates, and wrong-country locality matches are filtered out. The app also works when the model is unavailable.

What I learned

The useful part of a taste graph for this problem is the location signal. Asking where people with a given set of tastes are concentrated answers the question families have when they move.

What's next for PCS Neighborhood Match

Add commute time from each area to the base gate, and let a family compare two possible duty stations side by side before they rank their choices.

Built With

Share this project:

Updates

Submission history