Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Docs: Updated descriptions on metadata filtering (#10518)

writinwatersff4239c7cf66
diff --git a/docs/guides/dataset/set_metadata.md b/docs/guides/dataset/set_metadata.md
index 904efaa9c3..a3d239927c 100644
--- a/docs/guides/dataset/set_metadata.md
+++ b/docs/guides/dataset/set_metadata.md
@@ -21,6 +21,10 @@ Ensure that your metadata is in JSON format; otherwise, your updates will not be
![Input metadata](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/input_metadata.jpg)
+## Related APIs
+
+[Retrieve chunks](../../references/http_api_reference.md#retrieve-chunks)
+
## Frequently asked questions
### Can I set metadata for multiple documents at once?
diff --git a/docs/references/http_api_reference.md b/docs/references/http_api_reference.md
index 12d20b2967..286aaa5a05 100644
--- a/docs/references/http_api_reference.md
+++ b/docs/references/http_api_reference.md
@@ -1823,7 +1823,21 @@ curl --request POST \
{
"question": "What is advantage of ragflow?",
"dataset_ids": ["b2a62730759d11ef987d0242ac120004"],
- "document_ids": ["77df9ef4759a11ef8bdd0242ac120004"]
+ "document_ids": ["77df9ef4759a11ef8bdd0242ac120004"],
+ "metadata_condition": {
+ "conditions": [
+ {
+ "name": "author",
+ "comparison_operator": "=",
+ "value": "Toby"
+ },
+ {
+ "name": "url",
+ "comparison_operator": "not contains",
+ "value": "amd"
+ }
+ ]
+ }
}'
```
@@ -1858,7 +1872,25 @@ curl --request POST \
- `"cross_languages"`: (*Body parameter*) `list[string]`
The languages that should be translated into, in order to achieve keywords retrievals in different languages.
- `"metadata_condition"`: (*Body parameter*), `object`
- The metadata condition for filtering chunks.
+ The metadata condition used for filtering chunks:
+ - `"conditions"`: (*Body parameter*), `array`
+ A list of metadata filter conditions.
+ - `"name"`: `string` - The metadata field name to filter by, e.g., `"author"`, `"company"`, `"url"`. Ensure this parameter before use. See [Set metadata](../guides/dataset/set_metadata.md) for details.
+ - `comparison_operator`: `string` - The comparison operator. Can be one of:
+ - `"contains"`
+ - `"not contains"`
+ - `"start with"`
+ - `"empty"`
+ - `"not empty"`
+ - `"="`
+ - `"≠"`
+ - `">"`
+ - `"<"`
+ - `"≥"`
+ - `"≤"`
+ - `"value"`: `string` - The value to compare.
+
+
#### Response
Success: