Ignore base knowledge, ONLY use rags?

Hey all.

If i want to rely ONLY on rag data sources, and be guaranteed to never use the base LLM, other than for reasoning and conversation… how might I do that? Thanks in advance.

I tried giving the agent (tools agent) this directive in the description. I told it not to use gpt4o (for example) for knowledge, and strictly use the pdf’s I provided, but it still answers questions it wouldn’t know from the provided pdfs. Thanks.

n8n version: the latest
Database: Pinecone
n8n EXECUTIONS_PROCESS setting: own, main
Running n8n via: n8n cloud
Operating system: win11

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Alpay_Kasal, Welcome to the community!

As I understand your question, you’re trying to use an LLM to answer a question, but not make up any facts? This is a tricky problem, that goes far beyond what n8n can offer you support on.

However, one thing that you could try is explicitly stating: “Answer questions based on this context only”, and add your context as “xml-like” structures, something like this:

Please answer the following question using only the information from the information provided. If the information provided does not contain the answer to the question, respond with "I don't know".

<information>
information here
</information>

<question>
question here
</question>

Next to that, you can also try to use the “Question and Answer” (Q&A) node, if the Agent is going “off script” too often. The difference is that the Q&A node will retrieve the relevant chunks first, and then try to answer the question based on the information provided. The Agent has more leeway to call the tools if it pleases.

Other than that: it’s mostly trying to iterate on your prompts. Good luck!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.