Hello @Adit Khandelwal ,
First thing you need check is cases where the chat completion gives you response properly.
As per this documentation you can see.
The chat models perform best in question and answer exercises. For example, "What are my available health plans?" or "What is the health plus option?".Queries that require data analysis would probably fail, such as "Which health plan is most popular?".Queries that require information about all of your data will also likely fail, such as "How many documents have I uploaded?". Remember that the search engine looks for chunks having exact or similar terms, phrases, or construction to the query. And while the model might understand the question, if search results are chunks from the data set, it's not the right information to answer that kind of question.
In your case the requirement is filter the documents in AI search based on the tags, for that you should be having the field to store tag values in your search index and make it Filterable.
Above I am having field Rating and made filterable, similarly you create tags field.
Below is the sample query for hotel data.
Here, i have also added system message in the left side, same kind of message you should add on your data according to your requirement.
Next, we have a deploy option which directly create a web app for you with added data source.
Please try above and if find any query do let us know in comments or private message.
Thank you