Definitely a good question to ask the doctor. Maybe document what you see when he’s on and off the medication. Note the times when things either get better or stop working. Note why you don’t think things are working, and what was different before when the medication was effective.
Some generics are not as effective as others, so that could be an issue too.
Mostly I’d advise talking more with the doctor and pointing out specific examples of what concerns you have. General statements of, “it’s not working” usually are met with resistance. Being able to cite specific behaviors can sometimes be helpful to providers in making adjustments.