Auto-fixing output parser hallucinating

Hey all, so i set up an n8n ai agent. with a structured output parser and a auto-fixing parser. I will attach the system prompt and prompt below. The issue i am running into is the AI Agent itself with no parser attached outputs the correct info, however the auto-fixing parser hallucinates and outputs information that is not even releveant

Prompt

# Task Description
 Okay, I want to update the Facebook ad creatives for Covenant Roofing Leesburg, and the update I want to make is I want to take all the winning creatives from Covenant Roofing Sarasota, Jacksonville, and Coco, and put that into one winner's campaign in Leesburg to see if we can get some better results.

# Date Time Now
Sat Oct 12 2024 18:55:32 GMT-0400 (Eastern Daylight Time)

System Prompt

You are an AI tasked with creating a task title, refining the task description, and assigning a start and due date based on task complexity. You will receive:
- A task description that outlines what needs to be done.
- The current date and time.

Your job is to generate:
1. **Task Title**: A clear, concise task title that summarizes the task based on the provided description.
2. **Refined Description**: A more detailed version of the task description, focusing on the specific actions the assignee must take.
3. **Start Date**: Default to today’s date unless a different start date is explicitly mentioned.
4. **Due Date**: Assign a reasonable due date based on the complexity of the task (e.g., same day for simple tasks, within a week for moderate tasks).

Do not include any unrelated information. Focus only on creating the task title, refining the task description, and assigning the start and due dates.

Structured Output parser schema

{
  "type": "object",
  "properties": {
    "task_title": {
      "type": "string"
    },
    "refined_description": {
      "type": "string"
    },
    "start_date": {
      "type": "string",
      "format": "date"
    },
    "due_date": {
      "type": "string",
      "format": "date"
    }
  },
  "required": ["task_title", "refined_description", "start_date", "due_date"]
}

Ai Agent Output

[
  {
    "output": "Task Title: Update Facebook Ad Creatives for Covenant Roofing Leesburg\\nRefined Description: The task involves consolidating the winning Facebook ad creatives from Covenant Roofing's Sarasota, Jacksonville, and Coco campaigns. These selected creatives should then be compiled into a single 'winner's campaign' for Covenant Roofing Leesburg with the aim of enhancing campaign results. The process includes: 1. Identifying and compiling a list of winning creatives from the Sarasota, Jacksonville, and Coco campaigns. 2. Creating a new campaign for Leesburg or updating an existing campaign with these winning creatives. 3. Ensuring that the creatives are appropriately adjusted to fit the Leesburg market's specifics, if necessary. 4. Launching the updated campaign and monitoring initial performance metrics to assess impact.\\nStart Date: 2024-10-12\\nDue Date: 2024-10-19"
  }
]

Output with Auto-fixing paser and structured parser

[
  {
    "output": {
      "output": {
        "task_title": "Project Planning",
        "refined_description": "Detailed planning of project phases, milestones, and deliverables.",
        "start_date": "2023-01-10",
        "due_date": "2023-06-15"
      }
    }
  }
]

has anyone else run into this sort of issue with the auto-fixing output parser just completely hallucinating?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @George_Roros,

I can’t seem to reproduce your issue - can you share your workflow?

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


Not exactly these issues but I have encountered errors in general when using the output parser with the AI node (not returning results correctly etc).

I found it to be more consistent in it’s responses when using a HTTP request directly to OpenAI/Anthropic/Whichever API and just giving the specific rules, a system message and a user message.

If it comes to it, it might be worth trying to call the API directly

of course!

That worked, but is unfortunate because now there isn’t an easy way to attach memory

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.