No, you don't have to cook the gnocchi before adding it to the Instant Pot. The mixture that you're adding it to will be hot enough to cook it just fine.