A method of adaptively performing service function chaining based on network context, the method comprising: receiving, by a network device , a request for provisioning a service function chain of a plurality of service functions , wherein the request comprises at least a flexible service function chain template ; determining, by the network device , a service function path responsive to a receipt of data packets to be transmitted over the network, based on at least the flexible service function chain template , a current network context, one or more network estimation inputs , and historical network data , wherein the data packets correspond to a pre-defined flow of data packets; monitoring, by the network device , a pre-defined plurality of parameters associated with the service function path and a network context after implementing the service function path, wherein the monitoring corresponds to a periodic monitoring or an aperiodic monitoring; identifying, by the network device , a requirement for modification of the service function path based on the monitoring of the pre-defined plurality of parameters and service function path modification criteria; modifying, by the network device , the service function path responsive to the identification; monitoring, by the network device , the performance of the modified service function path based on one or more of the pre-defined plurality of parameters associated with the modified service function path, the network context after modifying the service function path, and a pre-defined plurality of performance thresholds, the method being characterised by adapting, by the network device , the service function path modification criteria and the flexible service function chain template , based on the monitored performance of the modified service function path and/or performance of historically modified service function paths, and wherein the adaptation is performed based on application of machine learning algorithms on the monitored performance. receiving, by a network device , a request for provisioning a service function chain of a plurality of service functions , wherein the request comprises at least a flexible service function chain template ; determining, by the network device , a service function path responsive to a receipt of data packets to be transmitted over the network, based on at least the flexible service function chain template , a current network context, one or more network estimation inputs , and historical network data , wherein the data packets correspond to a pre-defined flow of data packets; monitoring, by the network device , a pre-defined plurality of parameters associated with the service function path and a network context after implementing the service function path, wherein the monitoring corresponds to a periodic monitoring or an aperiodic monitoring; identifying, by the network device , a requirement for modification of the service function path based on the monitoring of the pre-defined plurality of parameters and service function path modification criteria; modifying, by the network device , the service function path responsive to the identification; monitoring, by the network device , the performance of the modified service function path based on one or more of the pre-defined plurality of parameters associated with the modified service function path, the network context after modifying the service function path, and a pre-defined plurality of performance thresholds, the method being characterised by adapting, by the network device , the service function path modification criteria and the flexible service function chain template , based on the monitored performance of the modified service function path and/or performance of historically modified service function paths, and wherein the adaptation is performed based on application of machine learning algorithms on the monitored performance. <EOS>