I have been trying to build a chatbot with custom knowledge base. However, after fine tuned a few thousand lines of Q&A data, I found the davinci model is not able to give any relevant answers. So I create a very simple test to see whether information can be picked up by davinci. However, it’s still not working. Can someone please point out what I did wrong? Thanks!
Here is my test data
cat test2_prepared.jsonl
{“prompt”:“what’s bio123tech’s company address?”,“completion”:“bio123tech’s address is 1 main road mytown.”}
{“prompt”:“what does bio123tech do?”,“completion”:“bio123tech provides dna sequencing services to the general public.”}
{“prompt”:“where was bio123tech found?”,“completion”:“bio123tech was found in the madeupplace.”}
upload the file
openai api files.create -f test2_prepared.jsonl -p fine-tune
Upload progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 326/326 [00:00<00:00, 36.1kit/s]
{
“bytes”: 326,
“created_at”: 1679715719,
“filename”: “test2_prepared.jsonl”,
“id”: “file-oTOEm8Yyq8SKBQU2VeM2Ppn5”,
“object”: “file”,
“purpose”: “fine-tune”,
“status”: “uploaded”,
“status_details”: null
}
fine tune
openai api fine_tunes.create -m davinci -t “file-oTOEm8Yyq8SKBQU2VeM2Ppn5”
Created fine-tune: ft-4MCWZxaPkSZWsNduTugSYLnh
Streaming events until fine-tuning is complete…
(Ctrl-C will interrupt the stream, but not cancel the fine-tune)
[2023-03-25 11:45:11] Created fine-tune: ft-4MCWZxaPkSZWsNduTugSYLnh
Stream interrupted (client disconnected).
To resume the stream, run:
openai api fine_tunes.follow -i ft-4MCWZxaPkSZWsNduTugSYLnh
~/chatbot# openai api fine_tunes.follow -i ft-4MCWZxaPkSZWsNduTugSYLnh
[2023-03-25 11:45:11] Created fine-tune: ft-4MCWZxaPkSZWsNduTugSYLnh
[2023-03-25 11:47:15] Fine-tune costs $0.01
[2023-03-25 11:47:15] Fine-tune enqueued. Queue number: 0
[2023-03-25 11:47:16] Fine-tune started
[2023-03-25 11:49:09] Completed epoch 1/4
[2023-03-25 11:49:10] Completed epoch 2/4
[2023-03-25 11:49:11] Completed epoch 3/4
[2023-03-25 11:49:12] Completed epoch 4/4
[2023-03-25 11:49:49] Uploaded model: davinci:ft-personal-2023-03-25-03-49-49
[2023-03-25 11:49:50] Uploaded result file: file-zoKVTT6QfmQcP1xBwlpKHhfz
[2023-03-25 11:49:50] Fine-tune succeeded
Job complete! Status: succeeded
Try out your fine-tuned model:
openai api completions.create -m davinci:ft-personal-2023-03-25-03-49-49 -p <YOUR_PROMPT>
testing
~/chatbot# openai api completions.create -m davinci:ft-personal-2023-03-25-03-49-49 -p “what’s bio123tech’s company address?”
what’s bio123tech’s company address? Google for , <State
~/chatbot# openai api completions.create -m davinci:ft-personal-2023-03-25-03-49-49 -p “what does bio123tech do?”
what does bio123tech do?
We provide a local contact for your Health and Life Sciences to Business Solutions
~/chatbot# openai api completions.create -m davinci:ft-personal-2023-03-25-03-49-49 -p “where was bio123tech found?”
wwhere was bio123tech found?
At the fork when bio123tech killed the grimm blocking the way