Modeling longer contexts and retrieving relevant knowledge can reduce contradictions and improve logical coherence for AI.