Structuring data for my GraphQL query

Hi I am trying to make sure that my AI agent can parse a relevant search term from chat and execute GraphQL query on that. I notice that with the AI model setting on a GraphQL node there is a lot of inconsistency and issues.

I am now trying to use an information extractor to structure the raw chat data into e.g. a search term for the query. How do I ensure that first the information is extracted, then if relevant, the GraphQL query executes and then the AI agent can use the output to say something meaningful instead of raw data?

Or how do I ensure my variable field ‘term’ is filled by the AI agent intelligently?