POST
/
knowledge_graph
/
neo4j
/
Train Neo4J Knowledge Graph
curl --request POST \
  --url https://rag-prod.studio.lyzr.ai/v4/knowledge_graph/neo4j/ \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form 'schema_prompt=<string>' \
  --form 'extra_info=<string>' \
  --form file=@example-file
{
  "message": "Knowledge Graph trained successfully using Neo4J.",
  "rag_id": "6848ff3c4c291b4bef798e0c",
  "nodes_created": 142,
  "relationships_created": 315
}

Authorizations

x-api-key
string
header
required

Query Parameters

rag_id
string
required

The ID of the RAG system to train

Body

multipart/form-data
file
file
required

The document file (PDF or DOCX) to upload

schema_prompt
string

Allowed nodes and relationships for the knowledge graph

extra_info
string

Optional metadata or config in JSON string format

Response

Knowledge graph training completed successfully

message
string
Example:

"Knowledge Graph trained successfully using Neo4J."

rag_id
string
Example:

"6848ff3c4c291b4bef798e0c"

nodes_created
integer
Example:

142

relationships_created
integer
Example:

315