RAG is not perfect especially for certain prompts. for your two questions below:
Query: "Count the number of users subscribed to the Free plan." Actual: Incorrect count is returned. The ai search only returns top matched results typically, you can increase the setting but not always all records would be returned
Query: "List users in the Starter plan without any tracks or projects" Actual: Incorrect users or an incomplete list. same reason for incomplete list as #1. for incorrect users, ai search would try to find records by semantic search. the best way to investigate is to inspect which json records are returned from ai search or test it out via ai search UI in portal.
For these kind of questions, my best suggestion is to look into function calling. LLM will invoke the function calling (if found relevent) and pass relevant parameters, then you can implement the function calling logic to query the data (e.g. pull full list of uses back based on plan name).