Skip to main content
Picept provides a powerful evaluation system that allows you to run multiple evaluations with a single call. We offer both a Python SDK for seamless integration and direct API access for maximum flexibility. Let’s walk through a complete example that evaluates both factuality and hallucination detection.
Make sure you have your Picept API key ready. You can find this in your dashboard under Settings → API Keys.

Basic Implementation

There are two ways to integrate Picept evaluations: using our Python SDK or making direct API calls.

Understanding the Response

The API returns a detailed response for each evaluator:

Integration Options

  1. Python SDK
    • Simplified integration with native Python objects
    • Automatic response handling
    • Built-in error handling and retries
    • Type hints and IDE support
  2. HTTP Request
    • Direct RESTful API access
    • Language-agnostic implementation
    • Fine-grained control over requests
    • Flexible integration options

Key Components

  1. Dataset Structure
    • prompt: The initial question or instruction
    • response: The AI model’s output to evaluate
    • reference: The correct answer (for factuality checks)
    • context: Additional information for context-aware evaluations
  2. Evaluator Configuration
    • Multiple evaluators can be specified in a single request
    • Each evaluator can use different judge models
    • Customize passing criteria for each evaluation
    • Enable detailed explanations for transparency
  3. Response Interpretation
    • passed: Boolean indicating if the evaluation criteria were met
    • explanation: Detailed reasoning for the evaluation result
    • Original inputs included for reference

Next Steps