Actions41
- Step/Generation Actions
- Thread Actions
- User Actions
- Dataset Actions
- Experiment Actions
- File Actions
- Prompt Actions
- Score Actions
Overview
This node integrates with the Literal AI API to manage various resources related to AI projects, including prompts. Specifically, for the "Prompt" resource and the "Get A/B Testing" operation, it retrieves A/B testing configurations associated with a named prompt. This is useful in scenarios where you want to analyze or manage different prompt variants being tested against each other to optimize AI model outputs.
Practical examples include:
- Fetching current A/B test setups for a prompt to monitor performance.
- Integrating prompt A/B testing data into workflows for automated decision-making or reporting.
Properties
| Name | Meaning |
|---|---|
| Name | The name of the prompt for which to retrieve A/B testing information. This is a required string input. |
Output
The node outputs a JSON object under the content field containing the A/B testing configuration details for the specified prompt. The exact structure depends on the Literal AI API response but generally includes information about the different prompt variants involved in the A/B test, their rollout percentages, and possibly performance metrics.
No binary data output is produced by this operation.
Example output structure (conceptual):
{
"content": {
"promptName": "example-prompt",
"abTesting": [
{
"variantId": "variant1",
"rollout": 50,
"metrics": { /* performance data */ }
},
{
"variantId": "variant2",
"rollout": 50,
"metrics": { /* performance data */ }
}
]
}
}
Dependencies
- Requires an API key credential for the Literal AI service to authenticate requests.
- The node uses the official Literal AI client library (
@literalai/client) bundled within the node. - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Providing a prompt name that does not exist or has no A/B testing configured may return empty results or errors.
- Malformed JSON inputs in other operations can cause parsing errors, but for this operation only a simple string name is required.
Error messages:
- Authentication errors typically indicate invalid or expired API keys; verify and update credentials.
- Not found errors suggest the prompt name does not match any existing prompt; check spelling and existence.
- JSON parsing errors are unlikely here since only a string parameter is used, but if encountered elsewhere, ensure JSON inputs are valid.
Links and References
- Literal AI API Documentation — For detailed API capabilities and data structures.
- n8n Documentation — For general guidance on using credentials and custom nodes.