While traditional agriculture focuses on food production, pharming specifically involves the genetic modification of crops or livestock to produce pharmaceuticals or other valuable compounds.