An unconventional LLM-based text attribution system using prompt engineering and RAG to assess text authenticity across diverse writing styles, with a focus on tracking style evolution over time.
Tracks how writing styles change over time:
- Version history analysis: Compare multiple versions of the same document
- Style drift detection: Identify significant changes in writing patterns
- Timeline visualization: Visual graphs showing authenticity scores and feature evolution
- Store multiple versions of documents with timestamps
- Analyze authenticity scores and style features for each version
- Detect style drift between versions with configurable thresholds
- Generate timeline visualizations showing:
- Authenticity score evolution
- Style feature changes over time
- Drift points marked on timeline
- Persistent storage of version history
python temporal_tracker.py-
Add versions: Track different versions of a document
> add Document ID: essay_1 [Enter text...] -
Analyze history: Get detailed analysis of style evolution
> analyze Document ID: essay_1 -
Visualize timeline: Generate timeline graphs
> visualize Document ID: essay_1 -
Detect drift: Find significant style changes
> drift Document ID: essay_1
See requirements.txt for dependencies.
-
Install dependencies:
pip install -r requirements.txt
-
Set up API key (optional, uses fallback if not set):
export OPENAI_API_KEY="your-key-here"
Or create a
.envfile with:OPENAI_API_KEY=your-key-here
-
Version Tracking: Each time you add a version, the system:
- Analyzes text authenticity using optimized LLM prompts
- Extracts style features (sentence length, lexical diversity, etc.)
- Stores metadata with timestamp
-
Drift Detection: Compares consecutive versions to identify:
- Significant changes in style features
- Authenticity score shifts
- Threshold-based drift points
-
Visualization: Creates multi-panel timeline graphs showing:
- Authenticity score over time
- Feature evolution
- Drift detection points
├── temporal_tracker.py # Main implementation
├── requirements.txt # Dependencies
├── README.md # This file
└── temporal_data/ # Storage directory (created automatically)
└── history.json # Version history database