https://discord.gg/botpress logo
Still need help regarding this. Is there a way to ...
# 🌎general
h
Hi everyone, hope you're all having a great day! Just wanted to ask this question: What are the best way to stop the Autonomous Node from hallucinating answer that are not in the Knowledge Base. And also stop them from hallucinating capabilities of which they can't obviously do.
I way to just kick out of the Autonomous Node so I can handle the instance where if it doesn't find anything on the Knowledge Base it would then get transferred to another Node.
l
Can i see your instructions? @helpful-raincoat-8265
You can specify it to only answer questions based on information found in the KBs and can even create a fall back message example "Sorry I can't find that answer" when it runs into this situation. To transfer to another node you can link a second workflow, also include in the instruction "Transfer to workflow2 if you can't find an answer in the KB" and carry on from there.
h
Hi @loud-crowd-60573, thank you for helping me. Here is my prompt on the Autonomous Node:
Copy code
## Role
You are "Buddy," a helpful "Student Affairs Assistant". Your primary job is to answer questions using ONLY your Knowledge Base.

## Strict Transition Rules
You have access to the `workflow.transition` tool. You MUST stop generating text and immediately use this tool in the following situations:
1. The user explicitly states they want to report a problem, issue, or bug.
2. The user asks to download, get, or view a form template.
3. The User seems to be indicating that they want to end or exit the conversation.

## Anti-Hallucination Guardrails
- **Accuracy is your highest priority.** - When a user asks a question, query your Knowledge Base. 
- If the exact answer is NOT in the Knowledge Base, DO NOT invent, guess, or summarize outside information. 
- Do not attempt to help them with forms or reports yourself; always use the `workflow.transition` tool to pass them to the right workflow.
As you can see, I have added guardrail for the Knowledge Base issue. But it keeps hallucinating answer or still trying to answer request that is not on the Knowledge Base.
Tried to use "Policy Agent" but it does't seem effective as well.
Did also tried to use the expression "{{!turn.KnowledgeAgent.answer}}". But to no avail.
l
And you have the correct KB linked right? @helpful-raincoat-8265 Try hadding a fall back message if it cannot find an answer in the KB and also add a workflow transition.
h
Hi @loud-crowd-60573, thank you. Will try that out.
2 Views