PAL Framework

Getting Started

  • Quick Start Guide
    • Installation
    • Your First PAL Prompt
    • Using the Prompt
    • Executing with an LLM
    • Using Component Libraries
    • CLI Usage
    • Next Steps

User Guide

  • Writing PAL Prompts
    • Basic Structure
    • Variables
      • Variable Types
      • Variable Definition
    • Templating with Jinja2
      • Basic Variable Substitution
      • Conditionals
      • Loops
      • Filters
    • Using Component Libraries
      • Importing Libraries
      • Using Components
    • Best Practices
      • 1. Use Descriptive IDs
      • 2. Version Your Prompts
      • 3. Provide Clear Descriptions
      • 4. Organize with Composition
      • 5. Use Metadata
    • Advanced Patterns
      • Multi-line Content
      • Dynamic Component Selection
      • Nested Templates
    • Testing Your Prompts
  • Component Libraries
    • Creating a Library
    • Component Types
    • Example Libraries
      • Personas Library
      • Output Formats Library
      • Reasoning Strategies Library
    • Using Libraries in Prompts
      • Basic Import and Usage
      • Multiple Library Imports
      • Remote Library Import
    • Library Organization
      • Recommended Structure
      • Version Management
    • Best Practices
      • 1. Single Responsibility
      • 2. Descriptive Names
      • 3. Documentation
      • 4. Modularity
    • Testing Libraries
    • Sharing Libraries
  • PAL Evaluation Guide
    • Quick Start
      • 1. Create an Evaluation File
      • 2. Run Evaluations
    • Evaluation File Structure
      • Required Fields
      • Test Case Structure
    • Available Assertions
      • 1. Contains Assertion
      • 2. Regex Match Assertion
      • 3. JSON Valid Assertion
      • 4. JSON Field Equals Assertion
      • 5. Length Assertion
    • Advanced Features
      • Variable Types
      • Multiple Assertions per Test
      • Auto-Discovery
    • Output Formats
      • Console Output (Default)
      • JSON Output
    • Best Practices
      • 1. Test Edge Cases
      • 2. Use Descriptive Names
      • 3. Group Related Tests
      • 4. Version Compatibility
    • Integration with Development Workflow
      • 1. Continuous Testing
      • 2. Regression Testing
      • 3. Model Comparison
    • Troubleshooting
      • Common Issues
      • Debug Mode
    • Example: Complete Evaluation Suite

API Reference

  • Compiler API
    • PromptCompiler
    • Example Usage
    • Internal Classes
      • ComponentTemplateLoader
  • Executor API
    • PromptExecutor
    • LLM Clients
      • MockLLMClient
      • OpenAIClient
      • AnthropicClient
    • Protocols
      • LLMClient
      • BaseLLMClient
    • Examples
  • Loader API
    • Loader
    • Supported File Types
    • Loading Methods
    • Examples
    • Error Handling
  • Data Models
    • Core Models
      • PromptAssembly
      • ComponentLibrary
      • EvaluationSuite
      • ExecutionResult
    • Component Models
      • PALComponent
      • PALVariable
    • Enums
      • ComponentType
      • VariableType
    • Examples
  • Exceptions
    • Base Exception
      • PALError
    • Specific Exceptions
      • PALValidationError
      • PALLoadError
      • PALCompilerError
      • PALExecutorError
      • PALResolverError
      • PALMissingVariableError
      • PALMissingComponentError
      • PALCircularDependencyError
    • Exception Handling Examples
PAL Framework
  • Search


© Copyright .

Built with Sphinx using a theme provided by Read the Docs.