Reasoning in context for AI Applications