All generic medications must undergo certain tests to compare them to brand-name medications. The U.S. Food and Drug Administration (FDA) then looks at these tests to decide if the generics are equivalent to the brand-name medications and assigns each generic a rating. An "AB" rating means that the FDA has determined that a generic medication is equivalent to a brand-name medication. Generic valacyclovir has an "AB" rating, meaning it should be equivalent to Valtrex.
However, generic medications are allowed to have different inactive ingredients than the brand-name medication. This might include fillers, dyes, or other ingredients that may cause problems for people with allergies or sensitivities.