Skip to main content
The Prompt Playground is an interactive environment for testing and refining your prompts. It provides a powerful interface to experiment with different prompt variations, test against various models, and even run prompts against custom API endpoints.

Overview

The Prompt Playground allows you to:
  • Test prompts with different LLM providers (OpenAI, Anthropic, etc.)
  • Compare outputs across multiple models
  • Experiment with parameters like temperature and max tokens
  • Test prompts against your own custom API endpoints
  • Save and collaborate on prompt experiments with team members
  • Create draft versions without affecting production (RBAC ensures only authorized users can deploy)
Image 1

Variables and Dynamic Content

The Playground supports dynamic variables in your prompts:
  1. Define variables using double curly braces: {{variable_name}}
  2. Enter test values in the Variables section
  3. See how different variable values affect the output
Screenshot: Using variables in prompts

Saving and Collaboration

The Playground supports team collaboration with built-in versioning and role-based access control:

Creating Draft Versions

  1. Click “Save as Draft” to save your experiments without affecting production
  2. Add version notes to document your changes and findings
  3. Share the draft with team members for review and feedback

Collaboration Features

  • Draft Sharing: Team members can view and test your draft prompts
  • Notepad: Leave feedback on specific prompt versions via the notepad
  • Role-Based Access:
    • Developers and prompt engineers can create and edit drafts
    • Only authorized users (with deployment permissions) can promote drafts to production
    • Viewers can test prompts but cannot modify them

Testing with Custom Endpoints

One of the most powerful features of the Prompt Playground is the ability to test prompts against your own custom API endpoints. This is particularly useful for:
  • RAG (Retrieval-Augmented Generation) systems
  • Custom AI applications with proprietary logic
  • API wrappers that combine multiple AI services
  • Complex systems that include more components than just an LLM

Setting Up Custom Endpoints

To configure a custom endpoint:
  1. Toggle the Run Mode from “Model Provider” to “Custom Endpoint”
  2. Click “Configure Endpoints” to set up your API endpoints
Screenshot: Switching to Custom Endpoint mode

Endpoint Configuration

When creating an endpoint, you’ll need to provide:
  • Name: A descriptive name for your endpoint
  • URL: The full URL of your API endpoint
  • Authentication: Choose from:
    • Bearer Token (for OAuth/JWT)
    • API Key (with custom header name)
    • Basic Authentication
    • No authentication
  • Custom Headers: Additional headers to include in requests
  • Default Payload: Base payload that will be merged with prompt data
Screenshot: Endpoint configuration dialog

Request Format

When you run a prompt against a custom endpoint, Lunary sends an HTTP POST request with the following JSON payload:
Your endpoint should process this request and return a response. Lunary supports various response formats:
  • Simple text responses
  • OpenAI-compatible message arrays
  • Custom JSON structures
Screenshot: Example request payload

Use Case Examples

RAG System Integration

Test how your prompts work with your retrieval-augmented generation system:

Custom Agent Testing

Test prompts against AI agents with tool access or custom logic: