GraphForge — 3D Knowledge Graph
December 22, 2025
AI-powered 3D interactive knowledge graph search engine. Extracted 11k entities and relationships from Wikipedia using Groq + Gemini, stored in Neo4j, with dynamic 3D visualization.
What is it?
An AI-powered 3D knowledge graph for deep-tech topics (AI, ML, LLMs, MLOps). Users submit natural language queries, an LLM analyzes intent and generates Cypher queries, Neo4j returns matching nodes and relationships, and a React frontend renders everything as an interactive 3D force-directed graph.
How it evolved: from hand-crafted seeds to AI extraction
Phase 1 — trial/: Manual extraction scripts using LangChain + Google Gemini (langchain-google-genai). Small hand-crafted JSON seed packs. The original requirements.txt shows: langchain, langchain-google-genai, neo4j. Gemini was the first LLM.
Phase 2: Synthetic seed generation scripts (generate_large_seed.py, generate_expansion_seed.py) to scale data without the per-article extraction cost.
Phase 3: Full AI extraction pipeline. 1000+ Wikipedia/tech articles fetched via Typesense, each processed by Groq (llama-3.1-8b-instant for speed, 3.3-70b for quality) extracting (subject, relation, object) triples. Google Gemini switched to Groq for cost and speed.
Data quality issues emerged: repair_relationship_targets.py fixes broken relationship targets. scripts_cleanup_entities/ and scripts_maintenance/ hold one-off repair scripts. The build logs in final/logs/ show iterative Dec 2025 sessions.
Under the hood: Neo4j and Cypher
Neo4j AuraDB (cloud-hosted) stores entities as nodes and relationships as first-class edges. The backend uses the neo4j 5.16.0 Python driver.
The LLM (Groq) receives the user's question and the graph schema, then generates a Cypher query. Example: a user asking 'what did DeepMind create?' becomes MATCH (o:Organization {name: 'DeepMind'})-[r:CREATED]->(p) RETURN p, r LIMIT 20.
This LLM-to-Cypher approach means users never write queries — they ask questions. The LLM handles translation. If it fails, the system falls back to simpler keyword-based Cypher patterns.
LLM rotation for rate limit resilience
The backend cycles through models in priority order when it hits 429s: llama-3.1-8b-instant → llama-3.3-70b-versatile → openai/gpt-oss-20b → openai/gpt-oss-120b → qwen/qwen3-32b. All served via Groq API. The catch-429-and-rotate pattern means the service stays up even when any individual model is rate-limited.
Deployment: Cloud Functions Gen2
The FastAPI backend runs on Google Cloud Functions Gen2 using the agraffe adapter (which makes ASGI apps work inside Cloud Functions). Region: us-central1, runtime: python311, 512MB RAM, 540s timeout.
The frontend (React + react-force-graph-3d) deploys to Netlify at graph-search-engne.netlify.app with the custom domain graphrag.cbproforge.com. The 3D graph loads the first 4000 relationships on mount, then lazily expands as users click nodes.
Key takeaways
- Neo4j AuraDB: cloud graph DB setup, Cypher query language, LLM-generated queries
- LLM-to-Cypher: prompt engineering to turn natural language into graph traversal queries
- Multi-model rotation on Groq for rate limit resilience — priority ordering and 429 handling
- Cloud Functions Gen2 with ASGI: agraffe adapter for FastAPI inside Cloud Functions
- Iterative data quality: why graph data needs repair scripts (broken targets, duplicate entities)