Arango logo

AutoGraph RAG Strategizer Reference

Analyze document clusters, assign RAG strategies, and override them per cluster

Trigger RAG Strategizer

POST https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/analyze

Analyze existing clusters and assign a RAG strategy to each of them. Must be called after a corpus build is completed.

Recommended path: Call after the corpus build reaches completed, and before POST /v1/orchestrate. If you rebuild the corpus, run the strategizer again so that rags reflects the current clusters.

Request

{
  "project": "my_project",
  "complexity": "high",
  "extract_images_default": false,
  "categories": ["legal", "marketing"],
  "max_parallel_clusters": 5
}

Parameters

ParameterTypeRequiredDescriptionRecommended value
projectstringYesHas to match the project the service runs against.The project name of your deployment.
complexitystringYesControls what fraction of clusters receives FullGraphRAG. The rest get VectorRAG. Values: very_low → 0%, low → 25%, moderate → 50%, high → 75%, very_high → 100%. Omitting it, or sending an unknown value, returns 400.very_high when every partition has to serve entity-based queries. high as a balanced default for mixed corpora.
extract_images_defaultbooleanNoWhen true, enables the image processing flags (semantic units, image processing, image embeddings) on FullGraphRAG profiles only. Allowed when complexity is high or very_high. VectorRAG profiles always keep these flags at false.false (default). Set it to true only when you need multimodal image extraction.
categoriesstring[]NoBare category labels, to scope the run to specific categories. Not validated up front: the request always returns 202. If any listed category has no matching cluster, the asynchronous job ends with status: failed and a message naming the categories it could not match.Omit or send [] to analyze every category. Use the bare label from Project Overview to re-run one of them.
max_parallel_clustersintegerNoLimits how many clusters are analyzed concurrently. Each analysis can call the LLM.Default: 5. Lower it to 2–3 if you hit LLM rate limits.

full_graph_rag_strategy has been removed. The field is dropped silently by the gateway, so a client that only sends it now gets 400 (complexity is required). Replace it with complexity:

Old full_graph_rag_strategyNew complexityFullGraphRAG share
very highvery_high100%
highhigh75%
-moderate50%
lowlow25%
very lowvery_low0%

Custom percentage strings such as "40%" are no longer supported. Pick the nearest of the five values.

How complexity is applied

The percentage applies to the ranked cluster list: the top round(percentage / 100 * cluster_count) clusters get FullGraphRAG and the rest get VectorRAG. With few clusters, the rounding decides the outcome. At moderate, a project with a single cluster gets round(0.5) == 0 FullGraphRAG clusters, so the whole project ends up on VectorRAG:

ClustersResult at moderate
10 FullGraphRAG · 1 VectorRAG
21 FullGraphRAG · 1 VectorRAG
32 FullGraphRAG · 1 VectorRAG
42 FullGraphRAG · 2 VectorRAG
52 FullGraphRAG · 3 VectorRAG

A VectorRAG partition has no Entities and no Communities, so it cannot serve LOCAL, GLOBAL, or UNIFIED queries. Send very_high when every partition has to support entity-based retrieval. See Retrieval capability per strategy.

In the web interface, the split between the two strategies is exposed as the Complexity slider of the strategy generation wizard, which runs from Vector only (no FullGraphRAG) to Graph + images (FullGraphRAG everywhere, with image extraction). See Web Interface.

Response

{
  "strategize_job_id": "strat_1738000000_a1b2c3d4"
}

The strategizer runs asynchronously. Poll GET /v1/rag-strategizer/jobs/{strategize_job_id} for the live progress.

For each cluster the strategizer samples documents, computes a complexity score, and assigns FullGraphRAG or VectorRAG. For FullGraphRAG clusters it also uses an LLM to generate a domain-specific ontology of 8 to 12 entity types. The ontology and the strategy profiles are persisted to the rags collection and later passed to the Importer to constrain entity extraction, see Per-cluster ontology.

Status CodeMeaning
202Strategizer accepted and started in the background
400Invalid project, complexity, or extract_images_default, or the model configuration gate is latched (see Corpus Build)
401Authentication failed
403No database access
409A corpus build is still in progress, another strategizer run is active, or a project deletion has started
500Server error
This endpoint returns 202, not 200. Accept any 2xx as “accepted”. The response body is unchanged.
Re-running the strategizer does not overwrite existing profiles. A cluster that already has a document in rags is reported as skipped and left as it is. The completion message names the skipped cluster IDs. If the strategy type would have changed, a warning is logged and both documents stay active. Clear the rags collection before you re-run if you need a clean slate, or override individual clusters with PATCH /v1/rag-strategizer/strategy/{cluster_id}.

HTTP Example

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "project": "my_project",
    "complexity": "high",
    "extract_images_default": false,
    "max_parallel_clusters": 5
  }' \
  https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/analyze

Monitor a strategizer job

GET https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/jobs/:strategize_job_id

Poll the live progress of an analyze run with the strategize_job_id that POST /v1/rag-strategizer/analyze returned. Use it to drive a progress bar while the job runs in the background.

Parameters

ParameterLocationRequiredDescription
strategize_job_idURL pathYesThe ID returned by the analyze request.

Response

{
  "status": "running",
  "progress": 42.0,
  "clusters_total": 10,
  "clusters_done": 4
}
FieldTypeDescription
statusstringidle, pending, running, completed, or failed.
progressnumberOverall progress in percent, 0.0–100.0.
clusters_totalintegerClusters to analyze. 0 until the number is known.
clusters_doneintegerClusters that have finished, including empty and failed ones.

Poll until status is completed or failed. A terminal snapshot is kept for a bounded window, one hour by default, and is then evicted. The status lives in memory and is lost on a pod restart.

Status CodeMeaning
200Snapshot returned
401Authentication failed
404Unknown or expired strategize_job_id, including an empty ID
A scoped run fails as a whole. If you sent categories and any of the listed categories has no matching cluster, the job ends with status: failed, even when the other categories did match. The message names the categories it could not match, echoed back in the form you sent them. Category labels are case-sensitive; check them against Project Overview.

HTTP Example

curl -H "Authorization: Bearer <token>" \
  https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/jobs/strat_1738000000_a1b2c3d4

Retrieve RAG Strategies

GET https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/strategy

Retrieve all RAG strategies that have been created.

Recommended path: Optional audit step after the strategizer job reaches completed. Use it to check which strategy each cluster was assigned before you orchestrate, and to get the rag_partition_id values that POST /v1/graph/recluster takes. Safe to call anytime for read-only inspection.

Request

No body or query parameters.

Response

{
  "strategies": [
    {
      "cluster_id": "cluster_legal_0",
      "strategy_type": "FullGraphRAG",
      "rag_partition_id": "legal_0_a",
      "entity_types": ["CONTRACT", "JURISDICTION", "LEGISLATION"],
      "document_count": 25,
      "parameters": {
        "rag_mode": "FullGraphRAG",
        "module": "legal",
        "batch_size": "100",
        "enable_chunk_embeddings": "true",
        "enable_edge_embeddings": "false",
        "chunk_token_size": "1200",
        "chunk_overlap_token_size": "100",
        "community_report_num_findings": "5-10",
        "enable_semantic_units": "true"
      }
    },
    {
      "cluster_id": "cluster_legal_1",
      "strategy_type": "VectorRAG",
      "rag_partition_id": "legal_1_b",
      "entity_types": [],
      "parameters": {
        "rag_mode": "VectorRAG",
        "module": "legal"
      }
    }
  ],
  "total_strategies": 2,
  "strategy_type_counts": {
    "FullGraphRAG": 1,
    "VectorRAG": 1
  }
}
FieldTypeDescription
strategiesarrayOne entry per cluster strategy profile.
strategies[].cluster_idstringDomain/cluster key (e.g. cluster_legal_0, or cluster_0 when no category prefix applies). This is the value that PATCH /v1/rag-strategizer/strategy/{cluster_id} takes.
strategies[].strategy_typestringFullGraphRAG or VectorRAG. Decides which query modes the partition can serve, see Retrieval capability per strategy.
strategies[].rag_partition_idstringId passed to the Importer, and the id that POST /v1/graph/recluster takes in its partition_ids. It is not accepted by POST /v1/orchestrate, which scopes by categories and file_ids. Suffix _a = FullGraphRAG, _b = VectorRAG.
strategies[].entity_typesarrayDomain-specific entity types generated by the LLM for FullGraphRAG clusters. Always empty for VectorRAG, which extracts no entities. Passed to the Importer to constrain entity extraction (see Per-cluster ontology).
strategies[].document_countintegerDocuments in that cluster.
strategies[].parametersmapAll non-core fields stored alongside the strategy, as a string-to-string map. Always includes rag_mode (mirrors strategy_type) and the module label when one applies. FullGraphRAG profiles additionally include the importer tunables shown above (batch_size, enable_chunk_embeddings, enable_edge_embeddings, chunk_token_size, chunk_overlap_token_size, community_report_num_findings, enable_semantic_units). Note that while enable_semantic_units is set to true, automatic citation extraction is not yet implemented (see Known Limitations). If LLM-driven entity-type generation failed for a FullGraphRAG cluster, the field entity_generation_error is included and entity_types is empty. Booleans and numbers are serialized as their string form.
total_strategiesintegerLength of strategies.
strategy_type_countsmape.g. counts of VectorRAG vs FullGraphRAG.
This response does not carry the category label of its own. The cluster_id embeds it, but to scope an orchestration run, pass the bare category labels from Project Overview instead.

HTTP Example

curl -H "Authorization: Bearer <token>" \
  https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/strategy

Update a cluster strategy

PATCH https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/strategy/:cluster_id

Override the strategy type, the entity types, and the image extraction flag of a single cluster. Use it when the automatically assigned strategy is not what you want.

Recommended path: Call after GET /v1/rag-strategizer/strategy and before POST /v1/orchestrate.

Override before the first orchestration. The rag_partition_id of the strategy is never changed by this endpoint, so a partition that is already in the knowledge graph still counts as built. POST /v1/orchestrate then returns 409 instead of importing it again under the new strategy.

To change a partition that has already been imported, delete the category with DELETE /v1/projects/{project}/categories/{category}, build it again, re-run the strategizer, and orchestrate.

Request

{
  "strategy_type": "FullGraphRAG",
  "entity_types": ["PERSON", "ORGANIZATION", "LOCATION"],
  "extract_images": false
}
ParameterTypeRequiredDescription
cluster_idURL pathYesThe cluster to update, for example cluster_legal_0. Take it from GET /v1/rag-strategizer/strategy.
strategy_typestringYes"FullGraphRAG" or "VectorRAG".
entity_typesstring[]NoDomain-specific entity types. Forced to [] when strategy_type is VectorRAG.
extract_imagesbooleanNoEnables image extraction. Forced to false when strategy_type is VectorRAG.
VectorRAG normalizes the request. With strategy_type: "VectorRAG", entity_types is always stored as [] and the image flags (extract_images_default, enable_semantic_units, process_images, enable_semantic_unit_embeddings) are always stored as false, whatever the request contained.

Response

{
  "strategy": {
    "cluster_id": "cluster_legal_0",
    "strategy_type": "FullGraphRAG",
    "rag_partition_id": "legal_0_a",
    "entity_types": ["PERSON", "ORGANIZATION", "LOCATION"],
    "document_count": 25,
    "parameters": {
      "rag_mode": "FullGraphRAG",
      "updated_at": "1752844800.0",
      "extract_images_default": "false",
      "enable_semantic_units": "false",
      "process_images": "false",
      "enable_semantic_unit_embeddings": "false",
      "batch_size": "100",
      "enable_chunk_embeddings": "true",
      "chunk_token_size": "1200",
      "chunk_overlap_token_size": "100"
    }
  }
}
FieldTypeDescription
strategy.cluster_idstringThe cluster that was updated.
strategy.strategy_typestringThe persisted strategy type.
strategy.rag_partition_idstringUnchanged, the same value as before the update.
strategy.entity_typesarrayThe persisted entity types, [] for VectorRAG.
strategy.document_countintegerThe unchanged document count of the cluster.
strategy.parametersmapAll remaining fields, including the image flags, stored as strings.
Status CodeMeaning
200The strategy has been updated
400cluster_id is empty, or strategy_type is missing or not one of the two valid values
401Authentication failed
404No strategy document exists for this cluster_id
409A corpus build or an orchestration is running. Wait for it to finish.
500Server error

HTTP Example

curl -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "strategy_type": "VectorRAG",
    "entity_types": [],
    "extract_images": false
  }' \
  https://<EXTERNAL_ENDPOINT>:8529/autograph/v1/rag-strategizer/strategy/cluster_legal_0

Retrieval capability per strategy

The strategy of a cluster decides what a query against that partition can answer. This is by design: a VectorRAG partition has no Entities and no Communities, and the entity-based query modes are built on that entity layer.

StrategyLayer 3 contentsQuery modes the partition can serve
FullGraphRAGDocuments, Chunks, Relations, Entities, CommunitiesLOCAL, GLOBAL, UNIFIED
VectorRAGDocuments, Chunks, Relationsnone of LOCAL, GLOBAL, UNIFIED

The partition is the unit, not the project. A project that holds both strategies answers entity-based queries only from its FullGraphRAG partitions. A question whose answer sits in the documents of a VectorRAG partition still comes back unanswered, because the partition cannot serve the mode.

A project that is entirely VectorRAG answers nothing in these modes, and nothing looks broken. The corpus build reports completed, the orchestration reports failed_jobs: 0, and the knowledge graph is reported as built with an entity count of 0. Check strategy_type_counts in GET /v1/rag-strategizer/strategy: if it contains only VectorRAG, no partition can serve entity-based retrieval.

AutoGraph does not run queries and cannot reject an incompatible query mode. A query against a VectorRAG partition is answered with nothing found, rather than refused.

To make every partition entity-capable, send complexity: "very_high" to POST /v1/rag-strategizer/analyze, or override individual clusters with PATCH /v1/rag-strategizer/strategy/{cluster_id}. Do both before you orchestrate.

Next Steps