-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Auto-fixing Output Parser Node): Only run retry chain on parsing errors #11569
Conversation
|
||
const parser = new N8nOutputFixingParser(this, model, outputParser); | ||
if (prompt.length === 0 || !prompt.includes('{error}')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the other placeholders (instructions, completion) not required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how much we should restrict this; perhaps users would use it with fully custom prompts that provided the completion from other parts of the workflow. But of course, with the default prompt, providing the other two placeholders is semi-required, so it'll work more reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it doesn't error, apparently, but it does not yield good results, it looks like (removed the "instructions" bit, but that left an empty object, instead of something that actually matches the output parser...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add these placeholders as a hint underneath the prompt-window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I wasn't sure about was the name "Fix Prompt" -- is this clear enough for the user? |
Got any ideas for a better name? Perhaps |
Yep, that sounds good. Probably better to not have too long a name, otherwise, I'd try to be a bit more descriptive like "Prompt for fixing the output". |
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
n8n Run #7748
Run Properties:
|
Project |
n8n
|
Branch Review |
ai-437-bug-auto-fixing-parser-goes-wild
|
Run status |
Passed #7748
|
Run duration | 04m 39s |
Commit |
4f85327eb0: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
|
Committer | Oleg Ivaniv |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
2
|
Skipped |
0
|
Passing |
460
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Summary
This PR fixes two issues with the OutputParserAutofixing node:
Changes
OutputParserException
{error}
placeholder)Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)