Importer Architecture
Knowledge graph collections, vector indexes, async-job lifecycle, and operational guidance for the Importer service
The Importer builds the Layer 3 Knowledge Graph in your ArangoDB database: the documents, chunks, entities, communities, and relationships that the AutoRAG (and downstream applications) query at runtime. This page describes the collections it creates, the vector indexes it adds, the asynchronous job lifecycle of an import, and the operational rules to keep in mind when deploying the service.
For Layer 1 and Layer 2 (modules and Corpus Graph), see AutoGraph Architecture.
Knowledge graph collections
After a successful import, the Importer creates a named graph
{project_name}_kg containing the vertex and edge collections below. All
collection names are prefixed with the project name configured at install
time (see LLM Configuration).
graph LR Document -->|PART_OF| Chunk Chunk -->|MENTIONED_IN| Entity Entity -->|RELATED_TO| Entity2["Entity"] Entity -->|IN_COMMUNITY| Community Community -->|SUB_COMMUNITY_OF| Community2["Community"]
| Collection | Type | full_graphrag | vector_rag |
|---|---|---|---|
{project}_Documents | vertex | yes | yes |
{project}_Chunks | vertex | yes | yes |
{project}_Entities | vertex | yes | - |
{project}_Communities | vertex | yes | - |
{project}_Relations | edge | yes | yes (PART_OF only) |
{project}_SemanticUnits | vertex | if enabled | if enabled |
Every Layer 3 document carries a partition_id field so that data from
different partitions coexists in the same collections. Filter by
partition_id when querying a specific partition.
Documents
- Purpose: Original text documents that were processed.
- Key fields:
_key: Unique identifier, built from a fingerprint of the content plus theimport_number, and prefixed with thepartition_idwhen the target is a SmartGraph. Because the fingerprint covers the content, files with identical content collapse into a single Document within one import.content: Full text content.file_name: Original filename.citable_url: URL used for inline citations at retrieval. Taken from the inlinefiles[].citable_urlfield, or from the file’s File Manager custom metadata on thefile_idandfile_idspaths. Empty forfile_contentandfile_urlimports, which have no way to supply one. See Citation URLs.partition_id: Partition the document belongs to.file_ids: List of File Manager ids stamped at import time, when the source is a File Manager file. Empty for inline orfile_urlimports without one. It is a list rather than a single id because_keyis a content hash: when several files hold the same content they share one Document, and the id of each of them is recorded here. Layer 3 removals resolve documents primarily by this field.import_number: The import batch that produced the document. Repeated imports into the same partition add further batches, which reclustering consolidates.
Chunks
- Purpose: Text chunks extracted from documents for granular processing.
- Key fields:
_key: Unique identifier.content: Chunk text.tokens: Number of tokens.chunk_order_index: Position within the source document.embedding: Vector embedding (when enabled).partition_id: Partition the chunk belongs to.
Entities
- Purpose: Entities extracted from text (people, organizations, concepts,
etc.). Only populated in
full_graphragmode. - Key fields:
_key: Unique identifier.entity_name,entity_type,description.embedding: Vector embedding.clusters: Community clusters the entity belongs to.partition_id: Partition the entity belongs to.
Communities
- Purpose: Clusters of related entities representing themes in the data.
Only populated in
full_graphragmode. - Key fields:
_key: Unique identifier.title: Cluster ID.report_string: Markdown report explaining the community.report_json: Structured report withtitle,summary,rating,rating_explanation, andfindings.level: Hierarchical level (e.g.,1for top-level).occurrence: Normalized score (0-1) for relative frequency.sub_communities: References to nested sub-communities.embedding: Vector embedding (whenenable_community_embeddingsistrue).partition_id: Partition the community belongs to.
Relations
- Purpose: Edges connecting all nodes in the Knowledge Graph.
- Key fields:
_from,_to: Source and target node references.type: Relationship type (see below).- For entity-to-entity edges:
weight,description,source_id,order. partition_id: Partition the relationship belongs to.
The Importer creates the following relationship types:
- PART_OF: Links chunks to their parent documents.
- MENTIONED_IN: Connects entities to chunks where they appear.
- RELATED_TO: Relationships between different entities.
- IN_COMMUNITY: Associates entities with their community groups.
- SUB_COMMUNITY_OF: Relates a sub-community to its parent community.
The community edges (IN_COMMUNITY, SUB_COMMUNITY_OF) only exist in
full_graphrag partitions. They are rebuilt if you
recluster such a partition after
incremental updates. The other relationship types are kept. A vector_rag
partition has no Entities or Communities and therefore no community layer
that could be rebuilt.
Semantic Units
- Purpose: Image references and web URLs extracted from documents. Only
created when
enable_semantic_unitsistrue. See Semantic Units for details.
Vector indexes
The Importer automatically creates a vector index named vector_cosine on
the embedding field of collections that received embeddings during an import:
- Entities: when the selected
rag_modeimports entities (e.g.,full_graphrag). - Chunks: when chunk embeddings are enabled (
enable_chunk_embeddings=trueinfull_graphrag, always on invector_rag). - Communities: when
enable_community_embeddings=true(default). - SemanticUnits: when
enable_semantic_unit_embeddings=true. - Relations: when
enable_edge_embeddings=trueand the mode imports relations.
These indexes power semantic similarity search and nearest-neighbor queries at
retrieval time. Index parameters (vector_index_metric,
vector_index_use_hnsw, vector_index_n_lists) are set per import; see the
Parameter Reference.
For background on ArangoDB vector indexes, see Vector indexes.
Asynchronous import lifecycle
Both POST /v1/import and POST /v1/import-multiple start work in the
background and return immediately. The diagram below shows how a client
submits an import and monitors progress.
An import begins by converting its inputs: every document that is not already plain text or Markdown is submitted to the File Parser service, which returns Markdown and, when image extraction is enabled, the embedded images as separate artifacts referenced at their position in that Markdown. The Importer chunks the Markdown, and the image references are what semantic units are built from. This stage is not reported as a separate job status. A document that cannot be parsed fails the import with the File Parser’s verdict in the status message. See Document conversion and supported formats.
flowchart LR
Client["Client / orchestrator"]
API["Importer API"]
Poll["<code>GET /v1/jobs/{job_id}</code>"]
Status["Platform service status"]
DB["ArangoDB knowledge graph"]
Client -->|POST /v1/import| API
Client -->|POST /v1/import-multiple| API
API -->|Single-file: no job_id| Status
API -->|Multifile: job_id| Poll
Client --> Poll
Client --> Status
API --> DB| Pattern | Submit | Monitor |
|---|---|---|
Single file (POST /v1/import) | Returns immediately with success: true | No job_id. Use the platform service status (the same status feed AutoGraph reads) |
Multiple files (POST /v1/import-multiple) | Returns a job_id | Poll GET /v1/jobs/{job_id} until job.is_terminal is true |
| Concurrency | Only one import or recluster job per replica at a time, under a single global lock | A second submit while one is running gets success: false (busy), not an HTTP conflict |
The same lock also applies to POST /v1/recluster: a replica can only run one
import or recluster job at a time. It is a single global lock per replica,
not keyed by partition, so any import blocks any recluster, no matter which
partitions the two jobs touch.
How a rejection is reported depends on the endpoint you call, so your client needs to handle both cases:
| Endpoint you call while the lock is held | What you get |
|---|---|
POST /v1/import, POST /v1/import-multiple | HTTP 200 with success: false and a busy message in the body. It is neither an HTTP conflict nor a gRPC status |
POST /v1/recluster | HTTP 503 (gRPC UNAVAILABLE) with the message in the body |
This is independent of which operation holds the lock. A blocked import reports
success: false even if a recluster job is running, and a blocked recluster
reports 503 even if an import is running. In both cases, wait until the
running job is done and try again. The exception is a single-file import, which
has no job_id. In this case, watch the platform service status instead. For the
recluster endpoint and how to poll its job, see
Incremental Updates. For the different response shapes,
see Error handling.
UNAVAILABLE, which the
gRPC-to-HTTP mapping turns into HTTP 503. An HTTP caller sees 503 with
the message in the body, and only a gRPC caller sees the UNAVAILABLE token
itself.Terminal statuses include service_completed, service_failed,
openai_graph_build_failed,
import_graph_to_adb_failed, and create_index_failed. Status messages may
include a [rag_mode=...] prefix or markers like [NO_ENTITIES_WRITTEN] or
[KG_VERIFICATION_INCONCLUSIVE]; see
Error handling for the full list.
Operational guidance
The recommendations below apply whether you call the Importer directly or via AutoGraph orchestration.
- Choose
rag_modeexplicitly -full_graphrag(default when omitted) for entity and community graphs;vector_ragfor chunk-only retrieval. - Use multi-file imports plus the jobs API for batches; use single-file import only when you already integrate with data platform service status.
- Serialize imports per replica - wait for
service_completedor a terminal job status before submitting again. - Match
embedding_dimto the deployed embedding model. Mismatches cause vector-index creation to fail at runtime. - Prefer File Manager
file_ids for large files already on the data platform instead of inline base64 payloads. - Plan for long-running jobs. Graph build and vector-index training can take tens of minutes; ensure tokens can renew (the data platform JWT lifetime applies).
- SmartGraph constraints: use
smart_graph_attribute="partition_id", a validpartition_id, andshard_count=1when creating a new SmartGraph. See Import Files for details.
