Update RAGAS documentation for wrapped scorer integration#19451
Update RAGAS documentation for wrapped scorer integration#19451smoorjani merged 58 commits intomlflow:masterfrom
Conversation
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
|
Documentation preview for b8f1b73 is available at: Changed Pages (3)
More info
|
| inputs="What is MLflow?", | ||
| outputs="MLflow is an open-source platform for managing machine learning workflows.", |
There was a problem hiding this comment.
| inputs="What is MLflow?", | |
| outputs="MLflow is an open-source platform for managing machine learning workflows.", |
Can we make this either inputs/outputs or pass in a trace and not both? Using trace here since Faithfulness needs retrieval context
| "inputs": {"query": "What is MLflow?"}, | ||
| "outputs": "MLflow is an open-source platform for managing machine learning workflows.", |
There was a problem hiding this comment.
| "inputs": {"query": "What is MLflow?"}, | |
| "outputs": "MLflow is an open-source platform for managing machine learning workflows.", |
Same comment as above
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
AveshCSingh
left a comment
There was a problem hiding this comment.
Left a couple requests inline
| title="DeepEval" | ||
| href="/genai/eval-monitor/scorers/third-party/deepeval" | ||
| /> | ||
| <TileCard |
There was a problem hiding this comment.
I love these tiles linking to 3p integrations!
| ```python | ||
| from mlflow.genai.scorers.ragas import Faithfulness | ||
|
|
||
| scorer = Faithfulness(model="openai:/gpt-4") | ||
| feedback = scorer(trace=trace) | ||
|
|
||
| print(feedback.value) # Score between 0.0 and 1.0 | ||
| print(feedback.rationale) # Explanation of the score | ||
| ``` |
There was a problem hiding this comment.
Good suggestion. That fixed it
|
|
||
| ## Creating Scorers by Name | ||
|
|
||
| If a particular RAGAS metric is not listed above, you can create it dynamically using <APILink fn="mlflow.genai.scorers.ragas.get_scorer">get_scorer</APILink>: |
There was a problem hiding this comment.
| If a particular RAGAS metric is not listed above, you can create it dynamically using <APILink fn="mlflow.genai.scorers.ragas.get_scorer">get_scorer</APILink>: | |
| If a particular RAGAS metric is not listed above, you can create it dynamically using <APILink fn="mlflow.genai.scorers.ragas.get_scorer">mlflow.genai.scorers.ragas.get_scorer</APILink>: |
Unless they click the link, users may think they can call mlflow.genai.scorers.get_scorer.
There was a problem hiding this comment.
hmm I'm probably just being dumb but why is that/why is this an issue? there's a code example of how to use it right after
There was a problem hiding this comment.
oh no you're right --the code example makes this clear. Ignore me :)
|
|
||
| ## Configuration | ||
|
|
||
| RAGAS scorers accept metric-specific parameters. Any additional keyword arguments are passed directly to the RAGAS metric constructor: |
There was a problem hiding this comment.
Could we add an example of instantiating a RAGAS scorer that requires additional kwargs?
There was a problem hiding this comment.
I actually tried finding a metric for this and didn't see any - did you have one in mind?
There was a problem hiding this comment.
Maybe the strictness parameter on ResponseRelevancy? This suggestion doesn't block merge
There was a problem hiding this comment.
Ah yeah, that one we haven't added yet. Let's do this as follow-up
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>


🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
As titled - updates MLflow docs with RAGAS scorer integration.
How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.