ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: what's the intermediate prompt

Open ObsisMc opened this issue 10 months ago • 3 comments

Describe your problem

I am using the chat feature and I am wondering what the content of the variable knowledge is in the system prompt. Are they the original chunks retrieved from the knowledge base?

In this case, I want to know where I can find the real intermediate prompt or which code is responsible for building the prompt.

Thank you!

Image

ObsisMc avatar Mar 05 '25 15:03 ObsisMc

Hiya, {knowledge} is a hard-coded variable, which refers to all chunks in your chosen knowledge base(s). In other words, with this prompt, chunks from your chosen knowledge base(s) will be fed to the chat model (LLM).

writinwaters avatar Mar 06 '25 02:03 writinwaters

Hiya, {knowledge} is a hard-coded variable, which refers to all chunks in your chosen knowledge base(s). In other words, with this prompt, chunks from your chosen knowledge base(s) will be fed to the chat model (LLM).

Thanks for your reply.

I have another question. Since my chunk size is large, then if the total length of retrieved chunks is larger than the max token my LLM can take, will Ragflow directly truncate the retrieved chunks?

ObsisMc avatar Mar 06 '25 04:03 ObsisMc

It will.

KevinHuSh avatar Mar 06 '25 06:03 KevinHuSh