Actions14
Overview
The "Chat" operation of the Knowledge Base resource enables interactive conversations with a specified knowledge base using the Ragdoll AI API. This node sends a user message along with optional chat history and system prompts to the knowledge base, which then returns a context-aware response. It is useful for building chatbots, virtual assistants, or any application requiring conversational AI that leverages custom knowledge bases.
Practical examples:
- Customer support chatbot that answers questions based on company documentation.
- Interactive FAQ assistant that remembers previous conversation context.
- Virtual tutor that provides explanations from a curated knowledge base.
Properties
| Name | Meaning |
|---|---|
| Knowledge Base ID | The unique identifier of the knowledge base to chat with. |
| Message | The current message or query to send to the chat interface. |
| Chat History | An array of previous messages in the conversation, each with a role (User, Assistant, System) and content, providing context for the chat. |
| Top K | Number of relevant documents to retrieve from the knowledge base to provide context for the chat response. Defaults to 3. |
| System Prompt | A system-level prompt to guide or influence the behavior of the chat assistant during the conversation. |
Output
The node outputs JSON data containing the chat response from the knowledge base. The structure typically includes the assistant's reply generated based on the input message, chat history, and retrieved documents. The output does not include binary data.
Dependencies
- Requires an active connection to the Ragdoll AI API service.
- Needs an API authentication token configured in n8n credentials to authorize requests.
- The base URL for the API is set via credentials.
- The node uses HTTP POST requests to the endpoint
/v1/knowledge-bases/{knowledgeBaseId}/chat.
Troubleshooting
Common issues:
- Invalid or missing Knowledge Base ID will cause request failures.
- Incorrect or expired API authentication token will result in authorization errors.
- Providing malformed chat history or message payloads may lead to unexpected responses or errors.
- Network connectivity problems can prevent communication with the Ragdoll AI API.
Error messages and resolutions:
- 401 Unauthorized: Check that the API key credential is correctly configured and valid.
- 404 Not Found: Verify the Knowledge Base ID exists and is accessible.
- 400 Bad Request: Ensure all required parameters (message, knowledgeBaseId) are provided and properly formatted.
- 500 Internal Server Error: Retry later or contact API provider if persistent.
Links and References
- Ragdoll AI Documentation (for API details and usage)
- n8n Documentation on Creating Custom Nodes