How neo4j-labs/llm-graph-builder works
Main Components
a. Frontend Layer:
• React-based UI (TypeScript)
• Key modules:
• Authentication Component
• File Upload Components (Local, S3, GCS, Web)
• Graph Visualization Component
• Chat Interface
• Settings Management
b. Backend Layer:
• FastAPI Server
• Document Processing Pipeline
• LLM Integration Services
• Multiple Data Source Handlers
c. External Services:
• Neo4j Database (v5.15+)
• Various LLM Services (OpenAI, Gemini, etc.)
• Cloud Storage (S3, GCS)
• Authentication Services (Auth0/Okta)
Component Relationships
User Interface Layer
↓↑
API Gateway (FastAPI)
↓↑
Core Processing Layer:
• Document Processing
• LLM Processing
• Graph Generation
• Embedding Generation
↓↑
Storage Layer:
• Neo4j Database
• Vector Store
↔
External Services Layer
Specific Implementation Details
a. Document Processing Flow:
Input Sources → Document Chunking → LLM Processing → Entity Extraction → Relationship Creation → Graph Storage
b. Query Flow:
User Query → Chat Interface → Query Processing → Graph/Vector Search → LLM Response Generation → UI Response
Key Technical Elements
• Support for multiple LLM models
• Vector embedding integration
• Different chat modes (vector, graph, hybrid)
• File processing pipeline
• Authentication flow
• Monitoring and logging systems
Important Architectural Patterns
• Microservices architecture
• Event-driven processing
• Pipeline pattern for document processing
• Repository pattern for data access
• Factory pattern for LLM model selection
Integration Points
Clearly mark:
• API endpoints
• Database connections
• External service connections
• Authentication boundaries