CREATE MODEL
statement triggers MindsDB to generate an AI table called question_answering_model
that uses the OpenAI integration to predict a column named answer
. The model lives 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 USING
clause 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.CREATE MODEL
statement has started execution, we can check the status of the creation process with the following query:
questions
table is used to make batch predictions. Upon joining the question_answering_model
model with the questions
table, the model uses all values from the article_title
and question
columns.