Make the cookies: Beat the butter and both sugars with a mixer until creamy. Beat in the milk and vanilla until combined. In a medium bowl, whisk the flour, cocoa, salt and baking soda. With the mixer on low speed, slowly add the dry ingredients to the butter mixture and beat until combined. Stir in the chocolate chips, if desired. Scoop the dough onto a sheet of wax paper
and shape into a 2-inch-thick log. Wrap in the wax paper and refrigerate at least 2 hours or overnight.
Preheat the oven to 350 degrees. Line a baking sheet with parchment paper. Slice the dough into 1/3-inch-thick rounds with a sharp knife. Place on the prepared baking sheet and bake 10 minutes. Cool the cookies for a few minutes on the baking sheet, then transfer to a rack to cool completely.
Meanwhile, make the filling: Combine 3/4 cup pistachios, the mascarpone, ricotta, confectioners' sugar, vanilla and salt with a mixer on low speed until just blended; do not overmix or the filling will be too thick. (It can be prepared a day ahead and refrigerated.)
To assemble, sandwich about 1/2 inch filling between 2 cookies. Repeat with the remaining cookies and filling. Roll the edges in the remaining 3/4 cup pistachios.
Photograph by Jim Franco
Recipe courtesy Ted Allen for Food Network Magazine