Table of Contents
1. Description
Query the AI model defined in Graphlytic AI connections.
2. Connection
2.1. Parameters
Name | Description | Required | Default |
|---|---|---|---|
MODEL | Model to use. String consisting of AI connection code, underscore, and model code. | yes | No |
3. Query
Connects to the defined LLM model and executes the query prompt. Returns these parameters that can be used in subsequent job steps:
Parameter | Description |
|---|---|
propmpt | The full prompt that was sent to the LLM. |
role | The role in which the LLM responded. |
response | The actual response from the LLM. |
4. Script
Not used.
5. Examples
<!DOCTYPE etl SYSTEM "https://scriptella.org/dtd/etl.dtd"> <etl> <description>Graphlytic job</description> <properties> job_name=Graphlytic job </properties> <!-- CONNECTIONS --> <!-- This connection assumes --> <!-- there is an AI Connection defined with code graphlytic_cloud_ai --> <!-- AND there is a model with code gpt-4-turbo-preview --> <connection id="graphAi" driver="llm"> MODEL=graphlytic_cloud_ai_gpt-4-turbo-preview </connection> <connection id="logInfo" driver="log"> level=INFO </connection> <!-- JOB STEPS --> <script connection-id="logInfo"> STARTING JOB "$job_name" </script> <query connection-id="graphAi"> What is the result of 1+2x0+5 ? <script connection-id="logInfo"> [user]: $prompt [$role]: $response </script> </query> </etl>