The AI Block uses ChatGPT, a Large Language Model designed and created by OpenAI. This is a new AI technology which is already useful, but in some aspects still in its early stages. Its incorporation into Omniscope is our latest attempt to further simplify designing Custom Blocks and to speed up their creation.
With all new technologies, there is a learning curve, and there is a time period in which these new technologies are made more robust and homogenous. That being said, do not be discouraged if you are having problems with the AI Block and its ChatGPT alter ego, whether it doesn't understand what you want to do, of whether it is producing code that doesn't work on the first try. There are ways to improve your results and to get to your desired outcome, which is the goal of this article.
As a general piece of advice, please read the following article "Prompt Engineering" by OpenAI which gives an overview over some important techniques when chatting with Large Language models.
In addition to these very good rules, here is some more advise:
1. Be as precise and concise as possible
You should try to give precisely as much information to the AI to be able to solve the given task, but not more. Everything you don't specify, the AI will have to choose itself. If you would like to cluster your data, but don't specify the clustering method, you will get a random one. If you then don't specify the number of clusters - or specify that the AI should figure out the number of clusters automatically - it might chose a random number.
On the other hand, if your specification is too long, too complex, and too verbose, the AI might get lost and simply ignore part of it. If some parts are more important than others, you can tell it so. If it's possible to reformulate your command to be more concise, out of sudden the AI might be able to perform it without problems the way you desire it.
2. Don't mix different topics
If you start the chat with one topic, but then switch to another, it is best to first clear the chat history and start new. At any point in the conversation, the entire chat history is given to ChatGPT to formulate a response. This means that parts that are non-relevant to the problem at hand will also be analysed, incur costs, and are able to confuse the AI by working at too many things at once.
3. Fix Custom Block errors
After instructing the AI block what block to create, and subsequently clicking on "build & execute", it is possible that the block doesn't execute as expected and an error is shown. This happens when the AI creates incorrect code. This can have various reasons, and we expect the code quality to improve with time and better ChatGPT versions. If you experience problems, there are some steps you can immediately take to improve the outcome:
1. Re-prompt the error to the AI
Just copy and paste the error message into the chat field. More often than not the AI understands what went wrong and can correct its response accordingly.
2. Create more technical instructions
When writing back data from Custom Blocks into Omniscope, the data format must be a Pandas DataFrame. The AI block already instructs the AI to generate Pandas DataFrames, but sometimes it will generated responses that do not fully comply with that. In case you run into problems of that kind, re-phrase your instructions to be more technically accurate, i.e. tell it to produce Pandas DataFrames, or tell it to use a certain library, or a certain methodology.
3. Change the AI model to GPT-4
GPT-4 is a much more powerful model than GPT-3.5 and will generally better understand your instructions, and also produce higher quality output. If your prompts don't work well in GPT-3.5, try them in GPT-4. You can change the model in the chat configuration in the upper right of the chat dialog.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article