1. Test Your Fine-Tuned Model via CLI
Use theopenai api completions.create command and specify your fine-tuned model’s ID, which you can copy from the fine-tuning job output:
Replace the model ID with your own fine-tuned model name. You can find it in the CLI output or in your OpenAI Dashboard.
2. Fine-Tuning Workflow Overview
Here’s a quick summary of the end-to-end fine-tuning process:
For detailed instructions, see the OpenAI Fine-Tuning Guide.
3. Test Your Model in Python
This Python example demonstrates:- Configuring your API key
- Adding a suffix to control responses
- Looping through multiple prompts
- Printing questions with answers
Key Parameters
4. Why This Approach Works
- Self-contained inference: The model depends solely on its fine-tuned parameters—no external context injection.
- Controlled output: A suffix forces the model to admit uncertainty, preventing hallucinations.
- Batchable prompts: Easily loop through multiple questions without managing conversational state.