Write your own custom Python evaluations using UpTrain
Install UpTrain
Define the custom evaluation
Note: Please ensure to add the prefix “score_” to the value in col_out_score
if you wish to log these results on uptrain’s locally hosted dashboard
Run the evaluations
Note: By default UpTrain runs locally on your system. You can also ensure this by passing Settings(evaluate_locally=True)
to EvalLLM
Visualize these results
Operator | Description | Input | Output |
---|---|---|---|
DocsLinkVersion() | Extracts version numbers from URLs in response | response | docs_link_version |
WordCount() | Calculate the number of words in response | response | word_count |
TextLength() | Calculate the length of text in response | response | text_length |
KeywordDetector() | Detects the presence of a keyword in response | response , keyword | keyword_detector |
Note: If you face any difficulties, need some help with using UpTrain or want to brainstorm on custom evaluations for your use-case, speak to the maintainers of UpTrain here.