Commit Graph

7 Commits

Author SHA1 Message Date
f562b91f83 feat(benchmarking): add model-scoped query and neighbor expansion
Why:
- Queries and Experiments must hit the Corpus Embedding Model's collections and optionally widen fixed_size context.

Changes:
- Resolve corpus model per request; apply Neighbor Expansion with Expansion Tree; persist and report expansion provenance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 14:13:07 +03:30
987b0493ac feat(reports): add answer compare modal and source format badge
Why:
- Make per-question strategy answers inspectable and show DOCX vs Text PDF source.

Changes:
- Side-by-side compare modal with HTML escaping; header source badge from filename.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:59:42 +03:30
b10a5706f4 feat(reports): add overall scores to strategy cards and average row in technical report
Why:
- Users need to see each strategy's overall score at a glance in the report
- Technical report should show average metrics across all strategies

Changes:
- Each strategy card now shows its overall score below the metric bars
- Technical report aggregate table includes an AVERAGE row across all strategies

Impact:
- Managerial report: strategy cards now show overall score
- Technical report: aggregate table has a new AVERAGE row at the bottom
2026-07-29 17:54:26 +03:30
a277672444 feat(benchmarking): add document filename and delete experiment endpoint
Why:
- Experiment list and detail responses showed raw IDs instead of filenames
- No way to delete experiments from the UI

Changes:
- Add document_filename field to ExperimentDetailResponse
- Enrich list endpoint with filenames and calculated best_strategy from aggregate_metrics
- Add DELETE /experiments/{id} endpoint

Impact:
- API responses now include document_filename for all experiment endpoints
- Frontend can display filenames instead of IDs
2026-07-29 17:54:07 +03:30
0bb3086289 feat(benchmarking): add benchmark models and routes with view parameter
Why:
- Need request/response models for benchmark endpoints
- Need routes for creating and retrieving benchmarks
- Need view parameter for managerial vs technical report views

Changes:
- models.py: Added BenchmarkRequest, BenchmarkResponse, StrategyMetrics, ExperimentDetailResponse
- routes.py: Added POST /benchmarks, GET /benchmarks/{id}, GET /experiments, view parameter for reports
2026-07-27 14:14:59 +03:30
ef8bab5962 feat(benchmarking): add evaluation, benchmark service, and report
Why:
- Need LLM-as-Judge evaluation for automated scoring
- Need benchmark orchestration to run questions × strategies
- Need HTML report generation with two views (managerial/technical)

Changes:
- evaluation.py: LLM-as-Judge scoring on 4 metrics (context, similarity, faithfulness, hallucination)
- benchmark_service.py: Orchestration with per-strategy failure isolation
- report.py: Dual-view HTML reports with dark mode, charts, and strategy cards
2026-07-27 14:14:40 +03:30
496a58c62a feat(benchmarking): add query pipeline with logging and tracing
Why:
- Need query pipeline to ask questions against chunked documents
- Need comprehensive logging for debugging

Changes:
- Query service: embed question → vector search → LLM answer
- Query routes: POST /queries, GET /queries/{id}
- Query models: QueryRequest, QueryResponse, RetrievedChunk
- Added QueryError exception class
- Added STEP 1-6 logging for full traceability
2026-07-26 12:06:04 +03:30