aityx Demo Day: Holiday Split

Happy holidays! The trip was great, the turkey was better, and now someone has to work out who owes what. In this aityx Demo Day, Holiday Split does it straight from the family group chat. It was built by Juliana Conti and Julio Faerman.

aityx Demo Day: Holiday Split. Thanksgiving at Mom's, read from the group chat and settled by the house rules, with every aityx call on screen (5 minutes).

Key takeaways

  • Start from the group chat. Write the trip the way the family would: who came, who bought what, who doesn’t drink, whose house it was.
  • A small model reads it, on your device. A language model in the browser turns the chat into lists of people, ages and expenses, and every line can be checked and fixed.
  • aityx answers what only language can tell. For each adult: does the chat say they won’t pay? Does it say they don’t drink? Each answer is a probability, and 80% or more counts.
  • The house rules do the math. Kids up to 5 stay free, up to 12 pay half, drinks are split among the people who drink, and everyone pays a week before. The rules are a decision model on aityx, so the same trip gets the same answer every time.
  • Every line says why. Each person’s receipt marks every line as a house rule or as something aityx read, and the calls themselves are on the page.
  • Play it now at aityx.ai/demos/holidaysplit, or read the code in aityx-labs/aityx-demos.

Thanksgiving at Mom’s

Holiday Split has three trips to pick from: Thanksgiving, Christmas and New Year’s. The video plays Thanksgiving at Mom’s, a small one. This is the chat the family wrote:

Thanksgiving at Mom’s on Nov 26.

Mom bought the turkey and groceries, $310, and says she’s not paying a cent, it’s her house. Carlos brought wine, $95. Bea made the pies, $48, and doesn’t drink.

Bea’s partner Sam is coming. Uncle Joe brings his kids, Nina (3), Theo (8) and Ava (15).

Under the chat are the lists the split is made from: the adults and whether they drink, the kids with their ages and who they came with, and the expenses with who paid. For the sample trips, these lists come with the story.

Then the chat can change. In the video, Julio adds a line to it: Julio is coming with a lot of beer, $333 of it.

The chat into lists

When the chat changes, Split it reads it again into the lists. That happens right here in the browser, with a small language model: Gemini Nano in Chrome, and a model run by transformers.js in other browsers. It costs nothing, and the chat doesn’t leave the device for it. In the recording it took 30 seconds. The answer is then checked against the chat’s own words, so an age or an amount that isn’t in the chat doesn’t sneak in.

This is what it found:

  • 6 adults: Mom, Carlos, Bea, Sam, Uncle Joe and Julio.
  • 3 kids: Nina (3), Theo (8) and Ava (15), all with Uncle Joe.
  • 4 expenses: turkey and groceries, $310 (Mom), wine, $95 (Carlos, drinks), pies, $48 (Bea), and beer, $333 (Julio, drinks).

As the video says, this isn’t the cool part. A small model is good enough to pull names and numbers out of a paragraph, and the lists are on the page to check. The money is another matter.

aityx reads who isn’t paying

Next, aityx reads the chat, with one question per adult for what only language can tell: does the chat say they won’t pay? And for each adult who could drink: does it say they don’t? Six adults, so twelve questions in one call. This is Mom’s first question, as the app sends it:

"mom_not_paying": {
  "type": "noul",
  "instructions": "Does message say that Mom (id mom in people) will not pay a share of the trip costs? Do not calculate amounts or apply split rules.",
  "criteria": {
    "true": "The message says Mom won't pay or contribute, for example because it is their house or the group is treating them.",
    "false": "The message says Mom pays like everyone else, or does not say Mom won't pay."
  }
}

The question asks for a probability, not a calculation. aityx read 83% that Mom isn’t paying. That clears the 80% bar, so Mom sits out and the others cover her share. It read that Bea doesn’t drink too, so she’s left out of the wine and the beer. The whole call took under a second.

aityx gives the probability, and the app decides what counts: 80% or more, the same bar for every trip. What it marks is only a starting point. Under Who doesn’t pay? in the house rules, anyone can be marked or unmarked by hand, and that wins over what aityx read.

The house rules do the math

When it comes to math and dates, a language model is not the most reliable thing to ask. So the second aityx call has no questions and no AI. It sends the house rules, a decision model, with the trip, and aityx settles it: who pays whom, how much, by when, and a receipt for everyone, down to the rounding. In the recording it took 283 ms.

The house rules are on the page to change:

  • Kids up to age 5 stay free.
  • Kids up to age 12 pay half. Older kids pay a full share.
  • Drinks are paid by the people who drink, or by all adults.
  • Everyone pays 7 days before the trip.
  • Who doesn’t pay? Mom, already marked from what aityx read.

The first four, and whether shares are weighed by nights stayed, are constants of the decision model, written in from the page and sent in every call. Who doesn’t pay is sent with the trip:

"free_age":              { "desc": "Kids at or below this age stay free", "expr": "5" },
"half_age":              { "desc": "Kids at or below this age pay half", "expr": "12" },
"split_by_nights":       { "desc": "Weigh every share by nights stayed?", "expr": "true" },
"drinkers_split_drinks": { "desc": "Split drinks only among the people who drink?", "expr": "true" },
"pay_days_before":       { "desc": "Days before the trip that transfers are due", "expr": "7" }

Change one and aityx settles the trip again, in milliseconds. The chat hasn’t changed, so there’s nothing to read again: only the rules run.

Uncle Joe’s receipt

Uncle Joe didn’t buy anything, but he brought three kids, so he pays the most. His receipt, as aityx settled it:

Line Why Amount
Turkey & groceries house rule: split evenly $41.33
Wine aityx read this: shared by the 5 people who drink $19.00
Pies house rule: split evenly $6.40
Beer aityx read this: shared by the 5 people who drink $66.60
For Nina, 3 house rule: kids up to 5 stay free $0.00
For Theo, 8 house rule: kids up to 12 pay half $23.87
For Ava, 15 house rule: over 12, full price $47.73
Your part of Mom’s share aityx read this: Mom doesn’t pay, split 5 ways $26.67
You owe Pay to Mom by Thu, Nov 19 $231.60

Every number can be checked by hand. The food is shared by six adults and the kids who pay: Nina counts for nothing, Theo for half a share and Ava for a full one, so 7.5 shares, and $310 / 7.5 is $41.33. The drinks are shared only by the five adults who drink, so the beer is $333 / 5 = $66.60 each. Mom’s own share, $133.33, is spread over the five adults who pay. And the trip starts on Thursday, Nov 26, so everyone pays by Thursday, Nov 19, a week before.

The rest of the family’s receipts settle the same way. Mom gets her $310 back, and Julio gets back $173.00: the $333 of beer minus his own $160.00 share. The largest debts settle the largest credits first:

  • Uncle Joe pays Mom $231.60.
  • Sam pays Mom $78.40 and Julio $81.60.
  • Carlos pays Julio $65.00.
  • Bea pays Julio $26.40.

One button copies who pays whom for the group chat, and another copies a receipt as an image, for anyone who asks “why do I owe that?”

Read the calls

Step 5 on the page, See the aityx call, shows what was sent and what came back, with Key parts for the parts worth reading and Full JSON for the rest. The house rules are in the request, next to the trip: every adult, every kid with their age and who they came with, and every expense. The response is the answer the page shows: who pays whom, how much, and for what, line by line. It’s the same call you’d see in the browser’s developer tools.

Bigger trips

Thanksgiving at Mom’s is the easy one. The other two trips have more people and more rules:

  • Christmas at the cabin: twelve people, five nights in the Smokies. Uncle Ray and his son Ben come late, Zoe, 16, pays full, and Grandma Rose and Ana skip the drinks.
  • New Year’s at the lake: complete mayhem. Chris turns 40 and doesn’t pay, five people come late or leave early, and Lina, 19, can’t drink yet.

Your turn

Holiday Split puts each part of the job where it belongs. A small model on your device reads the chat into lists you can check. aityx answers the questions that need language, with a probability you can set a bar for. And the money is settled by rules you can read, the same way every time, with a receipt that says why.

  1. Play Holiday Split at aityx.ai/demos/holidaysplit. Get a key in the console with your email, no approval needed. Without a key, you see the real aityx calls we recorded for each trip.
  2. Change a rule. Make four-year-olds pay half, or split the drinks among all adults, and watch every receipt change.
  3. Write your own trip. Rewrite the chat, press Split it, and check what was read.
  4. Read the model in aityx-labs/aityx-demos, next to the calls the app shows.
  5. Catch up on the first Demo Day, Cellfie, and write your own decision with Building with aityx.

Happy holidays, and see you at the next Demo Day.


Play Holiday Split at aityx.ai/demos/holidaysplit, read the code in aityx-labs/aityx-demos, and read Building with aityx to write your own decision. Questions, capacity needs or feedback: [email protected].