AgentisProAGENTISPRO RAG ENGINE
Knowledge graph

Knowledge Graph Overview

Understanding the Knowledge Graph in AgentisPro RAG Engine

Knowledge Graph Overview

The Knowledge Graph is the brain of AgentisPro RAG Engine. It stores entities, relationships, and context extracted from your documents, enabling intelligent multi-hop queries.

Automatic Extraction

You don't need to manually create the Knowledge Graph. AgentisPro automatically extracts entities and relationships from every document you upload using LightRAG's NLP pipeline.

What is a Knowledge Graph?

A Knowledge Graph is a network of:

  • Nodes (Entities): People, organizations, products, concepts
  • Edges (Relationships): How entities connect to each other
  • Properties: Attributes of nodes and edges
┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│     ┌──────────┐                        ┌──────────────┐               │
│     │  Person  │───────works_at────────▶│ Organization │               │
│     │  "John"  │                        │   "Acme"     │               │
│     └──────────┘                        └──────────────┘               │
│          │                                     │                        │
│          │ authored                            │ produces               │
│          ▼                                     ▼                        │
│     ┌──────────┐                        ┌──────────────┐               │
│     │ Document │◀──────describes────────│   Product    │               │
│     │ "Manual" │                        │  "Widget X"  │               │
│     └──────────┘                        └──────────────┘               │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

How It's Built

Automatic Entity Extraction

When you upload a document, AgentisPro:

  1. Parses the document (text, images, audio, video)
  2. Extracts entities using LightRAG's NLP pipeline
  3. Detects relationships between entities
  4. Stores everything in Neo4j with workspace isolation
# Example: Processing a document
document = "John Smith, CEO of Acme Corp, announced the launch of Widget X."
 
# Extracted entities:
# - John Smith [Person]
# - CEO [Role]
# - Acme Corp [Organization]
# - Widget X [Product]
 
# Detected relationships:
# - John Smith → has_role → CEO
# - John Smith → works_at → Acme Corp
# - Acme Corp → launched → Widget X

Technology Stack

ComponentTechnologyRole
StorageNeo4j 5.26+Graph database
ExtractionLightRAGNLP entity/relationship extraction
VisualizationSigma.jsInteractive graph UI
VectorsNeo4j HNSWEmbedded in same database

Key Features

🔗 Multi-Hop Queries

Ask questions that require following relationships:

"Who are the authors of documents related to Project X that mention compliance issues?"

The graph traverses: Project X → related_documents → Document → authored_by → Person

🏢 Workspace Isolation

Each workspace has its own isolated graph:

// Workspace A cannot see Workspace B's entities
MATCH (e:Org_workspace_a:Entity)
RETURN e

Queries use both:

  • Vector search: Find semantically similar chunks
  • Graph traversal: Expand context via relationships

✏️ Manual Editing

You can:

  • Add new entities manually
  • Create relationships between entities
  • Edit entity properties
  • Delete entities and relationships

Entity Types

AgentisPro automatically classifies entities:

TypeIconExamples
Person👤Employees, customers, authors
Organization🏢Companies, departments, teams
Product📦Products, services, features
Location📍Offices, regions, addresses
Event📅Meetings, launches, deadlines
Concept💡Topics, categories, tags
Document📄Files, reports, contracts

Relationship Types

Common relationship patterns:

RelationshipExample
works_atPerson → Organization
authoredPerson → Document
mentionsDocument → Entity
related_toEntity → Entity
part_ofProduct → Product
located_inOrganization → Location

Accessing the Knowledge Graph

Web UI

Navigate to Knowledge Graph in the sidebar to:

  • Visualize the graph
  • Search for entities
  • Explore relationships
  • Edit nodes and edges

API

# Get all entities for a workspace
GET /knowledge-graph/entities
 
# Get relationships for an entity
GET /knowledge-graph/entities/{entity_id}/relationships
 
# Create a new entity
POST /knowledge-graph/entities
{
  "name": "New Product",
  "type": "Product",
  "properties": {"version": "1.0"}
}

Best Practices

  1. Upload related documents together - Helps entity linking
  2. Use consistent naming - "Acme Corp" vs "Acme Corporation"
  3. Review extracted entities - Fix errors early
  4. Create manual relationships - For important connections

Next Steps