Dynamic Learning

Logic can improve future executions based on past ones using dynamic learning. When enabled, Logic can learn from your previous executions - such as the kinds of recommendations, outputs, or patterns that performed well - and apply that knowledge to improve future responses.

How to use Dynamic Learning

To enable dynamic learning for a document execution, add the useDynamicLearning query parameter to your request URL. The value of this parameter can be true or false. If omitted, dynamic learning is disabled by default.

Example with useDynamicLearning

Here’s how to enable dynamic learning in different environments.
curl -X POST 'https://api.logic.inc/2024-03-01/documents/{document_id}/executions?useDynamicLearning=true' 
    -H "Authorization: Bearer $LOGIC_API_TOKEN" 
    -H "Content-Type: application/json" 
    -d '{
        /* your input JSON here */
    }'

Replace any {id} in the example code, such as {document_id} with the ID you need for your specific API call.

How to Isolate Dynamic Learning to a Specific Tenant

If you support multiple tenants or customers, you can scope learning behavior per tenant by adding a tenantId parameter.
Learn more about how to use the tenantId parameter in the Tenant ID section.