Skip to content

Commit

Permalink
Fix typos (#139)
Browse files Browse the repository at this point in the history
Co-authored-by: William FH <[email protected]>
  • Loading branch information
Sypherd and hinthornw committed Oct 23, 2023
1 parent d5c06d4 commit 86a91e4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 29 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Tracing allows for seamless debugging and improvement of your LLM applications.

- [Tracing without LangChain](./tracing-examples/traceable/tracing_without_langchain.ipynb): learn to trace applications independent of LangChain using the Python SDK's @traceable decorator.
- [REST API](./tracing-examples/rest/rest.ipynb): get acquainted with the REST API's features for logging LLM and chat model runs, and understand nested runs. The run logging spec can be found in the [LangSmith SDK repository](https://github.com/langchain-ai/langsmith-sdk/blob/main/openapi/openapi.yaml).
- [Customing Run Names](./tracing-examples/runnable-naming/run-naming.ipynb): improve UI clarity by assigning bespoke names to LangSmith chain runs—includes examples for chains, lambda functions, and agents.
- [Customizing Run Names](./tracing-examples/runnable-naming/run-naming.ipynb): improve UI clarity by assigning bespoke names to LangSmith chain runs—includes examples for chains, lambda functions, and agents.
- [Tracing Nested Calls within Tools](./tracing-examples/nesting-tools/nest_runs_within_tools.ipynb): include all nested tool subcalls in a single trace by using `run_manager.get_child()` and passing to the child `callbacks`

## LangChain Hub

Efficiently manage your LLM components with the [LangChain Hub](https://smith.langchain.com/hub). For dedicated documenation, please see the [hub docs](https://docs.smith.langchain.com/category/hub).
Efficiently manage your LLM components with the [LangChain Hub](https://smith.langchain.com/hub). For dedicated documentation, please see the [hub docs](https://docs.smith.langchain.com/category/hub).

- [RetrievalQA Chain](./hub-examples/retrieval-qa-chain/retrieval-qa.ipynb): use prompts from the hub in an exampe RAG pipeline.
- [RetrievalQA Chain](./hub-examples/retrieval-qa-chain/retrieval-qa.ipynb): use prompts from the hub in an example RAG pipeline.
- [Prompt Versioning](./hub-examples/retrieval-qa-chain-versioned/prompt-versioning.ipynb): ensure deployment stability by selecting specific prompt versions over the 'latest'.
- [Runnable PromptTemplate](./hub-examples/runnable-prompt/edit-in-playground.ipynb): streamline the process of saving prompts to the hub from the playground and integrating them into runnable chains.

Expand All @@ -50,7 +50,7 @@ Test and benchmark your LLM systems using methods in these evaluation recipes:

Incorporate LangSmith into your TS/JS testing and evaluation workflow:

- [Evaluating JS Chains in Python](./typescript-testing-examples/eval-in-python/): evaluate JS chains using custom python evalators, adapting methods from the "[Evaluating Existing Runs](./testing-examples/evaluate-existing-test-project/evaluate_runs.ipynb)" guide.
- [Evaluating JS Chains in Python](./typescript-testing-examples/eval-in-python/): evaluate JS chains using custom python evaluators, adapting methods from the "[Evaluating Existing Runs](./testing-examples/evaluate-existing-test-project/evaluate_runs.ipynb)" guide.
- [Logging Assertions as Feedback](./typescript-testing-examples/simple-test/): convert CI test assertions into LangSmith feedback, enhancing trace visibility with minimal modifications.

## Using Feedback
Expand All @@ -63,7 +63,7 @@ Harness user [feedback](https://docs.smith.langchain.com/evaluation/capturing-fe
- [Next.js Chat App](./feedback-examples/nextjs/README.md): explore a simple TypeScript chat app demonstrating tracing and feedback capture.
- You can [check out a deployed demo version here](https://langsmith-cookbook.vercel.app/).
- [Building an Algorithmic Feedback Pipeline](./feedback-examples/algorithmic-feedback/algorithmic_feedback.ipynb): automate feedback metrics for advanced monitoring and performance tuning. This lets you evaluate production runs as a batch job.
- [Real-time Automated Feedback](./feedback-examples/algorithmic-feedback/algorithmic_feedback.ipynb): automatically generate feedback metrics for every run using an async callback. This lets you evaluate production runs in real-time.
- [Real-time Automated Feedback](./feedback-examples/realtime-algorithmic-feedback/realtime_feedback.ipynb): automatically generate feedback metrics for every run using an async callback. This lets you evaluate production runs in real-time.

## Exporting data for fine-tuning

Expand Down
2 changes: 1 addition & 1 deletion feedback-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Harness user [feedback](https://docs.smith.langchain.com/evaluation/capturing-fe
- [Next.js Chat App](./nextjs/README.md): explore a simple TypeScript chat app demonstrating tracing and feedback capture.
- You can [check out a deployed demo version here](https://langsmith-cookbook.vercel.app/).
- [Building an Algorithmic Feedback Pipeline](./algorithmic-feedback/algorithmic_feedback.ipynb) Automate feedback metrics for advanced monitoring and performance tuning.
- [Real-time Automated Feedback](./algorithmic-feedback/algorithmic_feedback.ipynb): automatically generate feedback metrics for every run using an async callback. This lets you evaluate production runs in real-time.
- [Real-time Automated Feedback](./realtime-algorithmic-feedback/realtime_feedback.ipynb): automatically generate feedback metrics for every run using an async callback. This lets you evaluate production runs in real-time.
4 changes: 2 additions & 2 deletions hub-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sidebar_position: 3
---
# LangChain Hub

MEfficiently manage your LLM components with the [LangChain Hub](https://smith.langchain.com/hub). For dedicated documenation, please see the [hub docs](https://docs.smith.langchain.com/category/hub).
Efficiently manage your LLM components with the [LangChain Hub](https://smith.langchain.com/hub). For dedicated documentation, please see the [hub docs](https://docs.smith.langchain.com/category/hub).

- [RetrievalQA Chain](./retrieval-qa-chain/retrieval-qa.ipynb): use prompts from the hub in an exampe RAG pipeline.
- [RetrievalQA Chain](./retrieval-qa-chain/retrieval-qa.ipynb): use prompts from the hub in an example RAG pipeline.
- [Prompt Versioning](./retrieval-qa-chain-versioned/prompt-versioning.ipynb) ensure deployment stability by selecting specific prompt versions over the 'latest'.
- [Runnable PromptTemplate](./runnable-prompt/edit-in-playground.ipynb): streamline the process of saving prompts to the hub from the playground and integrating them into runnable chains.
8 changes: 4 additions & 4 deletions testing-examples/dynamic-data/testing_dynamic_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
"\n",
"Below is the view of the individual dataset rows. We can click on a row to update the example or to see all predictions from different test runs on that example. Let's click on one!\n",
"\n",
"<img src=\"./img/dynamic_data_examples_list.png\" alt=\"Examples Table Page\" style=\"width:75%\">\n",
"![Examples Table Page](./img/dynamic_data_examples_list.png)\n",
" \n",
"In this case, we've selected the example row with the question \"How many male and female passengers were there?\" The table of linked rows at the bottom of the page shows the predictions for each test run.\n",
"These are automatically assocaited whenever you call `run_on_dataset`.\n",
Expand All @@ -381,17 +381,17 @@
"\n",
"However, both test runs were marked as \"correct\". The values within the data source changed, but the process to retrieve the answer remained the same.\n",
"\n",
"<img src=\"./img/dynamic_data_example_page.png\" alt=\"Examples Page\" style=\"width:75%\">\n",
"![Examples Page](./img/dynamic_data_example_page.png)\n",
"\n",
"But how can you be sure the \"correct\" grade is reliable? Now is a good time to spot check the run trace of your custom evaluator to confirm that it is working as expected. If you see arrows on the \"correctness\" chips in the table, you can directly click on those to see the evaluation trace. Otherwise, you can click through to the run, navigate to the feedback tab, and then click through to find your custom evaluator's trace for that example. Below are screenshots of the retrieved values for each of the runs above.\n",
"\n",
"You can see that the \"reference\" key contains the dereferenced value from the data source. You can see that it matches the predictions from the runs above! The first one shows 577 male and 314 female passengers.\n",
"\n",
"<img src=\"./img/dynamic_data_feedback_trace_t1.png\" alt=\"Examples Page\" style=\"width:75%\">\n",
"![Examples Page 2](./img/dynamic_data_feedback_trace_t1.png)\n",
"\n",
"And after the dataframe was updated, the evaluator retrieved the correct value of 1154 male and 628 female passengers, which matches the predictions from the runs above!\n",
"\n",
"<img src=\"./img/dynamic_data_feedback_trace_t2.png\" alt=\"Examples Page\" style=\"width:75%\">\n",
"![Examples page 3](./img/dynamic_data_feedback_trace_t2.png)\n",
"\n",
"Seems to be working well!"
]
Expand Down
18 changes: 5 additions & 13 deletions testing-examples/qa-correctness/qa-correctness.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -414,16 +414,16 @@
"\n",
"From the test project page, you can filter the results based on feedback metrics. For instance, to see the examples marked as incorrect, click on \"Correctness==0\" in the filters section.\n",
"\n",
"<img src=\"./img/filter_correctness.png\" alt=\"Incorrect Examples\" style=\"width:75%\">\n",
"![Incorrect Examples](./img/filter_correctness.png)\n",
"\n",
"Once you've filtered the results, you can click on the individual runs to see the traces and triage where the chain failed. You can click on the image below to see\n",
"for yourself. Navigating to the \"Feedback\" tab will show the evaluation results linked to this run. \n",
"\n",
"<a href=\"https://smith.langchain.com/public/3aa92e44-e11e-4299-8073-ac895386b8b8/r\"><img src=\"./img/see_trace.png\" alt=\"Incorrect Example Trace\" style=\"width:75%\"></a>\n",
"![Incorrect Example Trace](./img/see_trace.png)\n",
"\n",
"You can click the link highlighted in red above to see the trace of the evaluator run. Since LLM-assisted evaluations are imperfect, viewing their traces is a good way to audit the feedback decisions, and it lets you decide when and how to tailor the prompt to your specific use case.\n",
"\n",
"<img src=\"./img/qa_eval_chain_run.png\" alt=\"QA Eval Chain Run\" style=\"width:75%\">\n"
"![QA Eval Chain Run](./img/qa_eval_chain_run.png)\n"
]
},
{
Expand Down Expand Up @@ -534,14 +534,14 @@
"source": [
"Now we can start comparing results. Navigate to the \"Retrieval QA Questions\" dataset page to see the aggregate feedback metrics for each test run. You can view your datasets by clicking the datasets & testing icon on the left bar.\n",
"\n",
"<img src=\"./img/dataset_test_runs.png\" alt=\"Datasets Page\" style=\"width:75%\">\n",
"![Datasets Page](./img/dataset_test_runs.png)\n",
"\n",
"It looks like the new chain is passing all the examples now. Great job! Remember that this toy dataset, while illustrative, is too small to give a complete picture of the chain's performance. As we continue to prototype this chain, we can add more examples to the dataset.\n",
"\n",
"In addition to the aggregate feedback metrics, you can also view the individual predictions on each row. Click on the \"Examples\" tab to see each row in the dataset. Clicking on a given example will show the outputs from both test runs for that data point.\n",
"Using the linked runs table, you can quickly compare predictions across chain versions to get a quick sense of the types of outputs you might see. You can click on each linked run to view the full traces again.\n",
"\n",
"<img src=\"./img/example.png\" alt=\"Example Page\" style=\"width:75%\">\n"
"![Example Page](./img/example.png)"
]
},
{
Expand All @@ -557,14 +557,6 @@
"\n",
"Thanks for trying this out! If you have questions or suggestions, please open an issue on GitHub or reach out to us at [email protected]."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f2069907-34ea-44b5-8244-ff144bae4474",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions tracing-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Tracing allows for seamless debugging and improvement of your LLM applications.

- [Tracing without LangChain](./traceable/tracing_without_langchain.ipynb): learn to trace applications independent of LangChain using the Python SDK's @traceable decorator.
- [REST API](./rest/rest.ipynb): get acquainted with the REST API's features for logging LLM and chat model runs, and understand nested runs. The run logging spec can be found in the [LangSmith SDK repository](https://github.com/langchain-ai/langsmith-sdk/blob/main/openapi/openapi.yaml).
- [Customing Run Names](./runnable-naming/run-naming.ipynb): improve UI clarity by assigning bespoke names to LangSmith chain runs—includes examples for chains, lambda functions, and agents.
- [Tracing Nested Calls within Tools](./nesting-tools/nest_runs_within_tools.ipynb): include all nested tool subcalls in a single trace by using `run_manager.get_child()` and passing to the child `callbacks`
- [Customizing Run Names](./runnable-naming/run-naming.ipynb): improve UI clarity by assigning bespoke names to LangSmith chain runs—includes examples for chains, lambda functions, and agents.
- [Tracing Nested Calls within Tools](./nesting-tools/nest_runs_within_tools.ipynb): include all nested tool subcalls in a single trace by using `run_manager.get_child()` and passing to the child `callbacks`
2 changes: 1 addition & 1 deletion tracing-examples/runnable-naming/run-naming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
"source": [
"The resulting agent trace will reflect the custom name you've assigned to it.\n",
"\n",
"<a href=\"https://smith.langchain.com/public/00537050-0da5-4f95-ba28-857183ae9b0c/r\" target=\"_blank\"><img src=\"img/file_agent.png\" alt=\"File Agent Trace\" width=\"75%\"></a>"
"[![File Agent Trace](img/file_agent.png)](https://smith.langchain.com/public/00537050-0da5-4f95-ba28-857183ae9b0c/r)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion typescript-testing-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sidebar_position: 5

Incorporate LangSmith into your TS/JS testing and evaluation workflow:

- [Evaluating JS Chains in Python](./eval-in-python/): evaluate JS chains using custom python evalators, adapting methods from the "[Evaluating Existing Runs](../testing-examples/evaluate-existing-test-project/evaluate_runs.ipynb)" guide.
- [Evaluating JS Chains in Python](./eval-in-python/): evaluate JS chains using custom python evaluators, adapting methods from the "[Evaluating Existing Runs](../testing-examples/evaluate-existing-test-project/evaluate_runs.ipynb)" guide.
- [Logging Assertions as Feedback](./simple-test/): convert CI test assertions into LangSmith feedback, enhancing trace visibility with minimal modifications.

0 comments on commit 86a91e4

Please sign in to comment.