LLM (PQL)
Sends text input to the designated LLM engine and returns an AI-generated response.
- Returned Output: Text
- Library: PQL \ Common \ String
- Version: 2023.00.000
- Compatibility:
- It can be combined with other PQL functions throughout the application.
- It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.
Syntax
Syntax Alternatives
* Click on the function's arguments above for more details on the input values.
Comments
- The input text string can be any alphanumeric set of characters.
Using the LLM Function
You can use the LLM
PQL function to generate dynamic text, sending a prompt to the LLM to generate some output and then adding the results to custom tooltips, text fields, into your PQL formulas, and so on.
Important: While this function cannot tell you about your data set, it can be used to add additional information and background to your content.
Warning: When using LLMs, your assets are generated using public domain algorithms. This can produce erroneous and inconsistent or random results. Use at your own risk.
Examples
Note: These examples include a possible return value, but any output depends on your selected LLM and so could vary considerably.
Number of Countries
To find out how many countries are in Africa:
LLM("How many countries are there in Africa?")
This example could return: "There are 54 recognized countries in Africa.”
Context Information
To add some information about Australian cuisines:
LLM("What cuisine is Australia famous for?")
This example could return:
"Australia is famous for its unique fusion cuisine, which combines British and Indigenous influences. Some of its famous dishes include Vegemite sandwiches, meat pies, barramundi fish, and shrimp on the barbecue. They are also known for their love of "bush tucker" - native foods such as kangaroo, emu, and crocodile. Lamingtons and pavlova are popular desserts in Australia."
Incorporating variable or dynamic values
When you use the LLM function, you can incorporate variables like placeholder value()
, data cell data(0,0)
, and so on, to pull a value into the function at run or build time. For example, to replace a placeholder in a text block with information about famous cuisine for whichever country is selected from a slicer:
LLM("What cuisine is " + value() + " famous for?")
This functionality is available across a number of apps. For more information, see Dynamic Function wizard.