My strategy was to stay in an Airbnb in each neighborhood I liked the sound of, for a couple of days at each place. The strategy worked really well, you figure out if the place has places you like to eat, if you get on with the local transport links, if your local grocery stores are any good, what the culture is like (each neighborhood is quite different). Pro tip: book your Airbnb a few months in advance, maybe even 6 months ahead, since last minute Airbnb’s suck.
I eventually chose the the Inner Sunset. Rent prices were not a major factor for me, it was mainly about getting to work in the morning, and whether or not I liked the vibe.
Alternatively if you want to save some money you could stay with friends in each neighborhood, or use a couch surfing site (e.g. couchsurfing.com). Find an excuse to visit at least ten different neighborhoods at each corner of the city, doing day to day things like getting coffee, grocery shopping, etc.