Prompt🔮
Last updated
Last updated
The most important part of using Bayeslab is to write your prompt so AI knows what you'd like to do.
A prompt is consist of 2 type of components:
Quotes ( Use // to reference, enter to select)
Reference of different objects for AI to accurately pinpoint what you mean.
You can reference data table/file/params/results and built-in tools for different cases.
[should be a gif above, showing input of // and input of a name, then enter]
Requirements
the natural language for what you'd like to do with the data, can be clean/transform/chart/building machine learning model....etc.
By naturally combine these 2 parts in any order, you can describe what you do in a most natural way:
With Data A join Data B, do some logic, draw chart, then send chart to x@x.com
Although it's natural expression, we do find helpful to follow the following rules and get most success rate
Clearly say your requirements using actions words
avoid maybes, wrong names, too much generic/abstract expressions
avoid "give me best result", "analyze it all"
Keep requirements simple in one prompt
do not ask 10 things at the same time
Use logical words
like if, then, first, finally
Use sample to convey complex logic
for example: how you'd like to split/extract parts of string
Extract year-month part of date column, like for 2024.3.24, extract 2024-03
Quotes are special parts of prompt that reference specific data/object and bring in context of that data/object for better AI understanding.
[image]
There's a special type of quotes called Params, currently only text and number are supported.
These are place holders for AI to consider when generating code, and then user can change it without re-generating entire code.
It's suitable for simple parameter editing in an complex logic prompt, to avoid unstable AI output.
For example, you would write something like:
after running it, you can click the param and change abc to bcd
and run again, you'll see it's quick to just run and skip entire AI generation part
These template params are just replacing without any real logic change. If the content of param would impact the whole logic, it should NOT be used as params.
For example, rules text like "larger than 3"/"less than average" should NOT be put as params as it would impact how computation logic is going to run, thus requires AI to generate.
See for more details.