parse response from AI