Understanding the relationships between documents in a large corpus goes beyond simple similarity. For domains where the authoritative status or influence of one document on another is critical, a deeper analysis is required. This is where citation-graph-ingest provides value. It's an AI agent skill designed to build a typed reference graph over your document corpus.
Unlike systems that only provide similarity scores, the tool extracts and classifies the specific relationships between documents. This allows you to answer complex questions such as 'is this document still authoritative?' by mapping whether one document overrules, distinguishes, or relies on another. This skill is particularly useful for cite-heavy domains, including law, academic papers, patents, and regulatory filings, where tracing arguments and understanding document lineage are essential.
Understanding Typed Reference Graphs
A typed reference graph offers a nuanced view of how documents interact. Each connection, or 'edge,' between documents is classified with a specific type, rather than merely indicating a connection. For instance, the skill tells you how Document A relates to Document B. This might involve an edge type such as 'overrules,' 'relies_on,' or 'extends,' providing a precise semantic link. This detailed classification enables users to reason over a domain corpus with a clarity that simple keyword searches or similarity metrics cannot provide.
Consider a legal document corpus. A important task is often to determine if a particular legal precedent remains valid. By identifying an 'overrules' edge from a newer court decision to an older one, the system can flag that the older document is no longer authoritative. Similarly, an 'extends' edge in academic papers can show how new research builds directly upon prior work, offering a clear view of intellectual progression. An edge denoting 'distinguishes' helps in understanding subtle differences in application or scope. These specific relationship types allow for a far more granular understanding of a document's position and influence within its domain.
How citation-graph-ingest Operates
The pipeline for this skill operates in a methodical, two-stage process. The initial stage focuses on mechanically detecting candidate mentions within the documents. This involves scanning the corpus for structured references, which include markdown links, document titles that appear as references, and traditional citation formats. This mechanical detection identifies all potential links between documents that could form the basis of a relationship.
Following candidate detection, the second stage employs model judgment to classify the exact type of relationship for each identified edge. This is where the nuanced distinctions are made, assigning specific types like 'overrules,' 'relies_on,' or 'extends.' The model's role is to go beyond a mere mention and determine the semantic nature of the connection based on context within the documents. This ensures the graph is rich with meaningful, classified relationships.
Once classified, these edges are systematically written to the links table using the link command. This process ensures that each relationship is recorded and made persistent within the system. Crucially, every edge is stamped with provenance, documenting its origin and the basis of its classification. To ensure accuracy and reliability, these relationships are subsequently verified through comprehensive graph-query walks, allowing for thorough inspection and validation of the constructed graph. The resolve_slugs tool also plays a role in managing document identifiers within this framework, completing the set of tools utilized by the skill.
Practical Applications and Scope
This skill is designed for scenarios where precise document relationships are critical for daily requirements. Its utility shines across several specialized domains. In law, it can help trace arguments through documents, revealing how cases cite or modify previous rulings, which is vital for legal research and case preparation. For academic papers, researchers can clearly see which papers rely on or extend existing theories, aiding in literature reviews and understanding research impact.
For patents, the skill can map dependencies between inventions, showing how newer patents build upon or distinguish themselves from prior art. Regulatory filings, too, benefit significantly, as the ability to discern which regulations overrule or are relied upon by others is essential for compliance and policy analysis. The explicit structure of a typed reference graph simplifies complex domain understanding.
To activate this functionality, the skill responds to specific triggers. Users can initiate the process by requesting a 'citation graph' or a 'typed reference graph.' It can also be engaged when the objective is to 'reason over a domain corpus' or to 'trace arguments through documents.' These triggers provide direct access to its core capabilities. It is important to note its operational boundaries: the skill is read-only on the corpus, meaning it will not create new pages or alter existing document content. Furthermore, it creates no new storage on its own, and it does not integrate citation edges into natural-language query functions. This focused design ensures its utility is concentrated on building and verifying the typed reference graph.
FAQ
Q: What kinds of relationships does it classify? A: It classifies specific relationship types such as 'overrules,' 'relies_on,' 'extends,' and others, providing detailed context for connections between documents.
Q: Does this tool modify my original documents or create new storage? A: No, citation-graph-ingest is read-only on your document corpus and creates no new storage. Its purpose is to build and manage the reference graph.
Q: Which types of document collections benefit most from this skill? A: It is best suited for cite-heavy domains where explicit document relationships are critical, such as law, academic papers, patents, and regulatory filings.
This skill provides a structured method for understanding document interactions in complex information environments. It offers a practical way to manage and verify authoritative knowledge across your specialized domain.





