Skip to content

Add supported detection check for generative detectors #3

@evaline-ju

Description

@evaline-ju

Currently in this component, we allow the generative model to pass on the generated result with a score to the user. However, to prevent the adapter from passing on any arbitrary generation from the model, we may want to validate if the generation corresponds to specific expected tokens or not (i.e. specific to the model), thus providing further guardrails on these models.

This functionality would essentially "check" that each model detection is one of the expected detections (i.e. "correct"), which could be helpful in the cases when models may give inappropriate responses if a template is missing, or particular inputs or parameters trigger different responses to be generated.

To minimize special error propagation and necessitate additional error handling, we can return an "incorrect-generation" detection with score 0.0 for the particular choice(s) that generated an unexpected detection. This would allow for partial responses, since if multiple choices are returned, not all may be "incorrect".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions