LLM Chatbot with Documentation and Web Search Integration

This workflow automates text summarization using OpenAI’s GPT-3.5-turbo with a refine method and evaluates the output. Key nodes include Manual Trigger (initiates workflow), Input Validation (sets input_text), Validate Input Text (ensures text length ≥10 characters), Set Baseline (provides reference summary), Set Article (loads text), Summary Simple Refine (generates summary), Check Summary Success (verifies output), Evaluate to Baseline (compares with baseline), Format Success Response, Format Summary Error, and Format Validation Error (manage outputs). It uses OpenAI’s API for summarization and evaluation.\n\nSetup Requirements and Configuration: Install n8n by downloading from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud setup. Follow installation prompts or create a cloud account. Obtain an OpenAI API key from platform.openai.com: sign up, go to ‘API Keys’ in your account, and generate a key. In n8n, import the provided JSON to create the workflow. Configure the OpenAI Chat Model and OpenAI Chat Model1 nodes by adding your API key under ‘Credentials’ > ‘OpenAI API’ in n8n’s interface. Replace the Manual Trigger with a Webhook Trigger for automation: set its path to ‘summarize-refine,’ ensure it accepts POST requests, and optionally enable header authentication with a secure key. Ensure sufficient server resources for cloud or self-hosted setups to handle API requests.\n\nTesting and Deployment Steps: Test by sending a POST request to the Webhook URL (after replacing Manual Trigger) using Postman. Example JSON body: {'text': 'The dancing plague of 1518 in Strasbourg involved 50-400 people dancing uncontrollably...'} with the authentication header if enabled. Alternatively, use the Manual Trigger in n8n’s editor. The ‘Format Success Response’ node returns a 200 status with summary, evaluation_score, and summarization_method (refine), or ‘Format Validation Error’ (400 status) for short/empty text, or ‘Format Summary Error’ (500 status) for API issues like invalid credentials. Monitor logs for errors like ‘Invalid API key’ or ‘Rate limit exceeded,’ and verify credentials or input length if issues occur. Activate the workflow in n8n’s interface for deployment. Validate outputs to confirm summary and evaluation_score align with the input text.

$6.99

Workflow steps: 13

Integrated apps: manualTrigger, set, if

LLM Chatbot with Documentation and Web Search Integration preview