-
|
I am trying to chat in ragflow using api. But the answer from api ist not as good as in web site. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @xyzhu68! I'm Dosu and I’m helping the ragflow team. When you chat with the RAGFlow API using chat_id, the system prompt is automatically used. If you do not provide a custom prompt configuration, the API assigns a default system prompt, which includes a section referencing the knowledge base with the placeholder If you want to customize the system prompt or add other variables, you can do so in the Chat Configuration under the Prompt Engine tab, and then pass values for custom variables via the API reference. If you notice that API answers are not as good as those from the website, it may be due to differences in prompt configuration, knowledge base binding, or how the To reply, just mention my name @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Hi @xyzhu68! I'm Dosu and I’m helping the ragflow team.
When you chat with the RAGFlow API using chat_id, the system prompt is automatically used. If you do not provide a custom prompt configuration, the API assigns a default system prompt, which includes a section referencing the knowledge base with the placeholder
{knowledge}. This variable is not optional and must be present in the system prompt for proper knowledge base integration. The{knowledge}variable is a reserved placeholder that RAGFlow replaces with the actual content (chunks) retrieved from your selected knowledge base(s) during each API call—it should not be manually replaced with the knowledge base name; just keep it as{…