Generate Graphql queries with AI

Generate Graphql queries with AI


0

I’m trying to create a model that generates the GraphQL query for my own GraphQL introspection schema based on user input. I’ve tried fine-tuning, but teaching it multiple cases is quite tedious, and my schema is extensive with many fields and arguments. The model should analyze the user’s input (which may not explicitly reference entities by the same name but use synonyms, so I need to teach that to my model) and return only the code.

Considering that my model should encompass my entire schema, I have attached my schema and another JSON file with examples of inputs and possible outputs to an OpenAI assistant. The pricing logic for assistants is still not very clear; there is uncertainty about whether you are also charged for computing costs in addition to the tokens accumulated in threads and the daily cost per assistant.

That said, what path do you recommend I take to achieve this, and which model would be the most suitable? I’m leaning towards fine-tuning due to cost concerns, but it will be a slow process, and I can’t pass the entire schema to the model, so it will have to learn only from examples. Thank you in advance!

I’ve tried fine-tuning, but teaching it multiple cases is quite tedious and OpenAi assistant but is expensive

New contributor

Guillermo Sanz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 2 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *