Queryan: An AI-Powered Agentic Librarian
Project Overview
Queryan is an AI-powered book search and graph analytics platform designed to enhance book discovery and analysis. By leveraging advanced natural language processing, graph databases, and GPU-accelerated algorithms, Queryan enables users to find books intelligently and analyze book relationships at scale.
Features
1. AI-Powered Book Search
Queryan allows users to search for books using natural language queries. Instead of relying on exact keyword matches, it interprets the intent behind the query and generates the appropriate NetworkX code to search the book graph. The process involves:
- Parsing the query to determine relevant attributes (title, genre, description).
- Generating Python code dynamically to query the book dataset.
- Executing the code and returning structured book recommendations as JSON data.
- Handling execution failures and retrying with improved logic.
2. Graph Analytics with PageRank
Beyond search, Queryan utilizes graph analytics to uncover hidden relationships between books. Books of the same genre are clustered into collections, forming a large interconnected graph. To determine the most influential collections, Queryan applies the PageRank algorithm, identifying nodes with the highest centrality.
The process includes:
- Constructing a graph of 54,000 books, where connections represent shared genres.
- Running the cuGraph PageRank algorithm on a GPU-accelerated backend for high-performance computation.
- Comparing execution times with and without ArangoDB integration.
- Demonstrating how graph analytics can be applied in the retail industry to optimize book recommendations and inventory management.
Technical Breakdown
- Natural Language Processing (NLP): Converts user queries into structured search commands.
- NetworkX & cuGraph: Provides efficient graph algorithms for search and analysis.
- ArangoDB: Enhances graph traversal speed with optimized indexing.
- Python & AI Models: Enables dynamic code generation and execution.
- GPU Acceleration: Significantly reduces processing time for large-scale graph computations.
Use Case: Graph Analytics for Book Collections
Queryan showcases how graph analytics can be applied in retail and library systems to:
- Identify the most influential book collections.
- Improve personalized book recommendations.
- Optimize book catalog organization based on real-world connections.
- Speed up large-scale graph computations using GPU acceleration.
Conclusion
Queryan is more than just a book search tool—it’s an agentic librarian that combines AI, graph databases, and high-performance computing to revolutionize book discovery and analysis. With its intelligent search and graph-powered insights, Queryan provides a powerful solution for bookstores, libraries, and digital content platforms looking to enhance their recommendation systems and understand book relationships more effectively.
Built With
- arangodb
- beautiful-soup
- css
- flask
- html
- langchain
- networkx
- openai
- python

Log in or sign up for Devpost to join the conversation.