Dataset Viewer
Auto-converted to Parquet Duplicate
url
stringlengths
34
116
markdown
stringlengths
0
150k
screenshotUrl
null
crawl
dict
metadata
dict
text
stringlengths
0
147k
https://python.langchain.com/docs/guides/productionization/evaluation/comparison/pairwise_string/
## Pairwise string comparison [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/comparison/pairwise_string.ipynb) Open In Colab Often you will want to compare predictions of an LLM, Chain, or Agent f...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:52.850Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/comparison/pairwise_string/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/comparison/pairwise_string/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3333", "cache-control": "publ...
Pairwise string comparison Open In Colab Often you will want to compare predictions of an LLM, Chain, or Agent for a given input. The StringComparison evaluators facilitate this so you can answer questions like: Which LLM or prompt produces a preferred output for a given question? Which examples should I include for fe...
https://python.langchain.com/docs/guides/productionization/evaluation/examples/
## Examples 🚧 _Docs under construction_ 🚧 Below are some examples for inspecting and checking different chains. [ ## 📄️ Comparing Chain Outputs Open In Colab ](https://python.langchain.com/docs/guides/productionization/evaluation/examples/comparisons/) * * * #### Help us out by providing feedback on this doc...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:54.540Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/examples/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/examples/", "description": "🚧 Docs under construction 🚧", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "7938", "cache-control": "public...
Examples 🚧 Docs under construction 🚧 Below are some examples for inspecting and checking different chains. 📄️ Comparing Chain Outputs Open In Colab Help us out by providing feedback on this documentation page:
https://python.langchain.com/docs/
null
{ "depth": 0, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:55.446Z", "loadedUrl": "https://python.langchain.com/", "referrerUrl": "https://python.langchain.com/docs/" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/", "description": null, "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "7035", "cache-control": "public, max-age=0, must-revalidate", "content-disposition": "inline", "cont...
https://python.langchain.com/docs/guides/productionization/evaluation/examples/comparisons/
## Comparing Chain Outputs [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/examples/comparisons.ipynb) Open In Colab Suppose you have two different prompts (or LLMs). How do you know which will gen...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:55.483Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/examples/comparisons/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/examples/comparisons/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3692", "cache-control": "public, ma...
Comparing Chain Outputs Open In Colab Suppose you have two different prompts (or LLMs). How do you know which will generate “better” results? One automated way to predict the preferred configuration is to use a PairwiseStringEvaluator like the PairwiseStringEvalChain[1]. This chain prompts an LLM to select which output...
https://python.langchain.com/docs/guides/productionization/evaluation/string/
## String Evaluators A string evaluator is a component within LangChain designed to assess the performance of a language model by comparing its generated outputs (predictions) to a reference string or an input. This comparison is a crucial step in the evaluation of language models, providing a measure of the accuracy ...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:56.745Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/", "description": "A string evaluator is a component within LangChain designed to assess the performance of a language model by comparing its generated outputs (predictions) to a reference string or an ...
String Evaluators A string evaluator is a component within LangChain designed to assess the performance of a language model by comparing its generated outputs (predictions) to a reference string or an input. This comparison is a crucial step in the evaluation of language models, providing a measure of the accuracy or q...
https://python.langchain.com/docs/guides/productionization/evaluation/string/criteria_eval_chain/
## Criteria Evaluation [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/criteria_eval_chain.ipynb) Open In Colab In scenarios where you wish to assess a model’s output using a specific rubric...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:57.127Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/criteria_eval_chain/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/criteria_eval_chain/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3337", "cache-control": "publ...
Criteria Evaluation Open In Colab In scenarios where you wish to assess a model’s output using a specific rubric or criteria set, the criteria evaluator proves to be a handy tool. It allows you to verify if an LLM or Chain’s output complies with a defined set of criteria. To understand its functionality and configurabi...
https://python.langchain.com/docs/guides/productionization/evaluation/string/embedding_distance/
## Embedding Distance [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/embedding_distance.ipynb) Open In Colab To measure semantic similarity (or dissimilarity) between a prediction and a ref...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:58.643Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/embedding_distance/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/embedding_distance/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "6612", "cache-control": "publi...
Embedding Distance Open In Colab To measure semantic similarity (or dissimilarity) between a prediction and a reference label string, you could use a vector distance metric the two embedded representations using the embedding_distance evaluator.[1] Note: This returns a distance score, meaning that the lower the number,...
https://python.langchain.com/docs/guides/productionization/evaluation/string/custom/
You can make your own custom string evaluators by inheriting from the `StringEvaluator` class and implementing the `_evaluate_strings` (and `_aevaluate_strings` for async support) methods. In this example, you will create a perplexity evaluator using the HuggingFace [evaluate](https://huggingface.co/docs/evaluate/inde...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:59.535Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/custom/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/custom/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3340", "cache-control": "public, max-age=0...
You can make your own custom string evaluators by inheriting from the StringEvaluator class and implementing the _evaluate_strings (and _aevaluate_strings for async support) methods. In this example, you will create a perplexity evaluator using the HuggingFace evaluate library. Perplexity is a measure of how well the g...
https://python.langchain.com/docs/guides/productionization/evaluation/string/exact_match/
## Exact Match [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/exact_match.ipynb) Open In Colab Probably the simplest ways to evaluate an LLM or runnable’s string output against a reference ...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:36:59.670Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/exact_match/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/exact_match/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3687", "cache-control": "public, max-...
Exact Match Open In Colab Probably the simplest ways to evaluate an LLM or runnable’s string output against a reference label is by a simple string equivalence. This can be accessed using the exact_match evaluator. from langchain.evaluation import ExactMatchStringEvaluator evaluator = ExactMatchStringEvaluator() Alter...
https://python.langchain.com/docs/guides/productionization/evaluation/string/json/
## JSON Evaluators Evaluating [extraction](https://python.langchain.com/docs/use_cases/extraction/) and function calling applications often comes down to validation that the LLM’s string output can be parsed correctly and how it compares to a reference object. The following `JSON` validators provide functionality to c...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:00.346Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/json/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/json/", "description": "Evaluating extraction and function calling", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3340", "cache-c...
JSON Evaluators Evaluating extraction and function calling applications often comes down to validation that the LLM’s string output can be parsed correctly and how it compares to a reference object. The following JSON validators provide functionality to check your model’s output consistently. JsonValidityEvaluator​ The...
https://python.langchain.com/docs/guides/productionization/evaluation/string/regex_match/
## Regex Match [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/regex_match.ipynb) Open In Colab To evaluate chain or runnable string predictions against a custom regex, you can use the `rege...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:01.545Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/regex_match/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/regex_match/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3341", "cache-control": "public, max-...
Regex Match Open In Colab To evaluate chain or runnable string predictions against a custom regex, you can use the regex_match evaluator. from langchain.evaluation import RegexMatchStringEvaluator evaluator = RegexMatchStringEvaluator() Alternatively via the loader: from langchain.evaluation import load_evaluator eva...
https://python.langchain.com/docs/guides/productionization/evaluation/string/string_distance/
## String Distance [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/string_distance.ipynb) Open In Colab > In information theory, linguistics, and computer science, the [Levenshtein distance ...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:02.206Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/string_distance/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/string_distance/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "4143", "cache-control": "public, ...
String Distance Open In Colab In information theory, linguistics, and computer science, the Levenshtein distance (Wikipedia) is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletion...
https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/
## Trajectory Evaluators Trajectory Evaluators in LangChain provide a more holistic approach to evaluating an agent. These evaluators assess the full sequence of actions taken by an agent and their corresponding responses, which we refer to as the "trajectory". This allows you to better measure an agent's effectivenes...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:02.745Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/", "description": "Trajectory Evaluators in LangChain provide a more holistic approach to evaluating an agent. These evaluators assess the full sequence of actions taken by an agent and their corres...
Trajectory Evaluators Trajectory Evaluators in LangChain provide a more holistic approach to evaluating an agent. These evaluators assess the full sequence of actions taken by an agent and their corresponding responses, which we refer to as the "trajectory". This allows you to better measure an agent's effectiveness an...
https://python.langchain.com/docs/guides/productionization/evaluation/string/scoring_eval_chain/
## Scoring Evaluator The Scoring Evaluator instructs a language model to assess your model’s predictions on a specified scale (default is 1-10) based on your custom criteria or rubric. This feature provides a nuanced evaluation instead of a simplistic binary score, aiding in evaluating models against tailored rubrics ...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:02.965Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/scoring_eval_chain/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/string/scoring_eval_chain/", "description": "The Scoring Evaluator instructs a language model to assess your model’s", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-or...
Scoring Evaluator The Scoring Evaluator instructs a language model to assess your model’s predictions on a specified scale (default is 1-10) based on your custom criteria or rubric. This feature provides a nuanced evaluation instead of a simplistic binary score, aiding in evaluating models against tailored rubrics and ...
https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/custom/
You can make your own custom trajectory evaluators by inheriting from the [AgentTrajectoryEvaluator](https://api.python.langchain.com/en/latest/evaluation/langchain.evaluation.schema.AgentTrajectoryEvaluator.html#langchain.evaluation.schema.AgentTrajectoryEvaluator) class and overwriting the `_evaluate_agent_trajectory...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:03.741Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/custom/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/custom/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3690", "cache-control": "public, max-a...
You can make your own custom trajectory evaluators by inheriting from the AgentTrajectoryEvaluator class and overwriting the _evaluate_agent_trajectory (and _aevaluate_agent_action) method. In this example, you will make a simple trajectory evaluator that uses an LLM to determine if any actions were unnecessary. from t...
https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/trajectory_eval/
## Agent Trajectory [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/trajectory/trajectory_eval.ipynb) Open In Colab Agents can be difficult to holistically evaluate due to the breadth of actions an...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:04.126Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/trajectory_eval/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/evaluation/trajectory/trajectory_eval/", "description": "Open In Colab", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "1378", "cache-control": "publ...
Agent Trajectory Open In Colab Agents can be difficult to holistically evaluate due to the breadth of actions and generation they can make. We recommend using multiple evaluation techniques appropriate to your use case. One way to evaluate an agent is to look at the whole trajectory of actions taken along with their re...
https://python.langchain.com/docs/guides/productionization/fallbacks/
## Fallbacks When working with language models, you may often encounter issues from the underlying APIs, whether these be rate limiting or downtime. Therefore, as you go to move your LLM applications into production it becomes more and more important to safeguard against these. That’s why we’ve introduced the concept ...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:04.819Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/fallbacks/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/fallbacks/", "description": "When working with language models, you may often encounter issues from", "headers": { ":status": 200, "accept-ranges": null, "access-control-allow-origin": "*", "age": "3344...
Fallbacks When working with language models, you may often encounter issues from the underlying APIs, whether these be rate limiting or downtime. Therefore, as you go to move your LLM applications into production it becomes more and more important to safeguard against these. That’s why we’ve introduced the concept of f...
https://python.langchain.com/docs/guides/productionization/safety/
## Privacy & Safety One of the key concerns with using LLMs is that they may misuse private data or generate harmful or unethical text. This is an area of active research in the field. Here we present some built-in chains inspired by this research, which are intended to make the outputs of LLMs safer. * [Amazon Com...
null
{ "depth": 1, "httpStatusCode": 200, "loadedTime": "2024-04-22T02:37:05.288Z", "loadedUrl": "https://python.langchain.com/docs/guides/productionization/safety/", "referrerUrl": "https://python.langchain.com/sitemap.xml" }
{ "author": null, "canonicalUrl": "https://python.langchain.com/docs/guides/productionization/safety/", "description": "One of the key concerns with using LLMs is that they may misuse private data or generate harmful or unethical text. This is an area of active research in the field. Here we present some built-in...
Privacy & Safety One of the key concerns with using LLMs is that they may misuse private data or generate harmful or unethical text. This is an area of active research in the field. Here we present some built-in chains inspired by this research, which are intended to make the outputs of LLMs safer. Amazon Comprehend mo...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
6