https://discord.gg/botpress logo
Stop inline citations
# 🤝help
s
GPT 04-mini seems to include inline citations in its response. For example: "Based on my search, the website handles credit card transaction processing through a PCI DSS 4.0 compliant network 【25, 26】" Any ideas how to stop the citations? I see this related message in the studio logs but there is nothing in the instructions Ive given to the autonomous node so not sure where this is coming from. Logs: output: [Error: {"name":"ThinkSignal","message":"Think signal received: We got the search results. When answering the question, you MUST add inline the citations used (eg: 【X】)
p
You can override this by using the policy agent.
s
thanks, ill give that a try
p
No worries :))
s
The policy agent was able to remove the citations
p
Glad it worked out!
s
Thank. Ok so they policy agent had other issues. It was good at removing citations but seemed to be enforcing other rules that I did not give it. For example if the message had "password" it in then the entire message was removed. I also tried the personality agent. I was able to add a simple Before Outgoing hook which I wanted to post in case others have this issue:
Copy code
async function hook(outgoingEvent: IO.OutgoingEvent, event: IO.IncomingEvent): Promise<void> {
  /** Your code starts below */

  outgoingEvent.payload.text = outgoingEvent.payload.text.replace(/ ?【.*】/g, '')

  /** Your code ends here */
}
p
@square-king-46874 Nice work around!
3 Views