Lang chain: Need ot set up system & user prompt + using retriever

Is there a possibility to send a system and user prompt to an LM and have the thing hooked up to a retriever?

So he has the problem:

The task requires me to set a system prompt because otherwise the responses from the LLM’s are not good enough. Also, I need the system to train on various data sets. For that, I need the retriever.

As far as I know, there’s only a retriever in notes where I cannot set a system prompt.

If anybody has an idea, how to realise this, please let me know.

Please share your workflow

Information on your n8n setup

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

Hi @ManyQuestions, I think it’s possible to send a system prompt and user prompt to a LM and have it connected to a retriever in n8n like a Vector Store Retriever for example. Here’s an example workflow template Ask questions about a PDF using AI | n8n workflow template that might give you a bit of inspiration?

Not sure if I fully understood your question so I’m sorry if that wasn’t what you asked, feel free to ask more questions, share your workflow json or more details about what you want to achieve with the workflow :sunflower:

1 Like

Hello, sorry for the super late reply. I know this workflow, and I am using a version of it, but I don’t know how to send a system prompt to the LLM with that.