How to create Modal for my shopify products

I want to create modal that give me products according to user’s input . I have tried this with davinci and gpt-35-turbo Modal . Its works but not giving result as my expectations . IT gives results only if I enter correct prompt or user input as I defined in jsonl file. How can I make it work with every user promt not just predefined in file.