How wesslen/llm-evaluation-framework works
Main Components
• GitHub Actions & CI/CD Pipeline: Represent the workflows in .github/workflows (e.g., run_tests.yml and functional_tests.yml) that trigger the automated tests, database updates, and ultimately commit the new test results back to the repository.
• Test Suite: Include the suite of tests located in the tests directory (e.g., test_summarization.py, test_reasoning.py, etc.) that simulate different evaluation scenarios.
• Core Application (src): Break down the internal modules:
• Configuration (config.py) for environment and global settings.
• llm_client.py for interfacing with the LLM (sending prompts and receiving outputs).
• metrics.py and test_aggregator.py for processing and summarizing test results.
• database.py for abstraction of database operations.
• Database Layer: This comprises the SQLite database (llm_evaluation.db) under the database/ directory, including initialization (init_db.py) and migration scripts (migrations/001_initial_schema.sql). This is where all test results are persisted.
• Datasette Integration: Represent the datasette.yaml configuration and the Datasette server used for local development and exploration. This component exposes endpoints (JSON API, web interface) that let users query the evolving test results.
Relationships and Data Flows
• GitHub Actions trigger the test suite, which in turn runs the evaluation logic (invoking the LLM via llm_client.py) and aggregating results (using metrics.py and test_aggregator.py).
Important Architectural Patterns
• Separation of concerns: The design clearly separates testing logic, LLM interaction, metrics processing, and database operations.
• Version-controlled data store: The SQLite database is not only used as the runtime store but is kept under version control to preserve historical test runs.
• Automated CI/CD loops: GitHub Actions workflows ensure that test execution, result recording, and database updates happen automatically.
Relevant Technologies and Frameworks
• Python 3.9+ (used for the main code in src/ and for test execution).
• GitHub Actions for CI/CD.
• SQLite for persistent storage.
• Datasette for serving and querying the evaluation database.
• Pytest (implied by the tests and usage instructions in the README).