A method (1000, 1500), comprising: receiving fluid data collected while drilling a wellbore (136, 336) in a drilling operation that includes a first well section trajectory; determining, based at least in part on the fluid data, a first productivity index for a next section of the wellbore on a continued trajectory of the first well section trajectory; determining a second well section trajectory for the next section of the wellbore different from the continued trajectory of the first well section trajectory; determining a second productivity index for the second well section trajectory; characterized by determining whether the second productivity index exceeds the first productivity index, if the second productivity index exceeds the first productivity index, adjusting the drilling operation of the wellbore towards the direction of the second well section trajectory; or if the second productivity index is less the first productivity index, determining that a current iteration is a first iteration in which the second productivity index is less than the first second productivity index and continuing the drilling operation on the first well section trajectory; or determining that a current iteration is not the first iteration in which the second productivity index is less than the first productivity index and continuing the drilling operation on the first well section trajectory if the first productivity index of the current iteration is greater than the first productivity index in the previous iteration or determining to stop the drilling operation if the first productivity index of the current iteration is less than the first productivity index in the previous iteration. receiving fluid data collected while drilling a wellbore (136, 336) in a drilling operation that includes a first well section trajectory; determining, based at least in part on the fluid data, a first productivity index for a next section of the wellbore on a continued trajectory of the first well section trajectory; determining a second well section trajectory for the next section of the wellbore different from the continued trajectory of the first well section trajectory; determining a second productivity index for the second well section trajectory; characterized by determining whether the second productivity index exceeds the first productivity index, if the second productivity index exceeds the first productivity index, adjusting the drilling operation of the wellbore towards the direction of the second well section trajectory; or if the second productivity index is less the first productivity index, determining that a current iteration is a first iteration in which the second productivity index is less than the first second productivity index and continuing the drilling operation on the first well section trajectory; or determining that a current iteration is not the first iteration in which the second productivity index is less than the first productivity index and continuing the drilling operation on the first well section trajectory if the first productivity index of the current iteration is greater than the first productivity index in the previous iteration or determining to stop the drilling operation if the first productivity index of the current iteration is less than the first productivity index in the previous iteration. determining that a current iteration is a first iteration in which the second productivity index is less than the first second productivity index and continuing the drilling operation on the first well section trajectory; or determining that a current iteration is not the first iteration in which the second productivity index is less than the first productivity index and continuing the drilling operation on the first well section trajectory if the first productivity index of the current iteration is greater than the first productivity index in the previous iteration or determining to stop the drilling operation if the first productivity index of the current iteration is less than the first productivity index in the previous iteration.