Improving quality of search filters in Discourse AI

When you read stuff it is injected into the conversation stream.

Eg:

  • Can you read X
  • Tool call read X
  • Tool result “the page”
  • LLM reply

RAG is a very overloaded term, but at the end reading a topic adds it to the context, the llm at the end is responsible for how to use it, various llms may make better or worse usage out of it.

Eg: [Untitled AI bot PM] - AI Conversation - Discourse Meta

Search tool already inserts excerpts of topics, having it and a RAG on the same content does not make sense.

What you are saying, I guess, is that “search is giving context, but not enough context”.

So one workaround is to export all the important topics into a file, then use it as a RAG. Do not use search tool.


Simplest thing for now is:

categories:cat1,cat2,cat3 in:first

This will restrict the search tool to first posts only.

It is very efficient, see:

This works cause the search tool injects the following into the context:


I also want an unconditional “rag” mode where you can opt to inject even more data (eg: find top 5 documents and inject up to 5000 tokens per document, trying to find most relevant sections)

Its a complicated change, we will get there, but for now … search + read gets you quite far.