fix knowledge inference to use IDs, text fixes