How aianytime/graphy-v1 works
Project type and purpose
• This is a full-stack, single-page Python Streamlit application (“Graphy v1”) that implements a real‐time Graph Retrieval-Augmented Generation (GraphRAG) workflow.
• It allows users to upload a PDF, extracts entities/relationships via OpenAI LLMs (through LangChain), stores results in Neo4j, and answers natural-language queries by translating them into Cypher.
File structure
• Top level:
• main.py (entry point, Streamlit app)
• requirements.txt (dependencies: streamlit, langchain, neo4j, openai…)
• .gitignore, LICENSE, README.md
• No separate “backend” or “frontend” subdirs: the frontend (UI) and backend (processing logic) live in main.py.
README for insights
• Key components: Streamlit UI, PDF file ingestion, LangChain + OpenAI integration, Neo4j graph database, natural-language interface.
• Environment configuration via .env or sidebar inputs – OpenAI and Neo4j credentials.
Essential architectural elements to capture
• The ingestion path: PDF → LangChain → OpenAI → entity/relationship extraction → Neo4j write
• The query path: NL question → LangChain → OpenAI → Cypher generation → Neo4j read → UI response
• Credential/configuration flow feeding into both OpenAI and Neo4j connectors
• Single Streamlit process acting as both server and client in a monolithic layout