Replies: 1 comment
-
|
When connecting RagFlow as an external knowledge base in Dify, you only need to configure the API endpoint and API key—Dify will forward your query to RagFlow, and RagFlow handles the retrieval logic. Dify does not natively support metadata-based filtering or advanced parameter mapping for external knowledge bases; it simply passes parameters like question, dataset_ids, document_ids, and metadata_condition to RagFlow as part of the request payload. Whether metadata_condition works depends entirely on RagFlow's API implementation, not Dify's—Dify does not enforce or interpret these filters itself. If you need advanced filtering, you can use Dify's HTTP node to call RagFlow's API directly with custom parameters, or use a gateway (like nginx+lua) to adapt request/response formats if needed. Make sure the API response from RagFlow matches Dify's expected structure: a JSON object with a records array, each containing content, score, title, and optionally metadata. For more details, see this discussion and integration notes. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I want to connect an external Knowledge of RagFlow. I added the required parameters by dify. How to define the required parameters by external Knowledge?
below is the external Knowledge required visit api format.
curl --request POST
--url http://{address}/api/v1/retrieval
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <YOUR_API_KEY>'
--data '
{
"question": "What is advantage of ragflow?",
"dataset_ids": ["b2a62730759d11ef987d0242ac120004"],
"document_ids": ["77df9ef4759a11ef8bdd0242ac120004"],
"metadata_condition": {
"logic": "and",
"conditions": [
{
"name": "author",
"comparison_operator": "=",
"value": "Toby"
},
{
"name": "url",
"comparison_operator": "not contains",
"value": "amd"
}
]
}
}'
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions