England bowler Stuart Broad took 5-73 for Nottinghamshire but centuries from George Bartlett and Tom Abell put Somerset in control on day two.
Resuming on 74-3, Abell made 101 and Bartlett scored a career-best 133 as they added 223 for the fourth wicket.
Lewis Gregory's run-a-ball 50 helped the visitors to maximum batting points, but Broad took the last three wickets to dismiss Somerset for 403.
Notts closed on 25-2 in their second innings, still trailing by 115 runs.
The hosts faced a testing nine overs at the end of the day and lost Ben Duckett for four and Chris Nash for a 10-ball duck, with Jack Brooks taking 2-8 in four overs.
Earlier, Bartlett and Abell, who had come together on Thursday evening with Somerset in some trouble on 36-3, frustrated Notts for all of the morning session and much of the afternoon.
Their partnership was finally ended when Abell was late in driving Luke Wood and edged behind to Tom Moores.
Bartlett, 21, spent five hours at the crease as he passed his previous highest score of 110, but eventually left a delivery from Luke Fletcher (3-66) alone and saw his off-stump flattened.
Gregory, who took 6-68 with the ball on day one, then smashed three sixes and four fours - with two successive maximums off Broad - as he made a quickfire half-century.
Broad took three wickets in seven balls to finish off the Somerset innings, but the damage had already been done and the visitors are well placed to make it two wins from two to start the season.