diff --git a/docs/extras/guides/langsmith/walkthrough.ipynb b/docs/extras/guides/langsmith/walkthrough.ipynb index 369d8fc9f6d..9e1b8f3fcfc 100644 --- a/docs/extras/guides/langsmith/walkthrough.ipynb +++ b/docs/extras/guides/langsmith/walkthrough.ipynb @@ -23,7 +23,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "138fbb8f-960d-4d26-9dd5-6d6acab3ee55", "metadata": {}, @@ -68,7 +67,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 1, "id": "904db9a5-f387-4a57-914c-c8af8d39e249", "metadata": { "tags": [] @@ -101,7 +100,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 2, "id": "510b5ca0", "metadata": { "tags": [] @@ -123,7 +122,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 3, "id": "7c801853-8e96-404d-984c-51ace59cbbef", "metadata": { "tags": [] @@ -150,7 +149,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "id": "19537902-b95c-4390-80a4-f6c9a937081e", "metadata": { "tags": [] @@ -189,7 +188,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 5, "id": "0405ff30-21fe-413d-85cf-9fa3c649efec", "metadata": { "tags": [] @@ -206,7 +205,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "9decb964-be07-4b6c-9802-9825c8be7b64", "metadata": {}, @@ -232,7 +230,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "beab1a29-b79d-4a99-b5b1-0870c2d772b1", "metadata": {}, @@ -248,7 +245,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 6, "id": "17580c4b-bd04-4dde-9d21-9d4edd25b00d", "metadata": { "tags": [] @@ -286,7 +283,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "id": "f42d8ecc-d46a-448b-a89c-04b0f6907f75", "metadata": { "tags": [] @@ -313,7 +310,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "9cb9ef53", "metadata": {}, @@ -334,7 +330,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 8, "id": "a25dc281", "metadata": { "tags": [] @@ -369,7 +365,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "07885b10", "metadata": { @@ -388,7 +383,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 9, "id": "3733269b-8085-4644-9d5d-baedcff13a2f", "metadata": { "tags": [] @@ -398,6 +393,8 @@ "name": "stdout", "output_type": "stream", "text": [ + "View the evaluation results for project '2023-07-17-11-25-20-AgentExecutor' at:\n", + "https://dev.smith.langchain.com/projects/p/1c9baec3-ae86-4fac-9e99-e1b9f8e7818c?eval=true\n", "Processed examples: 1\r" ] }, @@ -405,7 +402,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Chain failed for example 85f3a543-0429-48ae-be23-f48f0d903530. Error: LLMMathChain._evaluate(\"\n", + "Chain failed for example 5a2ac8da-8c2b-4d12-acb9-5c4b0f47fe8a. Error: LLMMathChain._evaluate(\"\n", "age_of_Dua_Lipa_boyfriend ** 0.43\n", "\") raised error: 'age_of_Dua_Lipa_boyfriend'. Please try again with a valid numerical expression\n" ] @@ -414,14 +411,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "Processed examples: 6\r" + "Processed examples: 4\r" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "Chain failed for example 97d0d138-e9b3-4825-af2c-42789c66c0d4. Error: Too many arguments to single-input tool Calculator. Args: ['height ^ 0.13', {'height': 72}]\n" + "Chain failed for example 91439261-1c86-4198-868b-a6c1cc8a051b. Error: Too many arguments to single-input tool Calculator. Args: ['height ^ 0.13', {'height': 68}]\n" ] }, { @@ -477,7 +474,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 10, "id": "33bfefde-d1bb-4f50-9f7a-fd572ee76820", "metadata": { "tags": [] @@ -486,10 +483,10 @@ { "data": { "text/plain": [ - "Run(id=UUID('eb71a98c-660b-45e4-904e-e1567fdec145'), name='AgentExecutor', start_time=datetime.datetime(2023, 7, 13, 8, 23, 35, 102907), run_type=, end_time=datetime.datetime(2023, 7, 13, 8, 23, 37, 793962), extra={'runtime': {'library': 'langchain', 'runtime': 'python', 'platform': 'macOS-13.4.1-arm64-arm-64bit', 'sdk_version': '0.0.5', 'library_version': '0.0.231', 'runtime_version': '3.11.2'}, 'total_tokens': 512, 'prompt_tokens': 451, 'completion_tokens': 61}, error=None, serialized=None, events=[{'name': 'start', 'time': '2023-07-13T08:23:35.102907'}, {'name': 'end', 'time': '2023-07-13T08:23:37.793962'}], inputs={'input': 'what is 1213 divided by 4345?'}, outputs={'output': '1213 divided by 4345 is approximately 0.2792.'}, reference_example_id=UUID('d343add7-2631-417b-905a-dc39361ace69'), parent_run_id=None, tags=['openai-functions', 'testing-notebook'], execution_order=1, session_id=UUID('cc5f4f88-f1bf-495f-8adb-384f66321eb2'), child_run_ids=[UUID('daa9708a-ad08-4be1-9841-e92e2f384cce'), UUID('28b1ada7-3fe8-4853-a5b0-dac8a93a3066'), UUID('dc0b4867-3f3d-46f7-bfb5-f4be10f3cc52'), UUID('58c9494e-2ea6-4291-ab78-73b8ffcdaef5'), UUID('8f5a3e08-ce96-4c81-a6aa-86bf5b3bb590'), UUID('f0447532-7ded-45b6-9d87-f1fa18e381b0')], child_runs=None, feedback_stats={'correctness': {'n': 1, 'avg': 1.0, 'mode': 1}, 'helpfulness': {'n': 1, 'avg': 1.0, 'mode': 1}, 'fifth-grader-score': {'n': 1, 'avg': 0.0, 'mode': 0}, 'embedding_cosine_distance': {'n': 1, 'avg': 0.144522385071361, 'mode': 0.144522385071361}})" + "Run(id=UUID('e39f310b-c5a8-4192-8a59-6a9498e1cb85'), name='AgentExecutor', start_time=datetime.datetime(2023, 7, 17, 18, 25, 30, 653872), run_type=, end_time=datetime.datetime(2023, 7, 17, 18, 25, 35, 359642), extra={'runtime': {'library': 'langchain', 'runtime': 'python', 'platform': 'macOS-13.4.1-arm64-arm-64bit', 'sdk_version': '0.0.8', 'library_version': '0.0.231', 'runtime_version': '3.11.2'}, 'total_tokens': 512, 'prompt_tokens': 451, 'completion_tokens': 61}, error=None, serialized=None, events=[{'name': 'start', 'time': '2023-07-17T18:25:30.653872'}, {'name': 'end', 'time': '2023-07-17T18:25:35.359642'}], inputs={'input': 'what is 1213 divided by 4345?'}, outputs={'output': '1213 divided by 4345 is approximately 0.2792.'}, reference_example_id=UUID('a75cf754-4f73-46fd-b126-9bcd0695e463'), parent_run_id=None, tags=['openai-functions', 'testing-notebook'], execution_order=1, session_id=UUID('1c9baec3-ae86-4fac-9e99-e1b9f8e7818c'), child_run_ids=[UUID('40d0fdca-0b2b-47f4-a9da-f2b229aa4ed5'), UUID('cfa5130f-264c-4126-8950-ec1c4c31b800'), UUID('ba638a2f-2a57-45db-91e8-9a7a66a42c5a'), UUID('fcc29b5a-cdb7-4bcc-8194-47729bbdf5fb'), UUID('a6f92bf5-cfba-4747-9336-370cb00c928a'), UUID('65312576-5a39-4250-b820-4dfae7d73945')], child_runs=None, feedback_stats={'correctness': {'n': 1, 'avg': 1.0, 'mode': 1}, 'helpfulness': {'n': 1, 'avg': 1.0, 'mode': 1}, 'fifth-grader-score': {'n': 1, 'avg': 1.0, 'mode': 1}, 'embedding_cosine_distance': {'n': 1, 'avg': 0.144522385071361, 'mode': 0.144522385071361}})" ] }, - "execution_count": 14, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -501,7 +498,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 11, "id": "6595c888-1f5c-4ae3-9390-0a559f5575d1", "metadata": { "tags": [] @@ -510,15 +507,15 @@ { "data": { "text/plain": [ - "{'correctness': {'n': 7, 'avg': 0.7142857142857143, 'mode': 1},\n", - " 'helpfulness': {'n': 7, 'avg': 1.0, 'mode': 1},\n", + "{'correctness': {'n': 7, 'avg': 0.5714285714285714, 'mode': 1},\n", + " 'helpfulness': {'n': 7, 'avg': 0.7142857142857143, 'mode': 1},\n", " 'fifth-grader-score': {'n': 7, 'avg': 0.7142857142857143, 'mode': 1},\n", " 'embedding_cosine_distance': {'n': 7,\n", - " 'avg': 0.08308464442094905,\n", - " 'mode': 0.00371031210788608}}" + " 'avg': 0.11462010799473926,\n", + " 'mode': 0.0130477459560272}}" ] }, - "execution_count": 19, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -528,7 +525,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "id": "2646f0fb-81d4-43ce-8a9b-54b8e19841e2", "metadata": { @@ -543,12 +539,6 @@ "\n", "For more information on how you can get the most out of LangSmith, check out [LangSmith documentation](https://docs.smith.langchain.com/), and please reach out with questions, feature requests, or feedback at [support@langchain.dev](mailto:support@langchain.dev)." ] - }, - { - "cell_type": "markdown", - "id": "57237f12", - "metadata": {}, - "source": [] } ], "metadata": { @@ -567,7 +557,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.11.2" } }, "nbformat": 4, diff --git a/poetry.lock b/poetry.lock index 3561062e374..3ef9848db19 100644 --- a/poetry.lock +++ b/poetry.lock @@ -641,16 +641,12 @@ category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "awadb-0.3.6-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:d90318d2d388aa1bb740b0b7e641cb7da00e6ab5700ce97564163c88a1927ed4"}, {file = "awadb-0.3.6-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:6154f73aab9996aefe8c8f8bf754f7182d109d6b60302c9f31666c7f50cc7aca"}, {file = "awadb-0.3.6-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:9d7e9dff353517595ecc8c9395a2367acdcfc83c68a64dd4785c8d366eed3f40"}, - {file = "awadb-0.3.6-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:6f6d10d1e885fa1d64eeb8ffda2de470c3a7508d57a9489213b8649bcddcd31e"}, {file = "awadb-0.3.6-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:475af75d2ffbbe970999d93fbabdf7281797390c66fe852f6a6989e706b90c94"}, {file = "awadb-0.3.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:304be1de63daec1555f0fe9de9a18cdf16a467687a35a6ccf3405cd400fefb48"}, {file = "awadb-0.3.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:176cc27d1afc4aad758515d5f8fb435f555c9ba827a9e84d6f28b1c6ac568965"}, - {file = "awadb-0.3.6-cp38-cp38-macosx_13_0_arm64.whl", hash = "sha256:36138b754c990143d0314fd7a9293c96f7ba549860244bda728e3f51b73e0f6e"}, {file = "awadb-0.3.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:211d7f6b0f7c3c3d7518d424f0f3dfac5f45f9e5d7bbf397fdae861ff0dc46fd"}, - {file = "awadb-0.3.6-cp39-cp39-macosx_13_0_arm64.whl", hash = "sha256:b1f9e9a7ba2fa58bce55fcca784d5b3e159712962aaee2156f6317c5993f4277"}, {file = "awadb-0.3.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:b935ab4ffaa3bcbcc9a381fce91ace5940143b527ffdb467dd4bc630cd94afab"}, ] @@ -4734,14 +4730,14 @@ all = ["datasets (>=2.12.0,<3.0.0)", "nltk (>=3.8.1,<4.0.0)", "openai (>=0.27.6, [[package]] name = "langsmith" -version = "0.0.7" +version = "0.0.9" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langsmith-0.0.7-py3-none-any.whl", hash = "sha256:9e0ab264b499daa778c694f9129859830820d3fb3a7c93309b630a22b68a88a9"}, - {file = "langsmith-0.0.7.tar.gz", hash = "sha256:2f18e51cfd4e42f2b3cf00fa87e9d03012eb7269cdafd8e7c0cf7aa828dcc03e"}, + {file = "langsmith-0.0.9-py3-none-any.whl", hash = "sha256:9c096ff6527ef4456fce7e54ed6f54e761f9f270862876fb2180a9338fc5fd1a"}, + {file = "langsmith-0.0.9.tar.gz", hash = "sha256:c8d953ea0474aecd74859e2fc76a7c2099d2adc07c8cecdbd1f00e749a12288b"}, ] [package.dependencies] @@ -12858,4 +12854,4 @@ text-helpers = ["chardet"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "9115ed1af430453f1ae4a188df7c45933a53491c9d600f438c22d289048bf4a9" +content-hash = "9eb29c9258d3b28b022dee152627b33e6ded1064f6e071ec246e92de42e57cfb" diff --git a/pyproject.toml b/pyproject.toml index ee6e9fa1707..c6f3893aca2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,7 @@ cassio = {version = "^0.0.7", optional = true} rdflib = {version = "^6.3.2", optional = true} sympy = {version = "^1.12", optional = true} rapidfuzz = {version = "^3.1.1", optional = true} -langsmith = "^0.0.7" +langsmith = "^0.0.9" rank-bm25 = {version = "^0.2.2", optional = true} [tool.poetry.group.docs.dependencies]