while sweet potatoes can safely be eaten raw, certain types of yams are only safe to eat when cooked. naturally occurring plant proteins found in yams can be toxic and cause illness if consumed raw. peeling and cooking yams thoroughly will remove any harmful substances ( 17 ).