Company
Date Published
Author
Tomaž Bratanič
Word count
3989
Language
English
Hacker News points
None

Summary

GraphRAG is an agentic architecture designed to navigate complex domains like legal contracts by leveraging large language models (LLMs) and structured tools. By structuring legal information as a knowledge graph, users can increase answer accuracy using a LangGraph agent. The system involves constructing a knowledge graph in Neo4j, building a LangGraph agent that allows users to ask specific questions about the contracts, and implementing a contract retrieval tool with various attributes for filtering and aggregation. The LLM acts as the decision-maker, dynamically selecting which tools to invoke and executing multiple tools in sequence to fulfill complex requests. The system has been benchmarked using a dataset of 22 questions, showing promising results, but there is room for growth, including expanding clause coverage and refining tool design.