# Discourse Chatbot 🤖

**URL:** https://meta.discourse.org/t/discourse-chatbot/256652
**Category:** Plugin
**Tags:** ai
**Created:** [1 maart 2023 om 11:08 UTC](https://meta.discourse.org/t/discourse-chatbot/256652 "2023-03-01T11:08:25Z")
**Posts on this page:** 20
**Page:** 11

<div class="post-metadata">

### Author: ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)
#### Post date: [8 september 2025 om 22:56 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1106 "2025-09-08T22:56:26Z")

</div>

Onze bot kreeg time-outs totdat we de redenering op minimaal hebben ingesteld. Bedankt!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [9 september 2025 om 06:20 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1107 "2025-09-09T06:20:16Z")

</div>

Eerlijk gezegd vind ik GPT-5 over het algemeen te traag en is de extra responstijd niet duidelijk de moeite waard.

Hoe heb je het ervaren voor je supportbot?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [9 september 2025 om 06:30 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1108 "2025-09-09T06:30:30Z")

</div>

Ik heb gpt-5 geprobeerd via Chat GPT, dat is echt een heel ander ding dan via de API, en het heeft die lange redeneertijd nodig om iets betere antwoorden te geven dan 4o of o1 zou geven. Als het snel moet antwoorden, is het niet beter dan 4.1.

Ik ben er vrij zeker van dat de situatie hetzelfde is, of erger vanwege het gebrek aan tools en prompting, bij gebruik van de API. Maar ik weet het niet zeker, omdat gpt-5 pijnlijk langzaam is en in een forumomgeving moet het bijna met lichtsnelheid antwoorden.

---

<div class="post-metadata">

### Author: ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)
#### Post date: [9 september 2025 om 16:05 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1109 "2025-09-09T16:05:59Z")

</div>

In terms of content performance, anecdotally, it seems like gpt-5 is giving noticeably better technical answers that gpt-4o. I’m not sure how to quantify that but it really impressed me.

I’m getting varying results in how long it takes to respond. It does seem, from experimenting this morning, like gpt-5 is slower on average but not by too much, and there were some cases where the response came faster with gpt-5. I’m measuring anywhere from 5 seconds to 35 seconds for a reply.

We’re using RAG and I can’t tell what portion of the latency is from the RAG search vs the chat completion. It could be that sometimes it chooses not to RAG search, the search happens faster, or something is cached (in the search or the completion).

We would typically choose better answers over a faster response because giving customers bad technical advice is costly. Up to a point though, if it times out then that’s a very bad user experience.

GPT-5 recommends primarily gpt-5-mini for our use case, and escalate to gpt-5 in some circumstances. Sounds neat but complicated. Have you considered switching between models dynamically? Why doesn’t OpenAI just do that automatically? [ChatGPT - Compare GPT models performance](https://chatgpt.com/s/t_68c0539b2fbc8191a1e0f7b43b7fd31a)

---

<div class="post-metadata">

### Author: ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)
#### Post date: [9 september 2025 om 20:41 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1111 "2025-09-09T20:41:57Z")

</div>

We moesten terugschakelen naar gpt-4o omdat gpt-5-mini blijkbaar denkt dat het dingen kan die het niet kan. Het bood vol vertrouwen aan om de alarmbewakingsservice van een klant in te stellen en deze te verbinden met hun thuisalarmapparatuur. Het vroeg hen om apparatuur-ID-nummers en hallucineerde alsof het een conciërge was die alles voor hen instelde. Onze website kan dat, maar de chatbot niet. Het lijkt de beveiligingsmaatregelen in de systeemprompt niet te respecteren zoals gpt-4o dat wel deed. We zullen het moeten aanscherpen voordat we mensen het kunnen laten gebruiken.

Update: Het blijkt dat gpt-5 veel beter is in het volgen van instructies en het respecteren van regels in de prompt dan gpt-5-mini. Als je een bot je merk wilt laten vertegenwoordigen, raad ik gpt-5 aan, ook al is het langzamer en 5x duurder. Er is te veel risico dat gpt-5-mini ontspoort.

---

<div class="post-metadata">

### Author: ![StevePlex](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steveplex/32/269106_2.png) [@StevePlex](https://meta.discourse.org/u/StevePlex)
#### Post date: [20 november 2025 om 00:06 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1112 "2025-11-20T00:06:48Z")

</div>

I have had really good luck with GTP-5-mini in agentic flows via **tool calling, code writing and structured data**. I generally find structured data is easier for AI apps than unstructured ! .. not what I expected ! but guardrails are easier .. (code-in-loop, human-in-loop, llm-as-judge, etc)

please watch this for blow by blow walkthru of high performance , low cost gpt-5-mini and gpt-4o …

[![](https://global.discourse-cdn.com/meta/original/4X/4/6/7/4676acd02954e07ad74b06aa06525cb76b12ebb0.jpeg "AI 4 BI: Query complex business data w/ natural language. The holy grail for quant software arrives!") ](https://www.youtube.com/watch?v=E0CVp6QW5mQ)

If anyone out there is interested in working structured data capabilities into Discourse as a plugin, etc. Please reach out.

An NLP extension for sql/stats/datascience to [Data Explorer](https://meta.discourse.org/t/32566?silent=true) is an example.. But could also possibly have a tool / plugin / feature that allows natural language queries of read-only sqlLite or duckdb etc olap files loaded into the container ? just a thought.. 🤔

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [20 november 2025 om 07:49 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1114 "2025-11-20T07:49:45Z")

</div>

Btw, I added GPT 5.1 to the plugin along with some fixes:

[https://github.com/merefield/discourse-chatbot/pull/147](https://github.com/merefield/discourse-chatbot/pull/147)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2 december 2025 om 18:57 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1115 "2025-12-02T18:57:19Z")

</div>

@tom_eric you asked about the ability to play games with other forum members [on another Topic](https://meta.discourse.org/t/does-discourse-support-any-online-multiplayer-mini-games-e-g-go-gomoku-chess/389946/3).

I tried this prompt with Chatbot and it seems to work with GPT 5.1, try it out:

> @Chatbot facilitate a 9x9 game of Go with @Other\_Player and I using a markdown table to render the board - let me go first and only accept plays from myself and @Other\_Player and only when it is our turn - render the board and ask me to kick off …

---

<div class="post-metadata">

### Author: ![tom\_eric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_eric/32/527845_2.png) [@tom\_eric](https://meta.discourse.org/u/tom_eric)
#### Post date: [2 december 2025 om 19:06 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1116 "2025-12-02T19:06:52Z")

</div>

Oh, thank you. That’s a really creative idea.Oh, thank you. That’s a really creative idea.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [3 december 2025 om 09:24 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1117 "2025-12-03T09:24:45Z")

</div>

np let me know how that works out 👍

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [20 december 2025 om 13:27 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1118 "2025-12-20T13:27:46Z")

</div>

A slightly customized dev setup let me experiment with Chatbot playing Zork using this plugin and [Discourse Frotz](https://meta.discourse.org/t/discourse-frotz/140617) 🧙‍♂️

(here with GPT 5.1 on lower reasoning)

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/9/9/5990f203731d7c80d04cda8c5c0c203ade106ff6.png)

A little time later:

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/e/7/0e7fc059d72f1b3e12299eee9b6de646c7bab6c9.png)

Racking up quite a score! And:

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/6/e66b2ae674cebefc69e9b791b0dbe63b57b021ac.png)  
😮

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/b/8/3b8b7697c86b291733b9ee7490760a43177e4577.png)

🎓

(Apologies, setup is a little too complex to simply share here).

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [20 december 2025 om 13:35 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1119 "2025-12-20T13:35:20Z")

</div>

Wow! I had no idea that was possible. Guess pretty much anything is possible with good prompts 😅

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [15 februari 2026 om 17:00 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1120 "2026-02-15T17:00:48Z")

</div>

Chatbot model dropdowns now have gpt 5.2 and 5.2 pro - and for 5.2 there is now an `xhigh` reasoning level if you love burning tokens and devastating the environment 😅

You may also notice that users of the Maths Plugin can now easily get Chatbot to discuss maths with nicely rendered maths equations without adding anything to the system prompt …

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [16 februari 2026 om 16:28 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1121 "2026-02-16T16:28:22Z")

</div>

I’ve moved the launch button to a much neater location in the bottom right (except for iOS PWA/app) - let me know if that’s not working as intended.

This was always intended to simplify the css whilst accommodating those annoying control bars on iOS, but I couldn’t live with it any longer, it was offending my eyes 🤮 😅

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2 maart 2026 om 09:36 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1122 "2026-03-02T09:36:05Z")

</div>

@ThisSource this was the first AI chatbot for Discourse and is still running :).

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [7 maart 2026 om 17:37 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1123 "2026-03-07T17:37:50Z")

</div>

Delighted to announce my first ongoing business sponsor of Chatbot, [Surety](https://suretyhome.com/), who now occupy the new Project Sponsor section of the README.

> Surety is on a mission to provide professional-grade security alarm monitoring and home automation to DIYers in the most transparent and efficient way possible, bucking the trend in the home security industry.

Thank you Surety!

> <https://github.com/merefield/discourse-chatbot/blob/main/README.md>

@37Rb

If you’d like to become a sponsor of one of my projects, take a look at: [Sponsor @merefield on GitHub Sponsors · GitHub](https://github.com/sponsors/merefield) 🙏

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [3 augustus 2026 om 11:12 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1124 "2026-08-03T11:12:58Z")

</div>

# Recent PR summary — 1–3 August 2026

Several related PRs were merged across Discourse Chatbot and its extension plugins.

## Highlights

- Introduced advanced local reasoning strategies, including verify-and-revise, best-of-two, and uncertainty-guided reasoning.
- Added current OpenAI models and the new max reasoning effort.
- Added a semantic blocked-question gate using embedding similarity.
  - significant savings as uses embeddings to block subjects you don’t wish the bot to handle without costing you LLM tokens.

- Consolidated the basic and RAG implementations into a single DiscourseChatbot::Bot.
- Replaced bot-mode settings with trust-level built-in tool selectors.
- Renamed the extension API from “Function” to “Tool”.
- Replaced the SafeRuby based calculator tool with the constrained Dentaku expression evaluator - this is a big improvement in security, as despite its name, there are vulnerabilities in SafeRuby.
- Adopted Zeitwerk loading across Chatbot and its extension plugins.
- Moved location-specific tools into the Locations Early Access plugin (sponsor me to regain access)
- Improved calculator error recovery and support for common π/e notation.
- Refreshed the README
- Advanced the main plugin from version 1.8.0 to 2.4.1.

## Discourse Chatbot

- #162 — FIX: Preserve Responses API reasoning state ([FIX: Preserve Responses API reasoning state - Pull Request #162 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/162))  
Made Responses API reasoning and tool continuations reliable, introduced configurable iteration and token limits,  
improved URL provenance validation, preserved useful partial responses, and prevented blank or malformed responses  
from being accepted.

- #163 — FEATURE: Add advanced local reasoning strategies ([FEATURE: Add advanced local reasoning strategies - Pull Request #163 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/163))  
Added simple, verify-and-revise, best-of-two, and uncertainty-guided reasoning strategies for Chat Completions, with  
bounded auxiliary requests and staff-visible audit records.

- #164 — FEATURE: Add current OpenAI models ([FEATURE: Add current OpenAI models - Pull Request #164 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/164))  
Updated the model selectors with newer GPT-5.x and Pro variants, routed appropriate models through the Responses  
API, and added max reasoning effort.

- #165 — FIX: Improve calculator retry guidance ([FIX: Improve calculator retry guidance - Pull Request #165 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/165))  
Gave models clearer calculator syntax and recovery guidance so correctable failures are retried appropriately.

- #166 — FEATURE: Add semantic blocked-question gate ([FEATURE: Add semantic blocked-question gate - Pull Request #166 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/166))  
Added an optional embedding-based gate that can identify administratively defined blocked subjects and return canned responses before invoking the main model. It includes caching, staff auditing, fail-open behaviour, and custom embedding model support.

- #167 — DEV: Replace SafeRuby and adopt Zeitwerk loading ([DEV: Replace SafeRuby and adopt Zeitwerk loading - Pull Request #167 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/167))  
Replaced the vendored SafeRuby evaluator with Dentaku, aligned namespaces and filenames with Zeitwerk, and modernised the plugin’s loading and lint configuration. Turned out there were vulnerabilities in SafeRuby, hence the migration.

- #168 — DEV: Extract Locations functions from Chatbot ([DEV: Extract Locations functions from Chatbot - Pull Request #168 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/168))  
Removed location-specific tools and settings from the main plugin, allowing them to be supplied independently by discourse-locations.

- #169 — FEATURE: Replace bot modes with trust-level tool selection  
([FEATURE: Replace bot modes with trust-level tool selection - Pull Request #169 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/169))  
This was the main architectural rationalisation:

- #170 — FIX: Improve calculator tool recovery ([FIX: Improve calculator tool recovery - Pull Request #170 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/170))  
Normalised familiar expressions such as Math::PI, Math.PI, Math::E, Math.E, and π into Dentaku-compatible syntax.  
Repeated unchanged invalid calls are now rejected with actionable guidance.

- #171 — DEV: Refresh chatbot documentation ([DEV: Refresh chatbot documentation - Pull Request #171 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/171))  
Updated the README for the unified bot and tool architecture, reasoning strategies, blocked questions, calculator behaviour, limits, quotas, custom endpoints, image/PDF support, and current settings. Vision support is no longer described as experimental.

## Companion plugins

- discourse-locations #4 — FIX: Update Chatbot location extensions for tool API ([https://github.com/merefield/discourse-locations-early-access/pull/4](https://github.com/merefield/discourse-locations-early-access/pull/4))  
Migrated the extracted location integrations to DiscourseChatbot::Tool, placed them under Locations::Chatbot::Tools, and updated them for the unified bot.

- Function extension example #1 — FIX: Update example extension for Chatbot tool API ([FIX: Update example extension for Chatbot tool API - Pull Request #1 - merefield/discourse-chatbot-function-extension-example - GitHub](https://github.com/merefield/discourse-chatbot-function-extension-example/pull/1))  
Updated the example plugin to demonstrate DiscourseChatbot::Tool, Zeitwerk loading, tool-oriented settings and  
translations, and focused behaviour testing without legacy compatibility code.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [3 augustus 2026 om 12:50 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1125 "2026-08-03T12:50:38Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/6/1/e/61e9dcb90560ba6ee333ff92af18f03655ddb88a.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [11 augustus 2026 om 16:30 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1126 "2026-08-11T16:30:37Z")

</div>

> [@How can I restrict an AI Agent to answer only questions related to my forum?](https://meta.discourse.org/t/how-can-i-restrict-an-ai-agent-to-answer-only-questions-related-to-my-forum/409672/7):
>
> Although prompts can influence an agent’s behavior, they aren’t always reliable. I was able to trick the agent at [ask.discourse.com](http://ask.discourse.com) into answering a few off-topic questions.

@Karthik_K1 please take a look at the screenshot in the last Post

Chatbot cost-effectively all but solves this problem:

> [@merefield](#):
>
> - #166 — FEATURE: Add semantic blocked-question gate ( [FEATURE: Add semantic blocked-question gate - Pull Request #166 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/166) )  
> Added an optional embedding-based gate that can identify administratively defined blocked subjects and return canned responses before invoking the main model. It includes caching, staff auditing, fail-open behaviour, and custom embedding model support.

Obviously if you are unable to install third party plugins, this will be of little help.

I expect the solution to be better than System Prompt based guards but it won’t be completely foolproof and you can indeed get too strict and block some otherwise reasonable messages in any case.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [16 augustus 2026 om 17:05 UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1127 "2026-08-16T17:05:00Z")

</div>

Just dropped some cache optimisations, which should lower the cost of using Chatbot and speed up its response.

> <https://github.com/merefield/discourse-chatbot/pull/172>
>
> Previously, changing timestamps, removed tool schemas, nondeterministic extensio…n ordering, and absent cache routing metadata reduced prompt-cache reuse, while a trailing date message could distract the model from the user’s request.
> 
> This change creates stable prompt prefixes for Responses and Chat Completions, adds conversation-scoped cache keys and GPT-5.6 breakpoints for official OpenAI endpoints, preserves tool schemas with \`tool\_choice: "none"\`, records cache-token usage, relies on the calculator’s \`NOW\` support when available, supplies an early date-only fallback otherwise, and is validated by plugin lint plus 86 focused examples.

[Vorige pagina](https://meta.discourse.org/t/discourse-chatbot/256652.md?page=10)

[Volgende pagina](https://meta.discourse.org/t/discourse-chatbot/256652.md?page=12)
