AI Cost Function Framework