<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Should I wait for the tram? Adding agents to a live Helsinki transit app on Databricks (part 2) in Community Articles</title>
    <link>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/173616#M1834</link>
    <description>&lt;P&gt;Thanks for sharing this insightful app&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2026 12:48:05 GMT</pubDate>
    <dc:creator>Akanksha0206</dc:creator>
    <dc:date>2026-10-16T12:48:05Z</dc:date>
    <item>
      <title>Should I wait for the tram? Adding agents to a live Helsinki transit app on Databricks (part 2)</title>
      <link>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/173060#M1824</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Part 2 of my Helsinki live transit project is out. In part 1 I built a Databricks App that follows every tram and metro train in Helsinki in real time: a Lakeflow pipeline on HSL's live MQTT feed, Lakebase behind the live map, and a Genie space for questions. This time I added two agents on top of it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Bike, walk or wait&lt;/STRONG&gt;: pick two tram stops, and it compares the next tram with walking and a city bike, checks the weather forecast, and tells you what to do.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Bunching spotter&lt;/STRONG&gt;: finds trams of the same route running almost together, using the time between departures from the same stop.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What the post covers:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The model doesn't make the decision. The wait/walk/bike choice is a small Python rule with unit tests. The model picks the tools and explains the result, so a different model can change the wording but not the advice.&lt;/LI&gt;&lt;LI&gt;The tools are Unity Catalog functions, governed with GRANT and callable from SQL, notebooks or Genie. Python UC functions have no network access, so the weather and journey planner tools are SQL functions that call http_request through UC HTTP connections, with the API key kept in a secret scope.&lt;/LI&gt;&lt;LI&gt;The agent loop runs inside the Databricks App: about a hundred lines of tool calling against a Foundation Model API endpoint (databricks-gpt-oss-120b). Each tool runs as a parameterised query on a SQL warehouse, so the model never writes SQL.&lt;/LI&gt;&lt;LI&gt;The pipeline from part 1 adds a second opinion: the tram the journey planner suggests is joined to the lateness we measured from its own position reports seconds earlier.&lt;/LI&gt;&lt;LI&gt;Defining "bunching" took two attempts, because real data (trams logged two hours late, short demo runs) broke the first definition within minutes.&lt;/LI&gt;&lt;LI&gt;With the feed switched off, an empty tool result made the model say confidently that there was no bunching. The fix went into the tool, not the prompt: it now always says whether the feed is live.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Full story on Medium:&lt;/STRONG&gt; &lt;A href="https://medium.com/@sumesh.kashyap90/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki-transit-app-on-databricks-949f4cc97ce1" target="_blank" rel="noopener"&gt;https://medium.com/@sumesh.kashyap90/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki-transit-app-on-databricks-949f4cc97ce1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code on GitHub:&lt;/STRONG&gt; &lt;A href="https://github.com/SumeshKashyap/Helisinskis_trams_using_Databricks_apps_lakebase" target="_blank" rel="noopener"&gt;https://github.com/SumeshKashyap/Helisinskis_trams_using_Databricks_apps_lakebase&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Part 1 (the live app itself):&lt;/STRONG&gt; &lt;A href="https://medium.com/@sumesh.kashyap90/following-helsinkis-trams-in-real-time-a-databricks-build-story-637ac9fa9ac6" target="_blank" rel="noopener"&gt;https://medium.com/@sumesh.kashyap90/following-helsinkis-trams-in-real-time-a-databricks-build-story-637ac9fa9ac6&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Happy to answer questions. I'd also like to hear how others split decisions between rules and models in their agents.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2026 20:03:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/173060#M1824</guid>
      <dc:creator>SumeshKashyap</dc:creator>
      <dc:date>2026-10-13T20:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Should I wait for the tram? Adding agents to a live Helsinki transit app on Databricks (part 2)</title>
      <link>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/173616#M1834</link>
      <description>&lt;P&gt;Thanks for sharing this insightful app&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2026 12:48:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/173616#M1834</guid>
      <dc:creator>Akanksha0206</dc:creator>
      <dc:date>2026-10-16T12:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Should I wait for the tram? Adding agents to a live Helsinki transit app on Databricks (part 2)</title>
      <link>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/174054#M1844</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/192097"&gt;@SumeshKashyap&lt;/a&gt;&amp;nbsp;Thanks for writing this up, and for the question at the end. I found it interesting enough that I ran an experiment on it.&lt;/P&gt;&lt;P&gt;I set up bike, walk or wait inputs like the ones your agent gets back from its tools (16 scenarios over six Helsinki trips) and ran them two ways on Databricks Free Edition. One was your split: a Python rule makes the call and the model explains it. The other was the opposite: the model makes the call from the same policy, written out in words. Three models took turns: databricks-gpt-oss-120b, Llama 4 Maverick and Llama 3.1 8B.&lt;/P&gt;&lt;P&gt;The experiment results suggest keeping the call in the rule, as your agent does. With the rule deciding, all three models gave the same advice on all 16 scenarios and only the wording changed, which is what you said would happen. With the models deciding, they agreed on 3 of 16. gpt-oss-120b matched the rule on 47 of 48 answers, Maverick on 24 and the 8B on 9.&lt;/P&gt;&lt;P&gt;Your feed-live fix held up too. With the tram feed down, 22 of 36 model answers still said to wait for the tram. The flag mattered most for gpt-oss-120b, which never said wait on a feed flagged as down. Maverick still did on 3 of 6 and the 8B on all 6.&lt;/P&gt;&lt;P&gt;Write-up: &lt;A href="https://medium.com/lab-notes/rule-or-model-in-a-databricks-agent-three-models-agreed-on-3-of-16-calls-d5ee16298ef4" target="_blank"&gt;https://medium.com/lab-notes/rule-or-model-in-a-databricks-agent-three-models-agreed-on-3-of-16-calls-d5ee16298ef4&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Notebook (runs on Free Edition in about ten minutes): &lt;A href="https://github.com/gnakan/databricks-notebooks/blob/main/experiments/tram-agent-decision/tram-agent-decision.ipynb" target="_blank"&gt;https://github.com/gnakan/databricks-notebooks/blob/main/experiments/tram-agent-decision/tram-agent-decision.ipynb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2026 13:40:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/should-i-wait-for-the-tram-adding-agents-to-a-live-helsinki/m-p/174054#M1844</guid>
      <dc:creator>gnakan</dc:creator>
      <dc:date>2026-10-20T13:40:31Z</dc:date>
    </item>
  </channel>
</rss>

