Skip to content

Types as first class citizens #170

Description

@stefanks-px

Hi,
first of all thanks for bringing Dokimos to life. I really like the lib and we started using it for offline evaluations in our company.

One thing that I'm curious about is your stance on types as first class citizens in Dokimos. Looking at the Datamodel, Map<String, Object> is used at the core to hold data.

This approach is similar to how the big eval libs such as https://deepeval.com operate, but I've started to wonder whether it would be a good idea to enforce types using generics more strictly. Data represented in a Map<String, Object> can always be represented in a complex object, as long as the "keys" are well known.

Using generics one could imagine types such as DataSet<INPUT,EXPECTED_OUTPUT> and Example<INPUT, EXPECTED_OUTPUT>. Test cases could look like EvalTestCase<INPUT, EXPECTED_OUTPUT. ACTUAL_OUTPUT>.

This would allow using Typed Evaluators, which operate on concrete fields of INPUT, EXPECTED_OUTPUT and ACTUAL_OUTPUT, which enables reuse of Evaluators without having to deconstruct the Task result into specific Map Entries beforehand and knowing the keys where the data for Evaluators lie.

I think such an approach would play to the strengths of the JMV. Have you thought about something like this? Where do you see the drawbacks?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions