/adaptResults

Retrieve the complete results of a prompt adaptation run, including optimized prompts for all target models.

This endpoint returns the adapted prompts and evaluation metrics for each target model in your adaptation request. Call this endpoint after the adaptation status is 'completed' to get your optimized prompts.

Response Structure:

  • origin_model: Baseline performance of your original prompt on the origin model
    • Includes: system_prompt, user_message_template, score, evaluation metrics, cost
  • target_models: Array of results for each target model
    • Includes: optimized system_prompt, user_message_template, template_fields
    • pre_optimization_score: Performance before adaptation
    • post_optimization_score: Performance after adaptation
    • Evaluation metrics and cost information

Using Adapted Prompts:

  1. Extract the system_prompt and user_message_template from each target model result
  2. Use user_message_template_fields to know which fields to substitute
  3. Apply the optimized prompts when calling the respective target models
  4. Compare pre/post optimization scores to see improvement

Status Handling:

  • If adaptation is still processing, target model results will have result_status: "processing"
  • Only completed target models will have system_prompt and template values
  • Failed target models will have result_status: "failed" with null values

Cost Information:

  • Each model result includes cost in USD for the adaptation process
  • Costs vary based on model pricing and number of evaluation examples
  • Typical range: $0.10 - $2.00 per target model

Best Practices:

  1. Wait for status 'completed' before calling this endpoint
  2. Check result_status for each target model
  3. Validate that post_optimization_score > pre_optimization_score
  4. Save optimized prompts for production use
  5. A/B test adapted prompts against originals in production

Retrieves the complete results of a prompt adaptation run, including optimized prompts for all target models. Learn more

Language
Credentials
Bearer
Click Try It! to start a request and see the response here!