This n8n workflow automates the process of extracting structured personal data from user messages using a self-hosted language model, Mistral NeMo, integrated via Ollama. When a chat message is received, it triggers a sequence of nodes that communicate with the LLM to analyze and identify key information like name, surname, contact method, contact details, timestamp, and communication subject. The response from the model is then parsed and validated against a predefined JSON schema. If the output doesn’t initially meet the criteria, an auto-fix mechanism prompts the model to correct the response, ensuring accurate data extraction.
The workflow involves several key components:
– A webhook trigger listening for incoming chat messages.
– Integration with the Ollama model hosting ‘mistral-nemo:latest’ to generate language-based responses.
– A basic LLM chain that prompts the model to analyze user input, providing instructions and the current date.
– Output parsers, including an auto-fixer, to ensure the response conforms to the expected structured data schema.
– A node to extract and output the final JSON data.
This workflow is useful in scenarios such as customer service automation, user registration, or data collection, where accurate and structured information extraction from unstructured user input is essential.
Reviews
There are no reviews yet.