A Streamlit application for visualizing and analyzing the processing workflow of Large Language Model chains through JSONL debug files.
- JSONL Processing : Efficiently parse and process JSONL debug files containing LLM chain data
- Question Extraction : Automatically identify and categorize questions processed by the LLM
- Workflow Visualization : View a graphical representation of the entire processing chain
- Step-by-Step Analysis : Examine each stage of the workflow, including:
- Question classification
- Company identification
- Financial data analysis
- Corporate actions analysis
- Business operations analysis
- Final answer generation
- Document Page Viewer : See which document pages were analyzed and which were used in the final response
- Raw Data Access : Download the raw JSON data for further analysis
The application can be configured by modifying the following variables:
DOCUMENT_DIR
: Path to the directory containing markdown files of documents referenced in the analysis
Before running the application, you must configure the path to your document directory:
- Open
main.py
in a text editor - Locate the
DOCUMENT_DIR
variable at the top of the file - Replace it with the path to your markdown files folder using one of these formats:
pythonCopy
# Option 1: Use raw string (recommended for Windows paths) DOCUMENT_DIR =r"C:\Path\To\Your\Markdown\Files" # Option 2: Use double backslashes DOCUMENT_DIR ="C:\\Path\\To\\Your\\Markdown\\Files" # Option 3: Use forward slashes (works on all operating systems) DOCUMENT_DIR ="C:/Path/To/Your/Markdown/Files"
Important Notes:
- The directory should contain unpacked markdown (.md) files
- Each markdown file should contain document content with pages formatted as "Page X" headers
- The filename (without .md extension) should match the company name referenced in the JSONL file
- If you encounter a "unicodeescape" error, make sure you're using one of the path formats above
You can also change the document directory through the application's sidebar after launching.