Integrating and testing AI query