Inspiration
The inspiration for this project came from the challenge of building a dynamic, intelligent question-answering (QA) system over graph data. Traditional database queries can be limiting when dealing with complex relationships and large-scale data. ArangoDB’s graph capabilities, combined with LangChain’s LLM-powered query generation, provided the perfect foundation for building a smarter, more adaptive solution.
I wanted to create a system that could: Understand natural language questions Generate dynamic ArangoDB queries (AQL) Provide accurate and context-aware answers
What it does
This project is a graph-based QA system using LangChain and ArangoDB to handle complex data relationships and answer natural language questions.
Key Functions: Builds and stores a graph in ArangoDB using NetworkX Processes user questions with OpenAI via LangChain Dynamically generates and executes AQL queries Returns structured and accurate answers
Example: "What are the direct connections of node X?" "Find the shortest path between Node A and Node B."
How i built it
Set up ArangoDB – Installed and configured an ArangoDB instance. Graph Construction – Used NetworkX and nx_arangodb to create and store a graph in ArangoDB. LangChain Integration – Connected LangChain to ArangoDB for dynamic query generation. OpenAI Model – Used OpenAI (via LangChain) to interpret natural language questions and generate appropriate AQL queries. Graph-Based QA – Created a LangChain QA chain to process queries and extract answers from the graph. Testing and Debugging – Fine-tuned the query generation and response accuracy.
Challenges we ran into
Dynamic Query Generation – Generating AQL queries dynamically was tricky due to the complexity of the graph structure. Data Consistency – Ensuring that the graph data remained consistent and queries returned accurate results. Performance Bottlenecks – Optimizing AQL queries for faster response times on larger datasets. API Limits – Encountered rate limits with GenAI and colab and had to implement request throttling.
Accomplishments that am proud of
Successfully integrated LangChain with ArangoDB for dynamic AQL query generation Built a working graph-based QA system that handles complex relationships Enabled accurate natural language querying over graph data Optimized query performance and ensured data consistency Overcame challenges with dynamic query generation and API limits
What i learned
Graph Databases – Learned how to model complex data relationships using ArangoDB. LangChain + ArangoDB – Mastered how to integrate LangChain with ArangoDB for automated query generation. LLM-Based Querying – Explored how to use OpenAI models for natural language understanding and query generation. AQL (ArangoDB Query Language) – Learned how to write and optimize complex AQL que
What's next for Transcations
Improve query accuracy with fine-tuned models Support more complex graph relationships Enhance system scalability and response time
Log in or sign up for Devpost to join the conversation.