Learning by Demonstration provides a sample efficient way to equip robotswith complex sensorimotor skills in supervised manner. Several movementprimitive representations can be used for flexible motor representation andlearning. A recent state-of-the art approach is Conditional Neural MovementPrimitives (CNMP) that can learn non-linear relations between environmentparameters and complex multi-modal trajectories from a few expertdemonstrations by forming powerful latent space representations. In this study,to improve the applicability of CNMP to changing tasks and/or environments, wecouple it with a reinforcement learning agent that exploits the formedrepresentations by the original CNMP network, and learns to generate syntheticdemonstrations for further learning. This enables the CNMP network togeneralize to new environments by adapting its internal representations. In thecurrent implementation, the reinforcement learning agent is triggered when afailure in task execution is detected, and the CNMP is trained with the newlydiscovered demonstration (trajectory), which shares essential characteristicswith the original demonstrations due to the representation sharing. As aresult, the overall system increases its capacity and handle situations inscenarios where the initial CNMP network can not produce a useful trajectory.To show the validity of our proposed model, we compare our approach withoriginal CNMP work and other movement primitives approaches. Furthermore, wepresents the experimental results from the implementation of the proposed modelon real robotics setups, which indicate the applicability of our approach as aneffective adaptive learning by demonstration system.