N8n ai agent thought process get print in the output

Describe the problem/error/question

Hi so im new in n8n platform, right now im learning n8n to make an ai agent flow for my telegram bot, my question is my ai keep producing the thought process like in this screenshot, and i found a way to use this json expression like this,
“{{$json.output.split(‘\n’).slice(1).join(‘\n’).replace(/**/g, ‘’).replace(/[(.?)](.?)/g, ‘$1’).trim() }}”
but the thing sometimes its work sometimes its still printing the thought process, is there a sure way to only produce the answer without including the thought process ?
im using local LLM and use qwen3 14B model

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.){
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        256,
        -80
      ],
      "id": "fea1a65f-5749-41c1-8bb9-afc83f452162",
      "name": "Telegram Trigger",
      "webhookId": "aa24382c-99f5-4b65-9fe8-308d10e5bf38"
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "c1d09baa3bf3692e0ad59c990187a3956d3a936551920c213eb15311236ef9bc"
  }
}

Share the output returned by the last node

I need to mention the main areas: software development, cybersecurity, data management, and IT consulting. Also, include the website and contact info again. Make sure the response is friendly and helpful. Let me structure it clearly with bullet points for readability. Double-check the information to avoid errors.
Halo! :blush:
PT Cybertech Solusindo adalah perusahaan yang bergerak di bidang teknologi informasi dan solusi digital. Berikut beberapa layanan utama yang mereka tawarkan:

  • Pengembangan Perangkat Lunak
  • Layanan Keamanan Siber (Cybersecurity)
  • Manajemen Data dan IT Consulting
  • Solusi Teknologi untuk Perusahaan
    Untuk informasi lebih lanjut, Anda bisa mengunjungi website resmi mereka di:
    https://www.cts.co.id
    Jika ada pertanyaan spesifik, silakan tanya! :blush:

Information on your n8n setup

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

Hi @Kira_Mayatu, welcome!
Try this, first add a very tight system prompt related to the final output. That should work, and also as a safeguard, you can attach an output parser and add a JSON example of an output schema. Also, using a good model should not cause this.