Text completion
Code completion
Image Generation
Fine-tuning
Embeddings
Moderation
Rate Limits
Error Codes
Safety best practices
Production best practices
Text Completion: its success generally depends on the complexity of the task and quality of your prompt. Prompt Engineering is critical since we want it to help solve complex problems. And the rule of thumbs are:
Show and tell. Make it clear what you want either through instructions, examples, or a combination of the two. If you want the model to rank a list of items in alphabetical order or to classify a paragraph by sentiment, show it that’s what you want.
Provide quality data. If you’re trying to build a classifier or get the model to follow a pattern, make sure that there are enough examples. Be sure to proofread your examples — the model is usually smart enough to see through basic spelling mistakes and give you a response, but it also might assume this is intentional and it can affect the response.
Check your settings. The temperature and top_p settings control how deterministic the model is in generating a response. If you’re asking it for a response where there’s only one right answer, then you’d want to set these lower. If you’re looking for more diverse responses, then you might want to set them higher.
In this topic, what relevant for me is to explore the classification function. I may need to have access to certain facility such as Patterns and Co:here to feed large set of data/files and fine-tune it.
According to chatGPT itself, openAI provides such API interface, the steps are
- Sign up for an OpenAI API key: You can sign up for a free API key at the OpenAI website.
- Choose a programming language: The OpenAI API provides client libraries in several programming languages, including Python, JavaScript, and others. You can choose the language that best fits your needs.
- Install the OpenAI API client library: You will need to install the OpenAI API client library for the programming language you have chosen. The library provides a simple interface for making API requests.
- Write code to send text data to the API and receive the results: You can use the API client library to send the text data from your files to the API and receive the results. You will need to write code to parse the results and generate the taxonomy based on the contents of the text data.
- Deploy the code: Once you have written the code, you can deploy it to a server or a local environment and run it to generate the taxonomy.
then jump to the API reference for next blog…