-
Notifications
You must be signed in to change notification settings - Fork 9
DOC-829 | GraphRAG: Add multi-file import, semantic units, restructure content #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Deploy Preview Available Via |
|
Thanks for your work @nerpaula , I have added one comment, please resolve it, Otherwise LGTM. Full example JSON payload for ImportMultipleFilesRequest (/v1/import-multiple): |
diegomendez40
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work @nerpaula . I have added some comments. Please feel free to reach out for any clarification.
| ## Multi-File Import | ||
|
|
||
| Use multi-file import when you need to process multiple documents into a single | ||
| Knowledge Graph. This API provides streaming progress updates, making it | ||
| ideal for batch processing and long-running imports where you need to track progress. | ||
|
|
||
| ``` | ||
| POST /v1/import-multiple | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no mention of a reference architecture nor the AutoGraph. Our recommended way to ingest a huge corpus is by using the AutoGraph to create different clusters (mini-topics), then ingesting each of them with the multi-file importer into its own graphrag partition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected right now. Will be enhanced with reference architecture and documentation for AutoGraph, I will treat that in a separate task/PR.
| - `vector_index_metric`: Distance metric for vector similarity search. The supported values are `"cosine"` (default), `"l2"`, and `"innerProduct"`. | ||
| - `vector_index_n_lists`: Number of lists for approximate search (optional). If not set, it is automatically computed as `8 * sqrt(collection_size)`. This parameter is ignored when using HNSW. | ||
| - `vector_index_use_hnsw`: Whether to use HNSW (Hierarchical Navigable Small World) index instead of the default inverted index (default: `false`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure these params will reach February release. I will check and come back to you.
| - `smart_graph_attribute`: SmartGraph attribute for graph sharding. | ||
| - `shard_count`: Number of shards for the collections. | ||
| - `is_disjoint`: Whether the graphs must be disjoint. | ||
| - `satellite_collections`: An array of collection names to create as Satellite Collections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure these params will reach February release. I will check and come back to you.
| ## Performance Considerations | ||
|
|
||
| ### Size Guidelines | ||
|
|
||
| - **Small Documents** (< 1MB): All features enabled with minimal impact. | ||
| - **Medium Documents** (1-10MB): Consider disabling `store_image_data` for large images. | ||
| - **Large Documents** (> 10MB): Use `enable_semantic_units=true, process_images=false, store_image_data=false` for basic URL extraction. | ||
|
|
||
| ### LLM Compatibility | ||
|
|
||
| The semantic units processing works with all LLM providers: | ||
| - **OpenAI**: GPT-4o, GPT-4o-mini (all models supported). | ||
| - **OpenRouter**: Gemini Flash, Claude Sonnet (all models supported). | ||
| - **Triton**: Mistral-Nemo-Instruct (all models supported). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this come from? I don't think most of this information is correct. Semantic Units require multimodal LLMs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Semantic Units Collection | ||
|
|
||
| - **Purpose**: Stores semantic units extracted from documents, including image | ||
| references and web URLs. This collection is only created when `enable_semantic_units` | ||
| is set to `true`. | ||
| - **Key Fields**: | ||
| - `_key`: Unique identifier for the semantic unit. | ||
| - `type`: Type of semantic unit (always "image" for image references). | ||
| - `image_url`: URL or reference to the image/web resource. | ||
| - `is_storage_url`: Boolean indicating if the URL is a storage URL (base64/S3) or web URL. | ||
| - `import_number`: Import batch number for tracking. | ||
| - `source_chunk_id`: Reference to the chunk where this semantic unit was found. | ||
|
|
||
| {{< info >}} | ||
| Learn more about semantic units in the [Semantic Units guide](semantic-units.md). | ||
| {{< /info >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is intended for immediate release, it makes sense. If we would want to use it for February release, then we should also add that Semantic Units can also store other sources, such as DB entities via the VirtualGraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is intended for immediate release. VirtualGraph will be treated in a separate task/PR.
Co-authored-by: Diego M-R <[email protected]>
Description
Note
Restructures GraphRAG Importer documentation into a dedicated section and expands capabilities documentation.
reference/importer/section with pages:LLM Configuration,Import Files,Semantic Units,Verify and Explore, andParametersPOST /v1/import-multiplewith streaming progress eventsreference/importer.mdtoreference/importer/and fixes anchors (incl. Triton page)Written by Cursor Bugbot for commit cb6ea66. This will update automatically on new commits. Configure here.