insertOne
method triggers MindsDB to generate an AI collection called question_answering
that uses the OpenAI integration to predict a field named answer
. The model is created inside the default mindsdb
project. In MindsDB, projects are a natural way to keep artifacts, such as models or views, separate according to what predictive task they solve. You can learn more about MindsDB projects here.
The training_options
key specifies the parameters that this handler requires.
engine
parameter defines that we use the openai
engine.prompt_template
parameter conveys the structure of a message that is to be completed with additional text generated by the model.insertOne
method has started execution, we can check the status of the creation process with the following query:
questions
collection is used to make batch predictions. Upon joining the question_answering
model with the questions
collection, the model uses all values from the article_title
and question
fields.