Skip to main content
Version: 0.0.8 (stable)

Troubleshoot common errors

Neo4j examples use server version 5.26 and the driver version in the lock file. FalkorDB connection checks require version 4.22.2 or later. Exact error text can differ between versions.

External vector search fails​

SymptomCheckFix
VectorPlacementError on open or MCP startupCompare the configured store, prefix, dimensions, and distance with those used for ingestion.Restore the ingestion configuration. To change placement, re-ingest into a separate graph.
CollectionMismatchErrorCheck the dimensions and metric of the named Qdrant collection.Use the original embedder and collection prefix. Do not reuse another graph's prefix.
VectorStoreMissingExtraErrorCheck whether the qdrant extra is installed.Install agentic-graphrag[qdrant] alongside the graph driver extra.
VectorStoreError during hybrid searchCheck server version and connectivity.Use Qdrant 1.17.0 or later for weighted RRF and verify QDRANT_URL and authentication.
Committed nodes are absent from vector results after a failed writeInspect the ingestion failure report and collection counts.Run await graph.repair_vectors() with the original placement, then repeat the search.

Configure external placement before opening the graph or starting MCP.

FalkorDB refuses to connect​

SymptomCauseFix
GraphStoreError says the graph module is older than 42202The graph module does not meet the adapter's minimum version.Upgrade to FalkorDB 4.22.2 or later.
GraphStoreError names RESULTSET_SIZEThe server can truncate query results.Set RESULTSET_SIZE -1 in the server's FALKORDB_ARGS and restart the server.
Connection refusedThe Redis-protocol endpoint is not reachable.Check FALKORDB_URL, the container's published port, and redis-cli ping. The browser UI port is not the database port.

Run the FalkorDB connection check after the fix. For a missing graph, the first write creates it. If searches return no documents, check that FALKORDB_GRAPH matches ingestion. MCP also needs MCP_GRAPH_STORE=falkordb and the same embedding model and document scope.

A FalkorDB write leaves partial changes​

FalkorDB has no multi-statement rollback. A failed callback can leave earlier statements written. A stable request ID identifies a completed history or decision write, but does not undo partial effects. Follow the retry limits rather than assuming that a retry starts from an unchanged graph. For an interrupted document commit, Graph.open attempts recovery after the lease expires.

Neo4j rejects the login​

You see:

neo4j.exceptions.AuthError: {neo4j_code: Neo.ClientError.Security.Unauthorized} {message: The client is unauthorized due to authentication failure.}

The username or password does not match the server. Agentic GraphRAG reads NEO4J_USERNAME and NEO4J_PASSWORD. The default password is neo4j, so a server with another password fails.

  1. Set NEO4J_USERNAME and NEO4J_PASSWORD in your shell or in a .env file to the values of your server.
  2. Run this test. It prints connected when the login works.
import asyncio

from agrag.graphdb import build_graph_store


async def main() -> None:
graph_store = build_graph_store("neo4j")
await graph_store.connect()
print("connected")
await graph_store.close()


asyncio.run(main())

Neo4j is not reachable​

You see:

neo4j.exceptions.ServiceUnavailable: Couldn't connect to localhost:7699 (resolved to ('127.0.0.1:7699',)): Failed to establish connection ... [Errno 111] Connect call failed

Nothing accepts connections at NEO4J_URI. The server can be stopped, on another port, or still starting. A new Neo4j container needs about 30 seconds.

  1. Make sure that the server runs. For Docker, run docker ps.
  2. Make sure that NEO4J_URI names the right host and port. The default is bolt://localhost:7687.
  3. Run the test from the previous section until it prints connected.

Agentic GraphRAG refuses the Neo4j address​

You see:

Value error, 'bolt://db.example.com:7687' uses an unencrypted scheme ('bolt') but sends a configured credential to a non-local host; use one of ['bolt+s', 'bolt+ssc', 'neo4j+s', 'neo4j+ssc'] instead

Agentic GraphRAG does not send a password over an unencrypted connection to a remote host. Use an encrypted scheme. Aura addresses use neo4j+s://.

export NEO4J_URI="neo4j+s://<your-instance>.databases.neo4j.io"

A later add fails after you deleted data by hand​

You see:

GraphStoreAliasConflictError: merge_key alias already claimed by another entity: {'<label>:<name>': '<id>'}

Agentic GraphRAG keeps bookkeeping nodes beside the graph, such as merge aliases and document jobs. If you delete only the entity and chunk nodes, the bookkeeping points at entities that no longer exist.

To start over, delete every node in the database and drop the vector indexes. This removes all data in the database, so use it only when the database holds nothing but Agentic GraphRAG data. The embedding dimension does not match has the commands.

An add call reports duplicate document keys​

Graph.add raises ValueError: Each add call requires distinct document keys; duplicate: '<key>'. when two documents in one call share a key. A file document's key is its resolved path, so a repeated path causes the error. Remove the repeated source. For prebuilt Document objects, give each one a distinct uri.

Another job holds the document lease​

CutoverJobLeaseError means that another live job holds the lease on the document. A job renews a lease of 60 seconds, and another process can take the document over only after the lease runs out. Wait for the other call to finish, or for the lease to expire, and run the call again. CUTOVER_JOB_LEASE_TTL_SECONDS sets the lease length.

A package extra is missing​

The message names the extra to install. The command in the message is correct.

You seeInstall
GraphStoreMissingExtraError: needs the 'neo4j' extraneo4j
EmbeddingMissingExtraError: needs the 'embed-local' extraembed-local
ExtractorMissingExtraError: 'GlinerExtractor' needs the 'extract' extraextract
ExtractorMissingExtraError: 'BAMLExtractor' needs the 'llm' extrallm
AgentMissingExtraError: needs the 'observability' extraobservability
AgentMissingExtraError: needs the 'agents' extraagents
MissingExtraError: '.pdf' needs the 'docling' extradocling

Install an extra with uv pip install "agentic-graphrag[<extra>]".

A source with a missing loader extra follows your error policy. With SKIP, Agentic GraphRAG skips the file. With QUARANTINE, Agentic GraphRAG sets it aside and reports it. With RAISE, the run stops.

note

build_agent raises AgentMissingExtraError when the agents extra is not installed. Install agents to build the task agent.

The LLM extractor returns fewer entities than expected​

BAMLExtractor keeps an entity only when its name appears in the chunk text. Check these causes in order:

  1. The model changed the spelling. The match is case-sensitive and uses whole words. "ada lovelace" does not match "Ada Lovelace". Use a stronger model, or add the exact spelling rule to your entity-type descriptions.
  2. The name appears only in the heading. The heading is context. The extractor does not search it.
  3. The label is not in the schema. The parser removes the entity before the extractor sees it. Check the entity-type labels and descriptions.
  4. The chunk is long and the model stopped early. Use a smaller chunker size or a model with a larger context window.

UnparsableExtractionError means the model answered in prose or in broken JSON. BAML cannot read the reply, and BAMLExtractor reports the chunk as failed. In hybrid mode the chunk keeps the local result. In llm mode the run follows its error policy for that chunk. Use a larger model, or lower the chunk size.

An LLM call takes a very long time or retries many times​

EXTRACTION_LLM_RETRY sets how many times a failed call repeats and how long to wait between attempts. Its timeout_ms value is a deadline for starting new attempts. It does not stop a request that is already running. request_timeout_ms cancels an attempt after five minutes by default; 0 turns this limit off. A timed-out attempt can retry. With the fallback strategy the limit covers the whole attempt, so it is split evenly across the clients and rounded up for each client. A client that sets http.request_timeout_ms in its options keeps that value instead of its share. A value above 300000 raises the limit, and 0 removes it. To limit the total wait, lower max_retries and set both timeouts to values that allow one normal request to finish. A slow local model can take more than a minute for one chunk. A failed chunk follows the error policy you gave to Graph.add. See Configuration.

Resolution reports unavailable LLM pairs​

llm_unavailable_pairs is above zero in a resolution result or report. The resolver found ambiguous pairs but could not send them to the LLM because no LLM settings were configured.

Set EXTRACTION_LLM_CLIENTS, or set LLM_BASE_URL and LLM_MODEL_ID. Then run consolidate(apply=True) to review the remaining pairs.

The schema is rejected​

You see one of these:

Value error, Relation 'TREATS' pattern target 'Condition' is not a declared entity
Value error, Entity type 'Drug' declares reserved property name(s) ['name']; ['_pending_job_id', 'created_at', 'embedding', 'id', 'merge_count', 'merge_key', 'name', 'source_chunk_ids'] are keys that the graph writes itself. Rename or remove those property names in the schema.
Value error, Relation type 'MEMBER_OF' uses a reserved relationship type; the graph writes its own edges with ['EVIDENCED_BY', 'HAS_CHILD', 'HAS_DOCUMENT', 'HAS_PART', 'MATCHES', 'MEMBER_OF', 'MENTIONED_IN', 'NEXT_CHUNK', 'RESOLVED_AS', 'SOURCE', 'TARGET']. Rename the relation type, for example 'BELONGS_TO' for 'MEMBER_OF'.
Value error, Entity type 'Vendor' names unknown parent 'Organisation'. Declare 'Organisation' as an entity type or fix the spelling. Did you mean 'Organization'?
Value error, Entity type parents form a cycle: A -> B -> A. Remove one parent link in the cycle.
Value error, enum value(s) ['many'] are not valid for type 'integer'. An integer value looks like 12 or -3.

Every relation pattern must name entity types that the schema declares. An entity property cannot be named label, text, id, name, merge_key, merge_count, source_chunk_ids, created_at or embedding, because the graph writes those keys itself. A relation type cannot use the name of an edge that the graph writes itself, such as MEMBER_OF, MENTIONED_IN or NEXT_CHUNK. Each enum value of a property must match the property type. Every parent must be a declared entity type, and the parents must not form a cycle. A label can be declared only once, for entity types and for relation types.

Declare each entity type, then write the pattern. This schema passes:

from agrag.common.data_models import EntityType, GraphSchema, RelationType

schema = GraphSchema(
name="medicine",
version="1",
entities=[
EntityType(label="Drug", description="A medicine."),
EntityType(label="Condition", description="A disease or symptom."),
],
relations=[
RelationType(
label="TREATS",
description="A drug treats a condition.",
patterns=[("Drug", "Condition")],
)
],
)
print(schema.name, [entity.label for entity in schema.entities])

A search returns nothing​

A search that finds nothing raises no error in most cases. The result carries a status that names the cause. These are the causes, from most to least common.

The scope holds no readable documents. Search reads only the documents in scope. An empty scope returns empty_scope, and a key that no ingested document has behaves like a key the caller may not read: it never appears in results. Make sure that each key in the scope names an ingested document.

The vector index does not exist. A semantic or hybrid search finds no semantic hits when the chunk vector index is missing, and the result says index_not_ready. Before you search, open the graph once. Graph.open creates the indexes.

The embedder differs from the one that ingestion used. A query vector of another size fails the semantic leg. A hybrid search then returns lexical hits only and reports partial, and a semantic search returns failed with a message that names the mismatch. Set the same EMBEDDING_* settings that ingestion used, or search in lexical mode. To change the model of the graph, see the next section.

The embedding dimension does not match​

Graph.open compares the dimension of your embedder with the vector indexes that already exist. When they differ, it raises one of these errors:

EmbeddingDimensionMismatchError: expected dimension 384, embedder produces 4

The error comes from a Neo4j vector index. The stored vectors have 384 values each, and the embedder produces 4.

  1. To keep your data, open the graph with the original embedder.
  2. To change models, start with an empty database. This deletes all data in the database. Then open the graph with the new embedder and ingest your documents again.
await graph_store.execute_write("MATCH (n) DETACH DELETE n")
indexes = await graph_store.execute_read(
"SHOW INDEXES YIELD name, type WHERE type = 'VECTOR' RETURN name"
)
for row in indexes:
await graph_store.execute_write(f"DROP INDEX `{row['name']}` IF EXISTS")
SymptomCauseAction
VectorStoreMissingExtraError names milvusThe optional SDK is missing.Install agentic-graphrag[milvus] in the application's environment.
Settings reject an unencrypted endpointA remote credential would travel in plaintext, or strict TLS is enabled.Use the server's HTTPS URI. Put authentication in MILVUS_TOKEN, not the URI.
CollectionMismatchErrorExisting dense dimensions or distance differ from the requested configuration.Restore the original settings, or re-ingest into a new graph with a new prefix. Do not delete a collection still used by another graph.
Search rejects a result countThe requested count exceeds 16384, or a Zilliz gateway rejects the response size.Reduce the result limit. The gateway's byte limit can apply below 16384 results.
BM25 truncation warningText exceeds 65535 UTF-8 bytes.Use smaller chunks when lexical search must cover every character. Dense embeddings are unchanged.

The server must support the Milvus 3.0 APIs that the client uses, including sorted scalar queries used to page UUIDs. Use the same collection prefix for ingestion and retrieval. Check the Milvus connection settings without printing token values.

Weaviate cannot connect or rejects a collection​

The Weaviate client requires both HTTP and gRPC access. For a custom deployment, check WEAVIATE_URL and WEAVIATE_GRPC_PORT. For cloud, use WEAVIATE_MODE=cloud and an HTTPS cluster URL. A remote API key over plaintext is rejected before connection.

CollectionMismatchError means the collection does not match the requested dimensions or distance, or its description lacks valid adapter metadata. Reopen with the original embedder and prefix. Do not edit the description to bypass a mismatch. To change placement or embedding dimensions, ingest into a new graph with a new prefix.

A search limit above 10,000 raises ValueError. Reduce the requested limit. A selective graph-side filter can still return fewer hits than requested at that ceiling.