I’m setting up Discourse AI on my forum and have an AI Bot/Agent working with Gemini 2.5 Flash via LiteLLM and Google Vertex AI.
The bot is working, but I have a problem with its scope.
For example, my forum is a business-focused community. If I ask the bot:
“Who owns Uber?”
it answers the question using the LLM’s general knowledge, even though the question has nothing to do with my forum.
This creates two problems:
- I want the bot to function as a forum-specific knowledge assistant, not as a general-purpose Gemini/ChatGPT interface.
- I don’t want users to be able to ask arbitrary questions and consume my LLM credits.
What I would ideally like is:
User asks question
↓
Is it relevant to this forum?
↓
NO → politely refuse
↓
YES
↓
Search forum knowledge
↓
Generate answer based on forum content

