A question-answering system about tourist places and countries using a Neo4j knowledge graph powered by Wikidata data.
- Gradio App Interface:
- Neo4j Graph Database:
- 🏞️ Small curated dataset of 500+ touristic attractions and 600+ countries
- 🔗 Relationship mapping (LOCATED_IN) between attractions and countries
- 💬 Natural language query interface using Gemma-2B LLM
- 📊 Extended properties including geographical metrics and demographic data
Nodes:
TouristicAttraction: Name, type, dimensions (length/width/area)Country: Continent, capital, language, population
Relationship:
(Attraction)-[LOCATED_IN]->(Country)
- Graph Database: Neo4j
- LLM Integration: LangChain + Groq API (Gemma-2B)
- Data Sources: Wikidata SPARQL API
- UI Framework: Gradio
- Core Libraries:
langchain_neo4j- Neo4j graph integrationlangchain_groq- LLM inferencepython-dotenv- Environment managementSPARQLWrapper- Wikidata query interface
conda create -n kg python=3.11 -y
conda activate kg-envpip install -r requirements.txtecho "NEO4J_URI='uri'
NEO4J_USERNAME='neo4j'
NEO4J_PASSWORD='your_password_here'
GROQ_API_KEY='your_groq_key_here'" > .envpython app.pyVisit http://127.0.0.1:7860/ in your browser

