Skip to content

[DERCBOT-1783] Admin: add evaluation sample management API#2001

Draft
antoine-billiet-arkea-partnre wants to merge 10 commits intotheopenconversationkit:masterfrom
CreditMutuelArkea:feat/DERCBOT-1783_list_evaluation_sets
Draft

[DERCBOT-1783] Admin: add evaluation sample management API#2001
antoine-billiet-arkea-partnre wants to merge 10 commits intotheopenconversationkit:masterfrom
CreditMutuelArkea:feat/DERCBOT-1783_list_evaluation_sets

Conversation

@antoine-billiet-arkea-partnre
Copy link
Contributor

  • Add EvaluationSample and Evaluation models with all required fields
  • Add ActionRef, EvaluationReason, EvaluationsResult, Evaluator models
  • Implement EvaluationSampleDAO and EvaluationDAO interfaces
  • Implement MongoDB DAOs with proper indexing
  • Add EvaluationService with sample creation, evaluation, and status management
  • Add EvaluationVerticle with REST endpoints for CRUD operations
  • Add unit tests for service and integration tests for DAOs
  • Support pagination for action-refs with status filtering
  • Add evaluationsResult computation (total, evaluated, remaining, positiveCount, negativeCount)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an evaluation sample management API for bot administrators. It introduces a comprehensive evaluation system allowing users to create evaluation samples from bot dialog actions, evaluate them (UP/DOWN with reasons), and manage their lifecycle (IN_PROGRESS/VALIDATED/CANCELLED).

Changes:

  • Adds data models for evaluations (EvaluationSample, Evaluation, ActionRef, Evaluator, EvaluationReason, etc.)
  • Implements MongoDB DAOs with proper indexing for persistence
  • Adds REST API endpoints via EvaluationVerticle for CRUD operations
  • Removes auto-generated Kotlin serializer/deserializer files (build artifacts)

Reviewed changes

Copilot reviewed 20 out of 159 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bot/storage-mongo/target/generated-sources/kapt/compile/*.kt Deleted auto-generated serialization files (build artifacts)
bot/engine/src/main/kotlin/admin/evaluation/*.kt New evaluation domain models and DAO interfaces
bot/storage-mongo/src/main/kotlin/EvaluationMongoDAO.kt MongoDB implementation for Evaluation DAO
bot/storage-mongo/src/main/kotlin/EvaluationSampleMongoDAO.kt MongoDB implementation for EvaluationSample DAO
bot/storage-mongo/src/main/kotlin/Ioc.kt IoC bindings for new DAOs
bot/admin/server/src/main/kotlin/verticle/EvaluationVerticle.kt REST API endpoints for evaluation management
bot/admin/server/src/main/kotlin/BotAdminVerticle.kt Integration of EvaluationVerticle
.idea/runConfigurations/BotAdmin.xml IDE configuration update
Files not reviewed (1)
  • .idea/runConfigurations/BotAdmin.xml: Language not supported

@vsct-jburet vsct-jburet self-requested a review February 12, 2026 15:03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated files are intentionally committed in order to track changes made by the generators

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking but if tou have 2s to commit them again ;)

Copy link
Contributor

@assouktim assouktim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There are still a few improvements to be made. I'll let you see my comments.

- Add EvaluationSample and Evaluation models with all required fields
- Add ActionRef, EvaluationReason, EvaluationsResult, Evaluator models
- Implement EvaluationSampleDAO and EvaluationDAO interfaces
- Implement MongoDB DAOs with proper indexing
- Add EvaluationService with sample creation, evaluation, and status management
- Add EvaluationVerticle with REST endpoints for CRUD operations
- Add unit tests for service and integration tests for DAOs
- Support pagination for action-refs with status filtering
- Add evaluationsResult computation (total, evaluated, remaining, positiveCount, negativeCount)
…able filter, 422, cascade delete

- DialogReportQuery: add random and evaluableActionsOnly params
- UserTimelineMongoDAO: $sample, buildEvaluableActionsFilter
- EvaluationService: flatMap, debug filter, 422 on no dialogs, evaluableActionsOnly
- UnprocessableEntityException: HTTP 422 with code 4221, NO_DIALOG_FOUND
- EvaluationSampleDAO: deleteByNamespaceAndBotId for cascade
- BotAdminService: call cascade delete in deleteApplication
- AbstractNamespaceRetriever: extract currentContextApp
- ktlint: fix UnprocessableEntityException (no-empty-first-line-in-class-body)

Co-authored-by: Cursor <cursoragent@cursor.com>
Generated files from KMongo/kapt for BotApplicationConfiguration and BotConfiguration.
Intentionally committed to track changes made by the generators.

Co-authored-by: Cursor <cursoragent@cursor.com>
@antoine-billiet-arkea-partnre antoine-billiet-arkea-partnre force-pushed the feat/DERCBOT-1783_list_evaluation_sets branch from 5c295f2 to 7674e42 Compare February 24, 2026 14:14
- Remove duplicate import in UserTimelineMongoDAO.kt
- Reorder imports per standard:import-ordering
- Format deleteByNamespaceAndBotId signature in EvaluationSampleMongoDAO.kt

Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace wildcard imports with explicit imports in EvaluationService
- Fix import ordering in BotAdminService
- Fix spacing, indentation and blank lines in GenAIVerticle, AbstractNamespaceRetriever, EvaluationVerticle
- Fix multiline expression in EvaluationServiceTest

Co-authored-by: Cursor <cursoragent@cursor.com>
EvaluationSampleDTO is in model.evaluation, not evaluation package

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

@assouktim assouktim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that's missing is the commit of the regenerated files.
Ok for changes, thanks!

Restore 132 KAPT-generated files accidentally removed in fdab228.
Aligns with master (138 tracked files in bot/storage-mongo/target/).

Co-authored-by: Cursor <cursoragent@cursor.com>
@assouktim assouktim marked this pull request as draft February 25, 2026 14:17
…, add TU

- POST create sample: return 201 Created instead of 200
- DELETE sample: return 204 No Content without body
- Rename ActionRefsQuery -> EvaluationDialogsQuery, ActionRefsResponse -> EvaluationDialogsResponse
- Rename getActionRefs -> getEvaluationDialogs with KDoc comments
- Add EvaluationModelTest for EvaluationDialogsQuery serialization
- Add TU: findSampleById, getEvaluationDialogs throws, evaluate/changeStatus edge cases
- Add TU: getEvaluationDialogs with missing dialogs (missingRefs)
- ktlint fixes

Made-with: Cursor
@antoine-billiet-arkea-partnre antoine-billiet-arkea-partnre marked this pull request as ready for review March 2, 2026 15:11
@antoine-billiet-arkea-partnre antoine-billiet-arkea-partnre marked this pull request as draft March 3, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants