Skip to main content
The Knowledge Graph option in Lyzr’s Knowledge Base uses a Neo4j graph database to map entities and their relationships across your documents. Where Classic Knowledge Base retrieves isolated text chunks, a Knowledge Graph traverses typed connections between concepts, enabling accurate answers to queries that span multiple documents or require understanding how things relate. Use this option when your content has strong entity relationships: legal documents, SOPs, org charts, process documentation, or any domain where “how does X relate to Y” matters as much as “what is X.”

Prerequisites

You must bring your own Neo4j instance. Lyzr does not provision Neo4j for you.
  1. Go to https://neo4j.com/cloud and sign up for a Neo4j Aura free or paid account.
  2. Create a new project and launch a database instance.
  3. Copy the following credentials from your Neo4j dashboard:
    • URI (for example, neo4j+s://yourdb.neo4j.io)
    • Username
    • Password
  4. Optionally, test the connection in the Neo4j Console before proceeding.

Connect Neo4j to Lyzr

Data Connectors are managed under Connections > Data Connectors in the Studio sidebar.
  1. Select Connections in the sidebar, then open Data Connectors.
  2. Find the Neo4J GraphDB card and select + to add a new connection.
  3. Enter a Name, the URI, Username, and Password from your Neo4j account.
  4. Save the connector.
Screenshot of the Data Connectors page in Lyzr Studio showing the Neo4J GraphDB card with a + button and a count of connected databases. Lyzr uses this connection to store and query the graph it builds from your documents.

Create a Knowledge Graph KB

  1. Go to Knowledge Base and select + New.
  2. Select Graph as the Knowledge Base Type.
  3. Select the Neo4j connector you configured above.
  4. Select Create Knowledge Base.

Upload and parse documents

Upload the documents you want to index. Supported formats: PDF, DOCX, TXT, Markdown. Multiple files can be uploaded at once. Lyzr automatically parses each document to:
  • Identify named entities (people, organizations, tools, concepts) and their types.
  • Extract semantic relationships between entities, for example “Person A manages Team B” or “Tool X is used for Task Y”.
  • Construct a graph schema from the extracted data.
Entities become nodes in the Neo4j graph. Relationships become typed, directional edges. The resulting graph is stored in your Neo4j instance and is browsable through Neo4j’s native visual tools. Screenshot of a sample entity-relationship graph in Neo4j, showing nodes connected by labeled edges.

Playground Retrieval

Once the graph is built, open the Knowledge Base and use the Playground Retrieval panel to test queries before attaching the KB to an agent. Type a natural language question and select Retrieve to see which entities and relationships are returned. This helps verify that the graph has been constructed correctly and that multi-hop queries resolve as expected.

Query the Knowledge Graph

Once the graph is built, agents can query it using natural language. Lyzr translates the question into a Cypher graph traversal and returns results that span multiple documents and entities. Example queries:
  • “How does the approval process work across departments?”
  • “Which tools are linked to a specific use case?”
  • “What dependencies exist between tasks or agents?”

When to use Knowledge Graph vs. Classic KB

NeedUse
Document Q&A, topic searchClassic Knowledge Base
Cross-document reasoning, entity relationshipsKnowledge Graph
Structured data, SQL-backed answersSemantic Model

Next steps