Commit 3ef2a5a
authored
refactor!: ensure compatibility with the latest Langfuse version (#93)
This pull request introduces significant updates to the RAG
infrastructure and evaluation codebase, primarily focused on improving
Langfuse integration, updating dependencies, and refactoring
configuration for external service management. The changes enhance
traceability, simplify environment setup, and ensure compatibility with
the latest Langfuse version.
**Langfuse Integration and Evaluation Refactor:**
* Refactored the Langfuse evaluation workflow in
`langfuse_ragas_evaluator.py` to use context managers
(`start_as_current_generation` and `run`) for better trace and
generation handling, and replaced manual scoring and linking with direct
trace scoring.
[[1]](diffhunk://#diff-fe148c64db46f85d0ef8df1dfbebe80d8a816c2025bef7c15f7ae9282457ac81R165-R198)
[[2]](diffhunk://#diff-fe148c64db46f85d0ef8df1dfbebe80d8a816c2025bef7c15f7ae9282457ac81L213-R219)
* Updated the dataset creation method to use the new Langfuse API
signature (`create_dataset(name=...)`).
**Dependency Updates:**
* Upgraded the `langfuse` Python package from `3.0.0` to `3.3.4` across
all relevant `pyproject.toml` files for improved compatibility and
features.
[[1]](diffhunk://#diff-9c5aeb0db77c2eec077d07ddc3b3810ae1a4a1e50ee7061fba37a46706c513fbL107-R107)
[[2]](diffhunk://#diff-9c4162cc1c16dd4c7ec5e95e79df285e8c0882a1db7ff2892c746a0537d26c36L34-R34)
[[3]](diffhunk://#diff-b19ab043535569caf9345971969d115d6515ae951a21b00a278145a28230fba1L21-R21)
**Infrastructure Configuration Improvements:**
* Updated the Langfuse Helm chart dependency version from `0.12.1` to
`1.5.1` in `Chart.yaml`.
* Overhauled `values.yaml` to externalize configuration for PostgreSQL,
Redis (KeyDB), ClickHouse, and S3/MinIO, removing embedded environment
variable definitions and introducing dedicated configuration sections
for each service.
[[1]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3L448-R480)
[[2]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3L482-R497)
[[3]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3R512-R582)
* Removed internal deployment of MinIO and Valkey, and clarified that
KeyDB is used for Redis functionality.
[[1]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3L448-R480)
[[2]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3L540-L543)
[[3]](diffhunk://#diff-673dd2d3d4e66a8fd4e45f9c1c9900711313f946bf8b6a89e96c954988fc14f3R615-R619)
**Tracing Enhancements:**
* Improved tracing in `traced_runnable.py` by updating span names to
reflect the actual chain class and including input/output in the trace,
enabling more detailed observability.1 parent 4abad9d commit 3ef2a5a
File tree
15 files changed
+209
-548
lines changed- infrastructure/rag
- libs
- admin-api-lib
- rag-core-api
- src/rag_core_api/impl/evaluator
- rag-core-lib
- src/rag_core_lib/tracers
- services
- admin-backend
- frontend
- rag-backend
15 files changed
+209
-548
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
477 | 466 | | |
478 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
479 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
480 | 478 | | |
481 | | - | |
| 479 | + | |
482 | 480 | | |
483 | 481 | | |
484 | | - | |
485 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
| 501 | + | |
| 502 | + | |
528 | 503 | | |
529 | 504 | | |
530 | 505 | | |
| |||
539 | 514 | | |
540 | 515 | | |
541 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
542 | 588 | | |
543 | 589 | | |
544 | 590 | | |
| |||
558 | 604 | | |
559 | 605 | | |
560 | 606 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | 607 | | |
566 | 608 | | |
567 | | - | |
| 609 | + | |
568 | 610 | | |
569 | 611 | | |
570 | 612 | | |
| |||
577 | 619 | | |
578 | 620 | | |
579 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments