Spaces:
Runtime error
Runtime error
Update data/extra_instructions.md
#4
by
Carsonburney - opened
- data/extra_instructions.md +72 -70
data/extra_instructions.md
CHANGED
|
@@ -1,70 +1,72 @@
|
|
| 1 |
-
# Extra Instructions
|
| 2 |
-
|
| 3 |
-
##
|
| 4 |
-
- Use `
|
| 5 |
-
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
-
|
| 68 |
-
|
| 69 |
-
#
|
| 70 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Extra Instructions
|
| 2 |
+
|
| 3 |
+
## Room type filter (exact)
|
| 4 |
+
- Use `room_type = 'Entire home/apt'`
|
| 5 |
+
- Use `room_type = 'Private room'`
|
| 6 |
+
- Use `room_type = 'Shared room'`
|
| 7 |
+
- Use `room_type = 'Hotel room'`
|
| 8 |
+
- Text matches are **case- and punctuation-sensitive**.
|
| 9 |
+
- Always use the exact string as shown in the dataset.
|
| 10 |
+
|
| 11 |
+
## Neighbourhood filter (exact)
|
| 12 |
+
- Use `neighbourhood = 'Short North'` (example).
|
| 13 |
+
- Neighbourhood names are **case-sensitive**.
|
| 14 |
+
- Always match the spelling exactly as stored in the dataset.
|
| 15 |
+
- Do not assume automatic capitalization or fuzzy matching.
|
| 16 |
+
|
| 17 |
+
## Price queries (nightly rate)
|
| 18 |
+
- `price` represents the nightly rental rate in USD.
|
| 19 |
+
- Price is stored as a whole-dollar integer.
|
| 20 |
+
- If asking for:
|
| 21 |
+
- “Under $X” → use `price < X`
|
| 22 |
+
- “At most $X” → use `price <= X`
|
| 23 |
+
- Weekly or monthly calculations must be explicitly requested.
|
| 24 |
+
- Weekly = `price * 7`
|
| 25 |
+
- Monthly (approximate) = `price * 30`
|
| 26 |
+
|
| 27 |
+
## Handling listings with zero reviews
|
| 28 |
+
- If `number_of_reviews = 0`:
|
| 29 |
+
- `last_review` is blank.
|
| 30 |
+
- `reviews_per_month` is NULL.
|
| 31 |
+
- Do not assume NULL `reviews_per_month` equals 0 unless explicitly stated.
|
| 32 |
+
- When calculating averages of `reviews_per_month`, exclude NULL values unless instructed otherwise.
|
| 33 |
+
|
| 34 |
+
## Availability interpretation
|
| 35 |
+
- `availability_365` represents the number of available days in the next 365 days.
|
| 36 |
+
- `availability_365 = 0` may indicate:
|
| 37 |
+
- Fully booked
|
| 38 |
+
- Host-blocked calendar
|
| 39 |
+
- Inactive listing
|
| 40 |
+
- Do not automatically interpret 0 as permanently delisted unless specified.
|
| 41 |
+
|
| 42 |
+
## Host analysis (multi-listing hosts)
|
| 43 |
+
- Use `calculated_host_listings_count` to identify hosts with multiple listings.
|
| 44 |
+
- Multi-listing host condition:
|
| 45 |
+
- `calculated_host_listings_count > 1`
|
| 46 |
+
- When ranking hosts by inventory, sort by `calculated_host_listings_count` (descending).
|
| 47 |
+
|
| 48 |
+
## Aggregation intent (very important)
|
| 49 |
+
State whether you want raw rows or an aggregate.
|
| 50 |
+
|
| 51 |
+
You can copy/paste:
|
| 52 |
+
|
| 53 |
+
- **Calculate total listings:** `COUNT(id)`
|
| 54 |
+
- **Calculate average price:** `AVG(price)`
|
| 55 |
+
- **Show rows:** return matching listings without aggregation
|
| 56 |
+
|
| 57 |
+
## Rounding and numeric handling
|
| 58 |
+
- `price` is already stored as whole dollars.
|
| 59 |
+
- When computing averages, results may return decimals.
|
| 60 |
+
- Do not round unless explicitly requested.
|
| 61 |
+
|
| 62 |
+
## Verification step (recommended)
|
| 63 |
+
If a filter may match multiple neighbourhood spellings or room types:
|
| 64 |
+
- First show matching rows to confirm exact labels before aggregating.
|
| 65 |
+
|
| 66 |
+
Example:
|
| 67 |
+
- “Show listings where neighbourhood = 'Short North' so I can confirm label before calculating.”
|
| 68 |
+
|
| 69 |
+
## Action wording (so I take the right next step)
|
| 70 |
+
Start your request with:
|
| 71 |
+
- **Calculate** / **Compute** → run aggregation and return computed results
|
| 72 |
+
- **Show** / **Filter to** → return matching listing rows
|