Evaluate
Evaluation pipeline for RAG model performance using LangSmith metrics.
evaluate(project_name, config_path, dataset_name)
Run evaluation on a RAG setup using LangSmith metrics.
Loads a configuration file to initialize a RAG chain and evaluates its performance on a dataset using a set of standard metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name
|
str
|
The name of the LangChain project used in LangSmith. |
required |
config_path
|
str
|
Path to the JSON configuration file defining the RAG setup. |
required |
dataset_name
|
str
|
The name of the dataset to be used for evaluation, registered in LangSmith. |
required |
Raises:
| Type | Description |
|---|---|
IOError
|
If the configuration file at |
Source code in ragbot\evaluate.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |