Adding specific information to file output
You can add an application handler to be run before rendering that sets the output filename with the desired information. You can use python's string format to fill in the filename from a template string.

import bpy

def set_filepath(scn):
    scn.render.filepath = '//renders/animation_{0:04}-{1}.jpg'.format(
            scn.frame_current, scn.cycles.samples)

bpy.app.handlers.render_pre.append(set_filepath)


By pasting this into a text block in blender and adjusting the filename for the file, it can then be setup to run when the blend file is opened so that it will always be available when using the file.

Note that the handler will set the filename, that means you adjust the filename in the script - not in the render settings.