From 1b7d036e900e28f68b31fffbd9bd22e9ba15a860 Mon Sep 17 00:00:00 2001 From: Josh Reini Date: Thu, 16 May 2024 15:56:59 -0400 Subject: [PATCH] Deployed d2581f9a with MkDocs version: 1.5.3 --- conf/index.html | 38 +- search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes .../5_output_rails/config/actions/index.html | 8 +- .../6_topical_rails/config/actions/index.html | 8 +- .../7_rag/config/actions/index.html | 8 +- .../config/actions/index.html | 8 +- .../config/actions/index.html | 8 +- .../api/provider/huggingface/index.html | 244 +++++----- .../api/provider/llmprovider/index.html | 135 ++---- trulens_eval/api/provider/openai/index.html | 46 +- trulens_eval/api/providers/index.html | 419 ++++++++---------- .../feedback_implementations/stock/index.html | 77 ++-- 13 files changed, 435 insertions(+), 566 deletions(-) diff --git a/conf/index.html b/conf/index.html index 8fc71ba15..1d9b0035d 100644 --- a/conf/index.html +++ b/conf/index.html @@ -4006,7 +4006,7 @@

Conf

@@ -5050,10 +5055,10 @@

from trulens_eval.feedback import Feedback
 from trulens_eval.feedback.provider.hugs = Huggingface
 
-provider = Huggingface()
+huggingface_provider = Huggingface()
 
 f_groundedness = (
-    Feedback(provider.groundedness_measure_with_nli)
+    Feedback(huggingface_provider.groundedness_measure_with_nli)
     .on(context)
     .on_output()
 

@@ -5081,25 +5086,17 @@

-
Evaluates the hallucination score for a combined input of two statements as a float 0<x<1 representing a 
+      

Evaluates the hallucination score for a combined input of two statements as a float 0<x<1 representing a true/false boolean. if the return is greater than 0.5 the statement is evaluated as true. if the return is -less than 0.5 the statement is evaluated as a hallucination. - -**!!! example -

-

** - python - from trulens_eval.feedback.provider.hugs import Huggingface - huggingface_provider = Huggingface() - - score = huggingface_provider.hallucination_evaluator("The sky is blue. [SEP] Apples are red , the grass is green.")

-
Args:
-    model_output (str): This is what an LLM returns based on the text chunks retrieved during RAG
-    retrieved_text_chunk (str): These are the text chunks you have retrieved during RAG
+less than 0.5 the statement is evaluated as a hallucination.

+
+

Example

+
from trulens_eval.feedback.provider.hugs import Huggingface
+huggingface_provider = Huggingface()
 
-Returns:
-    float: Hallucination score
-
+score = huggingface_provider.hallucination_evaluator("The sky is blue. [SEP] Apples are red , the grass is green.") +
+ @@ -5139,10 +5136,6 @@

Feedback Function Guide

-

Returns:

-
float: A value between 0 and 1. 0 being "different languages" and 1
-being "same languages".
-
@@ -5211,6 +5204,10 @@

Feedback Function Guide : Selectors

+

Args: + text: A text prompt that may contain a name.

+

Returns: + Tuple[float, str]: A tuple containing a the likelihood that a PII is contained in the input text and a string containing what PII is detected (if any).

@@ -5245,8 +5242,6 @@

feedback = Feedback(huggingface_provider.positive_sentiment).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5279,10 +5274,8 @@

from trulens_eval.feedback.provider.hugs import Huggingface huggingface_provider = Huggingface() -feedback = Feedback(huggingface_provider.not_toxic).on_output() +feedback = Feedback(huggingface_provider.toxic).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5354,8 +5347,6 @@

openai_provider.moderation_harassment, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5392,8 +5383,6 @@

openai_provider.moderation_harassment_threatening, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5430,8 +5419,6 @@

openai_provider.moderation_hate, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5468,8 +5455,6 @@

openai_provider.moderation_hatethreatening, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5506,8 +5491,6 @@

openai_provider.moderation_selfharm, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5545,8 +5528,6 @@

).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5582,8 +5563,6 @@

openai_provider.moderation_sexualminors, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5620,8 +5599,6 @@

openai_provider.moderation_violence, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide

@@ -5658,8 +5635,6 @@

openai_provider.moderation_violencegraphic, higher_is_better=False ).on_output() -

The on_output() selector can be changed. See Feedback Function -Guide