How kevinwu23/sourcecheckup works
Project type and purpose
• Type: A command-line, open-source data-processing tool.
• Purpose: Given a citation URL or a direct question, it extracts content, queries an LLM to generate and verify medically relevant statements, and outputs a CSV summarizing which statements are supported by citations.
File structure
• Top-level files
– run.py: main orchestration of input, processing, and output
– utils.py: helper functions (URL extraction and GPT API wrapper)
– prompts.json: predefined prompt templates for the LLM
– requirements.txt: Python dependencies (pandas, argparse, json, etc.)
– README.md: documentation and project overview
• No nested directories—this is a single-module tool
• No front-end or database folders, but there is an external data directory referenced in the README (Google Drive)
Key insights from README
• Inputs: --citation_url or --question via CLI
• Workflow:
1. Fetch URL content (if citation_url)
2. Feed content or question to GPTWrapper with specific prompts
3. Parse LLM response into statements + citations
4. Evaluate support for each statement
5. Write results to a CSV and compute summary metrics
• External dependencies: LLM API (OpenAI or similar), remote document sources, Google Drive for bulk data
Essential elements without over-splitting
• Every function in utils.py and major step in run.py is represented by a component or sub-component
• Do not add fictitious layers; stick to what the file tree and README describe