Discourse AI + Google Search: website + forum | Is this correct?

Related to: Discourse AI - AI Bot (chatbot - ChatGPT- Anthropic) where it says:

So, I have been playing around with this and just want to make sure I understand this correctly.

My use-case is as follows (which I think applies to more people):

  • I have a website with a lot of blog posts

  • I have the forum on the same url

  • In my case the forum is not on a subdomain but in example.com/forum whereas all the other posts are in e.g. example.com/blog-post/. But it should not matter that much.

So what I did was:

  • Install the Discourse AI (love it btw)

  • Setup the custom google search API and CX

And started to play with the ChatBot. One question i told it was to:

  1. Get me all topics on a subject in the forum. Is it correct that for this it does not need google since it uses internal search? I am 99% sure it is that way.
  1. I then asked for all posts - except in the forum - on the same topic. I.e. I wanted it fetch them outside the forum. It worked, since it said it said it used Google.

image

  1. Can I deduce it used the ai_google_custom_search_api_key correctly?

Because what I am thinking of is that I setup the Google Search specifically to exclude the forum path. I.e. as below. But is this nescessary or am I overthinking it since it used the -inurl forum already in the query… :thinking:

Everything is 100% (sort of easily) debuggable. If you install data explorer you can see the actual JSON payload we injected in the prompt stream. The table ai_api_audit_logs contains the exact prompt we generated.

My original use case for Google was just to allow it to search everywhere, not restrict it down. That said, I think you can manage to get something working here. We may need though to adjust the prompt a bit to understand that this this google search is restricted. We may need an extra setting for it.

1 Like