Managing user interaction in an ontology-based system