Hacker News new | past | comments | ask | show | jobs | submit login

I'm struggling to work out why this uses AI for getting the weather?

There are dozens of different free weather APIs which could be called directly.




It uses AI for some things you can't really use free APIs for:

- Turn a colloquial name for a neighborhood into the exact latitude and longitude (I'm sure there's some API that can kind of do this but I don't know a free one that is as accurate as GPT)

- Adding to the previous point, if you say "Hogwarts" or "Tatooine" it will dutifully give you the weather of those too thanks to AI [1]

- Most importantly, write a Dall-E compatible prompt to generate an image with the actual weather conditions (and sun/moon etc)

[1]: https://x.com/blixt/status/1724099967361462714


From your first point, I'd expect you to be using a service that provides the weather for a given latitude and longitude.

From your second point, I'd have expected that to fail for Hogwarts or Tatooine.

Taken together, it sounds like you're blindly trusting the coordinates generated by AI, and will happily generate correct-looking results for any input. I'd call that hallucinating the weather. If I type in "Springfield" I'm gonna get results but I'm not gonna know if they're mine.

This may be an unreasonable level of concern for a fun app.


I do use a service for getting the weather (backend: https://github.com/blixt/sol-mate)

Yeah the second part I consider a bonus. Especially because I can use street names or slang for locations that no rigid API supports.

> Taken together, it sounds like you're blindly trusting the coordinates generated by AI

Actually I guess I do "blindly" trust the AI's coordinates more than a traditional location search service. Not sure how much you've tested it yourself, but I haven't gotten a single false latitude/longitude pair from GPT-4 unless the location was truly ambiguous, in which case it would be one of them. But as a European, I've definitely experienced rigid APIs happily giving me the weather for "Stockholm, NY" which apparently does exist, but wouldn't have been my first option...

But yeah, it is just a fun app, so I wouldn't want to make it more rigid either way!


Have you stress tested it? "Springfield" is a very common name in the US. I'd love to know how it handles "Sandwich" as well.

Again, probably overboard for a fun app!


They're fair questions, and yeah it will have to disambiguate in such cases. I tried it now and it picked:

- Springfield in Illinois

- Sandwich in Massachusetts (the exact coords: https://www.google.com/maps/place/41%C2%B045'31.0%22N+70%C2%...)

I think that people underestimate how much non-AI technology fails in these cases. And the recovery path is to retry with more specificity in either case.


> I think that people underestimate how much non-AI technology fails in these cases.

That's an excellent point!

Just browsed through your code and I see that you're calculating the positions of the sun and moon. Very cool! Really fun project!


Of these, only the first one actually has any real value. And as you've mentioned there are likely less "expensive" ways to do so. By expensive, I mean this is essentially using a sledgehammer to crack a nut (especially the Dall-E call).


I don't understand how I would get a unique but accurate prompt that makes Dall-E produce an image that besides the weather/lighting conditions also has a randomly picked iconic scene for the location, people in the picture that have the correct clothing and doing reasonable activities, etc.

I'm trying to understand the criticism here, so please give the GPT a shot with a few different locations (you can also do neighborhoods or fictional locations) and describe how this is a nut that can be cracked with non-LLM solutions:

https://chatgpt.com/g/g-QIydQSFRm-sol-mate


If your goal was wanting to use AI image generation to create such an image, this makes sense.

I think people are just questioning the assumption that such a feature is a desirable or necessary feature of a weather display.

I definitely was a bit surprised to open the repo to a weather display and see the need for an OpenAI key without an explanation of which features were AI-powered.

But of course this is a personal project, so "Generate a representative AI image using the location and weather information" is a perfectly valid, and cool, challenge to set yourself and achieve.


Google images? You could run a classifying model if you wanted to segment by time of day and weather.


Moistere Vapeers, very believable.


It’s a very useful line to have on a CV.


Or you can just look at the window.


My favorite is the weather station consisting of a rock sitting in a dish suspended by a chain. If rock is wet, it is raining. If rock is moving it is windy. If you can't see rock, it is night. If rock casts a shadow, it is sunny



Thanks! I should have known that it would have a wiki entry. Although, I think some of the rules are a bit meh. "if rock is warm" you're not meant to need to touch it as it's meant for a quick glance kind of tool. also, as it mentions, the rock is a finely tuned instrument, so thank you for not touching.


if the rock is gone....tornado.


I appreciate that it's just a nice picture that happens to update with the weather, but there's no reason to only use this for your current physical location. It accepts any place in the world (and also fictional places), so you could see a picture of what it looks like where your distant family member or friend is, among many other things.


When I look at the weather app, I don't need to know what the weather is now but what the weather will most likely be later when I'm outside.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: