Author: Damilola Oguntoyinbo · Python + Claude API
Data: sample_bids/ contains 3 fully synthetic technical proposal PDFs, generated for this demo, for the same sample procurement used in the QCBS Excel workbook project ("Supply & Installation of Solar-Powered Irrigation Pumps — RAAMP Project, Kebbi State"). No real vendor data is used.
A procurement team evaluating a stack of technical proposals against QCBS criteria spends significant manual time reading each document and scoring it consistently. This tool does first-pass extraction and scoring with Claude, structures the output, and generates a ranked comparison report — the evaluation panel reviews and finalizes rather than starting from a blank page.
pdfplumberextracts raw text from each bid PDF.- Each proposal's text is sent to Claude with a system prompt that encodes the QCBS scoring rubric (5 weighted technical criteria, 100 points total, 75-point minimum to qualify) and instructs the model to return strict JSON: per-criterion scores, justifications, the financial proposal amount, and any risks/gaps it noticed.
evaluator.pyaggregates all vendor results, computes the QCBS combined score (80% technical / 20% financial, financial normalized against the lowest qualifying bid — same methodology as the Excel workbook project), ranks vendors, and writes a Markdown report plus a machine-readable JSON file.
| File | Purpose |
|---|---|
evaluator.py |
Main script — extraction, Claude evaluation, ranking, report generation |
make_sample_bids.py |
Generates the 3 synthetic sample bid PDFs |
sample_bids/ |
The 3 synthetic input PDFs |
sample_output/evaluation_report.md |
Generated Markdown report (see below) |
sample_output/evaluation_report.json |
Same results, structured JSON |
requirements.txt |
anthropic, pdfplumber |
pip install -r requirements.txt
# Live run (needs an Anthropic API key):
export ANTHROPIC_API_KEY=sk-ant-...
python evaluator.py --bids-dir sample_bids --out sample_output/evaluation_report.md
# No API key yet? Demo mode uses representative mocked model output so you can
# see exactly what a live run produces:
python evaluator.py --bids-dir sample_bids --out sample_output/evaluation_report.md --demoDelta Water & Power Ltd ranks first (combined score 88.09/100) despite being the highest-priced bid (₦68,000,000) — its technical strength (91/100: strongest experience, most rigorous methodology, most senior team) outweighs Sahel Solar Systems Ltd's lower price under QCBS's quality-weighted methodology. Full detail, per-criterion justifications, and flagged risks/gaps for all 3 vendors are in sample_output/evaluation_report.md.
This is a decision-support tool, not an autonomous evaluator. Scores and justifications should always be reviewed by a human evaluation panel before being used in an actual award decision — the report explicitly says so, and the code has no path to skip that review.