SAN FRANCISCO — Midlevel associates in San Francisco and Silicon Valley have a better outlook on their jobs than they have in years and report slightly higher levels of job satisfaction on average than their peers nationwide.

The findings, based on the 2014 Associates Survey by The American Lawyer, an ALM sister publication, slot Silicon Valley as the 19th happiest job market for third- to fifth-year lawyers and San Francisco as the 21st. Associates scored their firms on a variety of criteria, including their interest in the work, training opportunities, billable hour expectations and transparency about firm operations and partnership prospects.