Genetic factors contribute to the high inter-individual variability in response to anti-epileptic drugs.
Other metabolic pathways include CYP3A4, CYP3A5, HLA-B*15:02, HLA-A*31:01 and UGT1A1.
Your genes are the main factor determining the level of these enzymes found primarily in your liver.
Population Frequency of Cytochrome P450 (CYP) Metabolizer Types 
(no or low enzyme levels)
(reduced enzyme levels)
(normal enzyme levels)
*CYP2C19 variability depends on ethnicity.
Some epilepsy medications that are impacted by your genetics: