Never before have the effects of new tech – and intergenerational envy – been articulated so amusingly as in Noah Baumbach’s latest movie, which also happens to be his best, and funniest, in a decade. I’d hazard it’s also his most autobiographical since 2005’s The Squid and the Whale, which starred Jesse Eisenberg as a horrific vision of the director’s teenage self, an angry and pretentious schoolboy struggling with his parents’ divorce. This one has Ben Stiller as a clenched film-maker thrilled by youth and possibility after he and wife Naomi Watts strike a friendship with mid-20s couple Adam Driver and wife Amanda Seyfried.

The film, Baumbach said at the post-screening Q&A, had been inspired by “spending a lot of time with young people” – perhaps via new partner Greta Gerwig, former mumblecore pinup, who starred opposite Stiller in Baumberg’s Greenberg (2010) and was the lead in his most recent, Frances Ha (2012), a wistful quarter-life crisis movie about the struggles of failing to create an identity in buzzing Manhattan.

By contrast, the couple here are a hipster homecoming king and queen. They live in a disused water tower in Harlem, their loft space full of vinyl, typewriters, fixies, a hen and a hot flatmate who wanders about in knickers and mordant T-shirts (“Some crappy band”; “Some college I didn’t go to”). He’s an aspiring documentarian, she makes organic artisanal ice-cream in challenging flavours.

Adam Driver and Amanda Seyfried in While We’re Young Photograph: PR

They meet Josh (Stiller) and Cornelia (Watts) after one of the former’s lectures, which he’s using to fund his new film, an eight-years in the making a documentary about the political, historical and militaristic connections of the last 50 years, majoring on a Turkish uprising, whose ambitious remit Josh struggles to pitch, usually concluding with: “It’s really about America”. Josh has deferred a lot of life to concentrate on this Casaubon-ish project, which his father-in-law (Charles Grodin) - himself an esteemed documentarian – advises is “a six-and-a-half-hour film that’s seven hours too long”.

So Josh is flattered by the fandom of Jamie (Driver), who’s seen his early work, and seeks his expertise for his own project, about the fallacy of Facebook – which the young neo-luddites dismiss but Josh has lately come round to (“it makes me feel really connected”). There’s a rich seam here mined by Baumbach for unusually (but not unwelcomely) broad comedy, about the nostalgic embrace of the younger couple as the oldies dote on their gadgets. Jamie and Darby (Seyfried) hunker down by night with an old VHS while Cornelia scans her iPad and Josh flicks through Hulu unable to find anything to watch. The older couple have meals with people their own age in which they discuss babies and check their smartphones, the latter play board games and explore disused subway tunnels.

At first all seems rosy: Josh has been energised by the connection; his marriage is back on track, maybe his movie too. But gradually fears seep in about the authenticity of Jamie’s film, which the pair are helping with, and his motive in striking up the friendship in the first place. What was charming becomes cloying, and Jamie’s ingratiation – even grooming of Josh – becomes slippery, sinister.

And so a big-laugh farce – there’s some business at a shamanic drugs night that wouldn’t be out of place in an Apatow film – moves into something more subtle about the value of truth and the limits of authenticity. There are overt nods to Woody Allen’s Crimes and Misdemeanors, both with the elderly Jewish existentialist philosopher Josh is shooting for his film, and a climactic scene at an awards ceremony.

Stiller and Grodin in While We’re Young. Photograph: PR

Yet despite this genuflect, Baumbach’s work feels as acute and timely as they come. His casting choices are razor sharp, Driver and Stiller both in their own ways emblematic of their generations; likewise the choice of Beastie Boy Adam Horovitz as a stay-at-home dad who, with his wife, is forever encouraging his Jamie and Cornelia to have children.

Given the richness of many of Baumbach’s previous female characters, Watts and Siegfried get slightly short shrift by comparison. The former is back on track after a misjudged turn as a pregnant Russian prostitute in Bill Murray comedy St Vincent, but Seyfried – in a role apparently written for Gerwig – feels vaguely discordant, more valley girl that boho chick. A line in which she reveals to Cornelia – en route to a hiphop class - that she likes kids “who don’t speak English” – would have benefited from a yet more earnestly conceited delivery.

But it’s churlish to pick holes in what is an almost perfect 90-minute hit of confident and inspired comedic commentary. Baumbach has made his most mainstream movie to date; it demands as wide a watch as possible.