Describe the problem/error/question
The AI Agent node outputs a \n newline character every couple tokens in the output, when using the Mistral Large 4 model. This causes the resulting markdown to not render properly. The AI Agent execution logs show a correct output by the LLM, but the AI Agent node output contains rogue newlines. So far, I have only found this issue with this specific Mistral model, other models work fine.
Please share your workflow
Share the output returned by the last node
[
{
“output”:
“Here\n’s what\n’s in your dataset\n:\n\n—\n\n\n## Dataset Overview\n\n\nDataset: \nCASUSER.CARS\n | Rows\n: 428 |\n Columns: \n15\n\nThis is\n a classic car\n-spec\nifications dataset\n — one row per\n car model (2\n004 model\n year\n),\n with who\n made it,\n what\n kind\n of car it is\n, and its\n mechanical\n/\nprice\n specs.\n\n### Variables\n\n\n| Variable |\n Type | Missing\n | Missing\n % | Status |\n\n|:\n--------\n-|:-----\n|\n--------:|----------\n:\n|:------\n|\n\n| Make | Text\n | 0 |\n 0\n% |
(\n38 brands,\n e.g. Toyota\n \n28, Chevrolet\n 27,\n BMW 20\n) |\n| Model\n | Text | \n0 | 0\n% |\n
\n425 distinct —\n essentially\n a unique ID\n per row |\n|\n Type | Text |\n 0 | \n0% |
\n \n6 categories:\n Sedan 262\n (\n61%), SUV\n 60\n, Sports\n 49, W\nagon 30,\n Truck 24,\n Hybrid 3\n |\n| Origin |\n Text | 0\n | 0%\n |
3\n categories\n: Asia 158\n (\n37\n%), USA 147\n (34\n%), Europe 123\n (29\n%) |\n| Drive\nTrain | Text |\n 0 | \n0% |
\n 3 categories:\n Front 226\n (53\n%), Rear 110\n (26\n%), All 92\n (21\n%) |\n| MS\nRP | \nText\n
| 0\n | 0%\n | stored\n like\n \"$21,\n739\" — needs\n cleaning to use\n as a number |\n\n| Invoice | \nText
\n | 0 |\n 0% |\n stored like \"$\n20\n,189\n\" — same issue\n |\n| EngineSize\n | Number | \n0 | 0\n% |
litres\n,\n 1.3\n–\n8.3\n, mean\n 3\n.2 |\n|\n Cylinders |\n Number | \n2 | \n0.47%\n |\n
only variable\n with missing values\n |\n| Horsepower\n | Number | \n0 | 0\n% |
\n73–500\n hp, mean \n216 |\n| MP\nG_City |\n Number | 0\n | 0%\n |
10\n–60\n, mean 20\n.\n1 |\n| MP\nG_Highway\n | Number | \n0 | 0\n% |
\n12–66,\n mean 26.\n8 |\n| Weight\n | Number | \n0 | 0\n% |
lbs\n, 1,\n850–7\n,190, mean\n 3,578\n |\n| Wheelbase\n | Number | \n0 | 0\n% |
inches\n, 89\n–144\n, mean 108\n |\n| Length |\n Number | 0\n | 0%\n |
inches\n, 143\n–238\n, mean 186\n |\n\n### Things to\n watch out for\n\n\n- MS\nRP and Invoice are\n text\n, not numbers\n — they’re stored\n with\n $\n and commas\n (e.g.\n \"$36\n,945\").\n Any\n analysis using\n price\n must\n strip\n those first.\n Clean\ned,\n MS\nRP runs\n $10,280\n–\n$192,465\n (mean ≈\n $32,775\n) and Invoice\n $\n9,875–\n$173,560\n (mean ≈ $\n30,015).\n\n- Cyl\ninders has 2\n missing values (\n0.47%)\n — negligible, but\n worth knowing\n before\n any test\n.\n- Model\n has\n 425 distinct values\n out\n of 428 rows\n — it’s\n effectively\n a unique\n identifier, not\n a grouping\n variable.\n Don’t use\n it as\n a category in\n a test.\n-\n Cylinders\n (\n7 distinct\n values) is\n a numeric column\n that really\n behaves like a\n category —\n 3, \n4, 5\n, 6,\n 8, \n10, 12\n.\n Treat\n it as a group\n label\n if\n you compare\n across\n it, not as\n a continuous measurement\n.\n\n### Example\n rows\n\n| Make\n | Model | Type\n | Origin | Drive\nTrain | MSRP\n | Engine\nSize | Cyl\n |\n HP\n | MPG_C\n | MPG_H\n | Weight |\n|:\n—|:—|:\n—|:—|:\n—|:—|\n—:|—:|\n—:|—:|\n—:|—:\n|\n| Acura\n | MDX |\n SUV | Asia |\n All | $36\n,945 | \n3.5 |\n 6 | \n265 | 17\n | 23 |\n 4451 |\n\n| Acura |\n RSX Type S\n 2dr |\n Sedan | Asia\n | Front | $\n23,820 |\n 2.0\n | 4 |\n 200 | \n24 | 31\n | 2778\n |\n| Acura\n | TSX \n4dr | Sedan\n | Asia | Front\n | $26,\n990 | 2\n.4 | \n4 | 200\n | 22 |\n 29 | \n3230 |\n\n—\n\n\nIn\n short: \n428 car\n models with\n brand\n, vehicle\n type, origin,\n dr\nivetrain, price\n (as text\n), and eight\n numeric specs. The\n data is very\n clean — only \n2 missing cells\n in\n the whole table\n — and the main\n practical\n got\ncha is that the\n two price columns need\n their\n $/\ncommas stripped before\n you\n can compute\n with\n them.\n\nIf you\n want to go\n further\n — e\n.g. \ndoes\n horsepower differ by\n car type,\n or by\n origin?\n — that’s a\n hypothesis\n question, and you\n’d select\n the Test hypothesis\n block. Want\n me to set\n that up?”
}
]
Information on your n8n setup
- n8n version:
2.45.6 - Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Linux