View source: R/fine_tune_data.R
create_fine_tune_data | R Documentation |
This function creates the initial data that can be used to fine tune models from OpenAI.
create_fine_tune_data(data, prompt, studyid, title, abstract)
data |
Dataset containing the titles and abstracts. |
prompt |
Prompt(s) to be added before the title and abstract. |
studyid |
Unique Study ID. If missing, this is generated automatically. |
title |
Name of the variable containing the title information. |
abstract |
Name of variable containing the abstract information. |
A dataset of class 'fine_tune_data'
.
The dataset contains at least the following variables:
studyid | integer/character/factor | indicating the study ID of the reference. |
title | character | indicating the title of the reference. |
abstract | character | indicating the abstract of the reference. |
question | character | indicating the final question sent to OpenAI's GPT API models for training. |
save_fine_tune_data()
# Extract 5 irrelevant and relevant records, respectively.
dat <- filges2015_dat[c(1:5, 261:265),]
prompt <- "Is this study about functional family therapy?"
dat <-
create_fine_tune_data(
data = dat,
prompt = prompt,
studyid = studyid,
title = title,
abstract = abstract
)
dat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.