$ show IAAR-Shanghai/SurveyX
SurveyX is an academic survey automation system that leverages Large Language Models (LLMs) to generate domain-specific academic papers from user-provided references. The system implements a modular pipeline that processes markdown-formatted reference documents through stages of preprocessing, outline generation, content drafting, post-refinement (citation correction, figure/table insertion), and LaTeX/PDF output generation. Designed for offline use in its open-source version, it accepts survey titles, keywords, and local reference paths to produce structured surveys with watermarked PDF outputs. The architecture emphasizes separation of concerns with distinct modules for LLM interaction, content refinement, and document generation, supported by monitoring utilities for tracking token usage and pipeline timing.
The LLM identified 4 files worth highlighting for reuse:
Tracks LLM token consumption and associated costs across pipeline stages. Provides decorators and context managers for automatic usage tracking. Demonstrates non-obvious skill in isolating AI resource monitoring as a cross-cutting concern that can be reused in any LLM-based application with minimal modification.
Defines an abstract BaseRefiner class that standardizes the interface for content refinement strategies. Specific implementations (RuleBasedRefiner, RagRefiner, FigRetrieveRefiner, SectionRewriter) inherit this base to plug into the refinement pipeline. Shows excellent use of the strategy pattern to create an extensible refinement system that could be extracted for any content generation workflow.
Encapsulates LLM API interactions with built-in retry logic (using tenacity), token tracking, and batch processing capabilities. Abstracts away the complexities of API communication while providing robust error handling and usage monitoring. This component represents a reusable LLM interaction layer that could be integrated into any project requiring LLM API calls with minimal adaptation.
Provides a base class for generating LaTeX tables with specialized implementations for summary, list, and comparison tables. Handles the intricacies of LaTeX formatting while exposing a simple interface for table creation. Demonstrates skill in abstracting document generation complexities into reusable components that could be applied to various academic or technical writing contexts.