$ show neo4j-labs/llm-graph-builder
This is a full-stack application (FastAPI backend, React frontend) that builds knowledge graphs from unstructured data using LLMs. It ingests documents from local files, S3, GCS, web pages, YouTube, and Wikipedia, chunks them, extracts entities and relationships via LangChain's LLMGraphTransformer, and stores the graph in Neo4j. The system provides a chatbot interface with multiple retrieval modes (vector, graph, hybrid, fulltext, community search), post-processing capabilities (community detection, duplicate merging, vector indexes), and RAGAS-based evaluation metrics. The architecture is a monolithic backend with a single FastAPI app and a React SPA frontend, orchestrated via Docker Compose. External dependencies include Neo4j, multiple LLM providers (OpenAI, Gemini, Anthropic, etc.), and optional cloud storage integrations. The codebase is actively maintained with recent commits and issue triage, and shows low technical drift despite some aspirational model names and minor duplication.
The LLM identified 3 files worth highlighting for reuse:
Self-contained module for evaluating RAG responses using the RAGAS framework. It computes faithfulness, answer relevancy, context entity recall, and additional metrics (ROUGE, semantic similarity). The module is isolated (only imports external libraries and internal logger) and could be extracted into a reusable evaluation library for any RAG system.
A clean, generic queue implementation with concurrency control (max parallel tasks). It supports enqueue, dequeue, and event-based completion. No internal dependencies, making it directly reusable in any TypeScript project that needs to manage asynchronous task queues.
A React custom hook for Server-Sent Events (SSE) that handles connection lifecycle, event parsing, and automatic reconnection. It abstracts the complexity of EventSource and integrates with the project's API client for authentication. The pattern is reusable for any real-time data streaming scenario in React applications.