-
Notifications
You must be signed in to change notification settings - Fork 0
Reports
Export analysis results as professional PDF documents.
Reveilio ships with two PDF report generators, both accessible as one-line function calls:
| Report | What it contains |
|---|---|
| 🗂️ Candidate report | A detailed multi-section report for a single candidate. Executive summary, detailed metrics table, strengths/weaknesses, career flags, experience analysis, KPIs, AI reasoning, and relevancy metrics. |
| 📊 Batch ranking report | A summary table showing all candidates ranked by score with their names, scores, recommendations, and years of experience. Ideal for presenting shortlists to hiring managers. |
result = reveilio.analyze_resume("resumes/alice.pdf", jd)
# Save the detailed report as a PDF
path = reveilio.save_report_pdf(result, "reports/alice_evaluation.pdf")
print(f"Report saved to {path}")Parent directories are created automatically. The function returns the pathlib.Path of the written file.
- Header — report title, role name, candidate name, overall score, recommendation.
- Executive Summary — the AI-generated critique (~120 words).
- AI Fit Suggestions — alternative roles the candidate might suit (if available).
- Detailed Metrics — table with each scoring dimension, its score, and reasoning.
- Key Insights — side-by-side strengths (green) and weaknesses (red).
- Career Red Flags — any flagged concerns about the candidate's history.
- Experience Relevance Analysis — deep dive into how work history aligns with the role.
- Key Performance Indicators — quantified achievements from the resume.
- AI Matching Reasoning — step-by-step logic behind the overall score.
- Relevancy Metrics — table with metrics like average tenure, each rated high/medium/low.
results = reveilio.analyze_folder("./resumes", jd)
# Save the ranking summary
path = reveilio.save_batch_report_pdf(results, "reports/ranking.pdf")
print(f"Ranking saved to {path}")A single styled table with columns: Rank, Candidate Name, Score, Recommendation, Years of Experience. Role title at the top. Rows alternate in colour for readability.
A common pattern: generate individual reports for shortlisted candidates and a batch summary for the full set.
results = reveilio.analyze_folder("./resumes", jd)
# Batch ranking for everyone
reveilio.save_batch_report_pdf(results, "reports/ranking.pdf")
# Individual reports for shortlisted candidates only
shortlist = [r for r in results if r.recommendation == "Shortlist"]
for r in shortlist:
name = r.candidate_data.name.replace(" ", "_")
reveilio.save_report_pdf(r, f"reports/{name}.pdf")If you are building a web application and need to stream the PDF in an HTTP response rather than write it to disk, use the lower-level generator functions:
from reveilio.reports.pdf import generate_candidate_report, generate_batch_report
# Single candidate: returns io.BytesIO
buf = generate_candidate_report(result.model_dump())
pdf_bytes = buf.getvalue()
# Batch: returns io.BytesIO
buf = generate_batch_report([r.model_dump() for r in results])
pdf_bytes = buf.getvalue()
# Example: FastAPI response
from fastapi.responses import Response
return Response(pdf_bytes, media_type="application/pdf")The LLM sometimes wraps important terms in **double asterisks** (Markdown bold). The PDF renderer converts these to bold text automatically, so key skills and achievements appear highlighted in the output.
The report generator is built with ReportLab. To customize colors, fonts, or sections, copy src/reveilio/reports/pdf.py into your project and modify it directly. Function signatures stay the same, so you can swap your version in without changing any calling code.
Continue to Database storage.
v0.1.1 · docs
Getting started
Core features
- Configuration & providers
- Job descriptions
- Resume parsing
- Scoring & analysis
- PDF reports
- Database storage
Using reveilio
Deployment
Deep dive