[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74YWR6NDDHYND2TGCBPVWX6":3,"skill-same:01M74YWR6NDDHYND2TGCBPVWX6":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M74YWR6NDDHYND2TGCBPVWX6","langsmith-observability",null,"LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.","KalarisLabs\u002Fresearch-agent-skills","KalarisLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F300878568?v=4","01M74Y7MT23GXXC56VM6TVSXZY","Kalarislabs","01M74Y7MTQM9REXZX4SNXWX95C",132,"MIT","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flangsmith-observability\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: langsmith-observability\ndescription: LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  category: ml-inference-and-ops\n  maintainer: Kalaris Labs\n  tags: Observability, LangSmith, Tracing, Evaluation, Monitoring, Debugging, Testing, LLM Ops, Production\n  dependencies: langsmith>=0.2.0\n---\n\n# LangSmith - LLM Observability Platform\n\nDevelopment platform for debugging, evaluating, and monitoring language models and AI applications.\n\n## When to use LangSmith\n\n**Use LangSmith when:**\n- Debugging LLM application issues (prompts, chains, agents)\n- Evaluating model outputs systematically against datasets\n- Monitoring production LLM systems\n- Building regression testing for AI features\n- Analyzing latency, token usage, and costs\n- Collaborating on prompt engineering\n\n**Key features:**\n- **Tracing**: Capture inputs, outputs, latency for all LLM calls\n- **Evaluation**: Systematic testing with built-in and custom evaluators\n- **Datasets**: Create test sets from production traces or manually\n- **Monitoring**: Track metrics, errors, and costs in production\n- **Integrations**: Works with OpenAI, Anthropic, LangChain, LlamaIndex\n\n**Use alternatives instead:**\n- **Weights & Biases**: Deep learning experiment tracking, model training\n- **MLflow**: General ML lifecycle, model registry focus\n- **Arize\u002FWhyLabs**: ML monitoring, data drift detection\n\n## Quick start\n\n### Installation\n\n```bash\npip install langsmith\n\n# Set environment variables\nexport LANGSMITH_API_KEY=\"your-api-key\"\nexport LANGSMITH_TRACING=true\n```\n\n### Basic tracing with @traceable\n\n```python\nfrom langsmith import traceable\nfrom openai import OpenAI\n\nclient = OpenAI()\n\n@traceable\ndef generate_response(prompt: str) -> str:\n    response = client.chat.completions.create(\n        model=\"gpt-4o\",\n        messages=[{\"role\": \"user\", \"content\": prompt}]\n    )\n    return response.choices[0].message.content\n\n# Automatically traced to LangSmith\nresult = generate_response(\"What is machine learning?\")\n```\n\n### OpenAI wrapper (automatic tracing)\n\n```python\nfrom langsmith.wrappers import wrap_openai\nfrom openai import OpenAI\n\n# Wrap client for automatic tracing\nclient = wrap_openai(OpenAI())\n\n# All calls automatically traced\nresponse = client.chat.completions.create(\n    model=\"gpt-4o\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n```\n\n## Core concepts\n\n### Runs and traces\n\nA **run** is a single execution unit (LLM call, chain, tool). Runs form hierarchical **traces** showing the full execution flow.\n\n```python\nfrom langsmith import traceable\n\n@traceable(run_type=\"chain\")\ndef process_query(query: str) -> str:\n    # Parent run\n    context = retrieve_context(query)  # Child run\n    response = generate_answer(query, context)  # Child run\n    return response\n\n@traceable(run_type=\"retriever\")\ndef retrieve_context(query: str) -> list:\n    return vector_store.search(query)\n\n@traceable(run_type=\"llm\")\ndef generate_answer(query: str, context: list) -> str:\n    return llm.invoke(f\"Context: {context}\\n\\nQuestion: {query}\")\n```\n\n### Projects\n\nProjects organize related runs. Set via environment or code:\n\n```python\nimport os\nos.environ[\"LANGSMITH_PROJECT\"] = \"my-project\"\n\n# Or per-function\n@traceable(project_name=\"my-project\")\ndef my_function():\n    pass\n```\n\n## Client API\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# List runs\nruns = list(client.list_runs(\n    project_name=\"my-project\",\n    filter='eq(status, \"success\")',\n    limit=100\n))\n\n# Get run details\nrun = client.read_run(run_id=\"...\")\n\n# Create feedback\nclient.create_feedback(\n    run_id=\"...\",\n    key=\"correctness\",\n    score=0.9,\n    comment=\"Good answer\"\n)\n```\n\n## Datasets and evaluation\n\n### Create dataset\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Create dataset\ndataset = client.create_dataset(\"qa-test-set\", description=\"QA evaluation\")\n\n# Add examples\nclient.create_examples(\n    inputs=[\n        {\"question\": \"What is Python?\"},\n        {\"question\": \"What is ML?\"}\n    ],\n    outputs=[\n        {\"answer\": \"A programming language\"},\n        {\"answer\": \"Machine learning\"}\n    ],\n    dataset_id=dataset.id\n)\n```\n\n### Run evaluation\n\n```python\nfrom langsmith import evaluate\n\ndef my_model(inputs: dict) -> dict:\n    # Your model logic\n    return {\"answer\": generate_answer(inputs[\"question\"])}\n\ndef correctness_evaluator(run, example):\n    prediction = run.outputs[\"answer\"]\n    reference = example.outputs[\"answer\"]\n    score = 1.0 if reference.lower() in prediction.lower() else 0.0\n    return {\"key\": \"correctness\", \"score\": score}\n\nresults = evaluate(\n    my_model,\n    data=\"qa-test-set\",\n    evaluators=[correctness_evaluator],\n    experiment_prefix=\"v1\"\n)\n\nprint(f\"Average score: {results.aggregate_metrics['correctness']}\")\n```\n\n### Built-in evaluators\n\n```python\nfrom langsmith.evaluation import LangChainStringEvaluator\n\n# Use LangChain evaluators\nresults = evaluate(\n    my_model,\n    data=\"qa-test-set\",\n    evaluators=[\n        LangChainStringEvaluator(\"qa\"),\n        LangChainStringEvaluator(\"cot_qa\")\n    ]\n)\n```\n\n## Advanced tracing\n\n### Tracing context\n\n```python\nfrom langsmith import tracing_context\n\nwith tracing_context(\n    project_name=\"experiment-1\",\n    tags=[\"production\", \"v2\"],\n    metadata={\"version\": \"2.0\"}\n):\n    # All traceable calls inherit context\n    result = my_function()\n```\n\n### Manual runs\n\n```python\nfrom langsmith import trace\n\nwith trace(\n    name=\"custom_operation\",\n    run_type=\"tool\",\n    inputs={\"query\": \"test\"}\n) as run:\n    result = do_something()\n    run.end(outputs={\"result\": result})\n```\n\n### Process inputs\u002Foutputs\n\n```python\ndef sanitize_inputs(inputs: dict) -> dict:\n    if \"password\" in inputs:\n        inputs[\"password\"] = \"***\"\n    return inputs\n\n@traceable(process_inputs=sanitize_inputs)\ndef login(username: str, password: str):\n    return authenticate(username, password)\n```\n\n### Sampling\n\n```python\nimport os\nos.environ[\"LANGSMITH_TRACING_SAMPLING_RATE\"] = \"0.1\"  # 10% sampling\n```\n\n## LangChain integration\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.prompts import ChatPromptTemplate\n\n# Tracing enabled automatically with LANGSMITH_TRACING=true\nllm = ChatOpenAI(model=\"gpt-4o\")\nprompt = ChatPromptTemplate.from_messages([\n    (\"system\", \"You are a helpful assistant.\"),\n    (\"user\", \"{input}\")\n])\n\nchain = prompt | llm\n\n# All chain runs traced automatically\nresponse = chain.invoke({\"input\": \"Hello!\"})\n```\n\n## Production monitoring\n\n### Hub prompts\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Pull prompt from hub\nprompt = client.pull_prompt(\"my-org\u002Fqa-prompt\")\n\n# Use in application\nresult = prompt.invoke({\"question\": \"What is AI?\"})\n```\n\n### Async client\n\n```python\nfrom langsmith import AsyncClient\n\nasync def main():\n    client = AsyncClient()\n\n    runs = []\n    async for run in client.list_runs(project_name=\"my-project\"):\n        runs.append(run)\n\n    return runs\n```\n\n### Feedback collection\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Collect user feedback\ndef record_feedback(run_id: str, user_rating: int, comment: str = None):\n    client.create_feedback(\n        run_id=run_id,\n        key=\"user_rating\",\n        score=user_rating \u002F 5.0,  # Normalize to 0-1\n        comment=comment\n    )\n\n# In your application\nrecord_feedback(run_id=\"...\", user_rating=4, comment=\"Helpful response\")\n```\n\n## Testing integration\n\n### Pytest integration\n\n```python\nfrom langsmith import test\n\n@test\ndef test_qa_accuracy():\n    result = my_qa_function(\"What is Python?\")\n    assert \"programming\" in result.lower()\n```\n\n### Evaluation in CI\u002FCD\n\n```python\nfrom langsmith import evaluate\n\ndef run_evaluation():\n    results = evaluate(\n        my_model,\n        data=\"regression-test-set\",\n        evaluators=[accuracy_evaluator]\n    )\n\n    # Fail CI if accuracy drops\n    assert results.aggregate_metrics[\"accuracy\"] >= 0.9, \\\n        f\"Accuracy {results.aggregate_metrics['accuracy']} below threshold\"\n```\n\n## Best practices\n\n1. **Structured naming** - Use consistent project\u002Frun naming conventions\n2. **Add metadata** - Include version, environment, user info\n3. **Sample in production** - Use sampling rate to control volume\n4. **Create datasets** - Build test sets from interesting production cases\n5. **Automate evaluation** - Run evaluations in CI\u002FCD pipelines\n6. **Monitor costs** - Track token usage and latency trends\n\n## Common issues\n\n**Traces not appearing:**\n```python\nimport os\n# Ensure tracing is enabled\nos.environ[\"LANGSMITH_TRACING\"] = \"true\"\nos.environ[\"LANGSMITH_API_KEY\"] = \"your-key\"\n\n# Verify connection\nfrom langsmith import Client\nclient = Client()\nprint(client.list_projects())  # Should work\n```\n\n**High latency from tracing:**\n```python\n# Enable background batching (default)\nfrom langsmith import Client\nclient = Client(auto_batch_tracing=True)\n\n# Or use sampling\nos.environ[\"LANGSMITH_TRACING_SAMPLING_RATE\"] = \"0.1\"\n```\n\n**Large payloads:**\n```python\n# Hide sensitive\u002Flarge fields\n@traceable(\n    process_inputs=lambda x: {k: v for k, v in x.items() if k != \"large_field\"}\n)\ndef my_function(data):\n    pass\n```\n\n## References\n\n- **[Advanced Usage](references\u002Fadvanced-usage.md)** - Custom evaluators, distributed tracing, hub prompts\n- **[Troubleshooting](references\u002Ftroubleshooting.md)** - Common issues, debugging, performance\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdocs.smith.langchain.com\n- **Python SDK**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangsmith-sdk\n- **Web App**: https:\u002F\u002Fsmith.langchain.com\n- **Version**: 0.2.0+\n- **License**: MIT\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm hardware, framework and server versions, model format, and expected load.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Serve or log a single request or run end to end before scaling.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Measure latency, throughput and output correctness against a reference; check resource usage and costs.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| The server fails to start or OOMs | Check model size versus memory, quantization and parallelism settings. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not expose services or credentials publicly; confirm cloud costs before provisioning.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `phoenix-observability`: Open-source AI observability platform for LLM tracing, evaluation, and monitoring.\n- `llamaindex`: Data framework for building LLM applications with RAG.\n- `langchain`: Framework for building LLM-powered applications with agents, chains, and RAG.\n","# LangSmith - LLM Observability Platform\n\nDevelopment platform for debugging, evaluating, and monitoring language models and AI applications.\n\n## When to use LangSmith\n\n**Use LangSmith when:**\n- Debugging LLM application issues (prompts, chains, agents)\n- Evaluating model outputs systematically against datasets\n- Monitoring production LLM systems\n- Building regression testing for AI features\n- Analyzing latency, token usage, and costs\n- Collaborating on prompt engineering\n\n**Key features:**\n- **Tracing**: Capture inputs, outputs, latency for all LLM calls\n- **Evaluation**: Systematic testing with built-in and custom evaluators\n- **Datasets**: Create test sets from production traces or manually\n- **Monitoring**: Track metrics, errors, and costs in production\n- **Integrations**: Works with OpenAI, Anthropic, LangChain, LlamaIndex\n\n**Use alternatives instead:**\n- **Weights & Biases**: Deep learning experiment tracking, model training\n- **MLflow**: General ML lifecycle, model registry focus\n- **Arize\u002FWhyLabs**: ML monitoring, data drift detection\n\n## Quick start\n\n### Installation\n\n```bash\npip install langsmith\n\n# Set environment variables\nexport LANGSMITH_API_KEY=\"your-api-key\"\nexport LANGSMITH_TRACING=true\n```\n\n### Basic tracing with @traceable\n\n```python\nfrom langsmith import traceable\nfrom openai import OpenAI\n\nclient = OpenAI()\n\n@traceable\ndef generate_response(prompt: str) -> str:\n    response = client.chat.completions.create(\n        model=\"gpt-4o\",\n        messages=[{\"role\": \"user\", \"content\": prompt}]\n    )\n    return response.choices[0].message.content\n\n# Automatically traced to LangSmith\nresult = generate_response(\"What is machine learning?\")\n```\n\n### OpenAI wrapper (automatic tracing)\n\n```python\nfrom langsmith.wrappers import wrap_openai\nfrom openai import OpenAI\n\n# Wrap client for automatic tracing\nclient = wrap_openai(OpenAI())\n\n# All calls automatically traced\nresponse = client.chat.completions.create(\n    model=\"gpt-4o\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n```\n\n## Core concepts\n\n### Runs and traces\n\nA **run** is a single execution unit (LLM call, chain, tool). Runs form hierarchical **traces** showing the full execution flow.\n\n```python\nfrom langsmith import traceable\n\n@traceable(run_type=\"chain\")\ndef process_query(query: str) -> str:\n    # Parent run\n    context = retrieve_context(query)  # Child run\n    response = generate_answer(query, context)  # Child run\n    return response\n\n@traceable(run_type=\"retriever\")\ndef retrieve_context(query: str) -> list:\n    return vector_store.search(query)\n\n@traceable(run_type=\"llm\")\ndef generate_answer(query: str, context: list) -> str:\n    return llm.invoke(f\"Context: {context}\\n\\nQuestion: {query}\")\n```\n\n### Projects\n\nProjects organize related runs. Set via environment or code:\n\n```python\nimport os\nos.environ[\"LANGSMITH_PROJECT\"] = \"my-project\"\n\n# Or per-function\n@traceable(project_name=\"my-project\")\ndef my_function():\n    pass\n```\n\n## Client API\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# List runs\nruns = list(client.list_runs(\n    project_name=\"my-project\",\n    filter='eq(status, \"success\")',\n    limit=100\n))\n\n# Get run details\nrun = client.read_run(run_id=\"...\")\n\n# Create feedback\nclient.create_feedback(\n    run_id=\"...\",\n    key=\"correctness\",\n    score=0.9,\n    comment=\"Good answer\"\n)\n```\n\n## Datasets and evaluation\n\n### Create dataset\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Create dataset\ndataset = client.create_dataset(\"qa-test-set\", description=\"QA evaluation\")\n\n# Add examples\nclient.create_examples(\n    inputs=[\n        {\"question\": \"What is Python?\"},\n        {\"question\": \"What is ML?\"}\n    ],\n    outputs=[\n        {\"answer\": \"A programming language\"},\n        {\"answer\": \"Machine learning\"}\n    ],\n    dataset_id=dataset.id\n)\n```\n\n### Run evaluation\n\n```python\nfrom langsmith import evaluate\n\ndef my_model(inputs: dict) -> dict:\n    # Your model logic\n    return {\"answer\": generate_answer(inputs[\"question\"])}\n\ndef correctness_evaluator(run, example):\n    prediction = run.outputs[\"answer\"]\n    reference = example.outputs[\"answer\"]\n    score = 1.0 if reference.lower() in prediction.lower() else 0.0\n    return {\"key\": \"correctness\", \"score\": score}\n\nresults = evaluate(\n    my_model,\n    data=\"qa-test-set\",\n    evaluators=[correctness_evaluator],\n    experiment_prefix=\"v1\"\n)\n\nprint(f\"Average score: {results.aggregate_metrics['correctness']}\")\n```\n\n### Built-in evaluators\n\n```python\nfrom langsmith.evaluation import LangChainStringEvaluator\n\n# Use LangChain evaluators\nresults = evaluate(\n    my_model,\n    data=\"qa-test-set\",\n    evaluators=[\n        LangChainStringEvaluator(\"qa\"),\n        LangChainStringEvaluator(\"cot_qa\")\n    ]\n)\n```\n\n## Advanced tracing\n\n### Tracing context\n\n```python\nfrom langsmith import tracing_context\n\nwith tracing_context(\n    project_name=\"experiment-1\",\n    tags=[\"production\", \"v2\"],\n    metadata={\"version\": \"2.0\"}\n):\n    # All traceable calls inherit context\n    result = my_function()\n```\n\n### Manual runs\n\n```python\nfrom langsmith import trace\n\nwith trace(\n    name=\"custom_operation\",\n    run_type=\"tool\",\n    inputs={\"query\": \"test\"}\n) as run:\n    result = do_something()\n    run.end(outputs={\"result\": result})\n```\n\n### Process inputs\u002Foutputs\n\n```python\ndef sanitize_inputs(inputs: dict) -> dict:\n    if \"password\" in inputs:\n        inputs[\"password\"] = \"***\"\n    return inputs\n\n@traceable(process_inputs=sanitize_inputs)\ndef login(username: str, password: str):\n    return authenticate(username, password)\n```\n\n### Sampling\n\n```python\nimport os\nos.environ[\"LANGSMITH_TRACING_SAMPLING_RATE\"] = \"0.1\"  # 10% sampling\n```\n\n## LangChain integration\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.prompts import ChatPromptTemplate\n\n# Tracing enabled automatically with LANGSMITH_TRACING=true\nllm = ChatOpenAI(model=\"gpt-4o\")\nprompt = ChatPromptTemplate.from_messages([\n    (\"system\", \"You are a helpful assistant.\"),\n    (\"user\", \"{input}\")\n])\n\nchain = prompt | llm\n\n# All chain runs traced automatically\nresponse = chain.invoke({\"input\": \"Hello!\"})\n```\n\n## Production monitoring\n\n### Hub prompts\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Pull prompt from hub\nprompt = client.pull_prompt(\"my-org\u002Fqa-prompt\")\n\n# Use in application\nresult = prompt.invoke({\"question\": \"What is AI?\"})\n```\n\n### Async client\n\n```python\nfrom langsmith import AsyncClient\n\nasync def main():\n    client = AsyncClient()\n\n    runs = []\n    async for run in client.list_runs(project_name=\"my-project\"):\n        runs.append(run)\n\n    return runs\n```\n\n### Feedback collection\n\n```python\nfrom langsmith import Client\n\nclient = Client()\n\n# Collect user feedback\ndef record_feedback(run_id: str, user_rating: int, comment: str = None):\n    client.create_feedback(\n        run_id=run_id,\n        key=\"user_rating\",\n        score=user_rating \u002F 5.0,  # Normalize to 0-1\n        comment=comment\n    )\n\n# In your application\nrecord_feedback(run_id=\"...\", user_rating=4, comment=\"Helpful response\")\n```\n\n## Testing integration\n\n### Pytest integration\n\n```python\nfrom langsmith import test\n\n@test\ndef test_qa_accuracy():\n    result = my_qa_function(\"What is Python?\")\n    assert \"programming\" in result.lower()\n```\n\n### Evaluation in CI\u002FCD\n\n```python\nfrom langsmith import evaluate\n\ndef run_evaluation():\n    results = evaluate(\n        my_model,\n        data=\"regression-test-set\",\n        evaluators=[accuracy_evaluator]\n    )\n\n    # Fail CI if accuracy drops\n    assert results.aggregate_metrics[\"accuracy\"] >= 0.9, \\\n        f\"Accuracy {results.aggregate_metrics['accuracy']} below threshold\"\n```\n\n## Best practices\n\n1. **Structured naming** - Use consistent project\u002Frun naming conventions\n2. **Add metadata** - Include version, environment, user info\n3. **Sample in production** - Use sampling rate to control volume\n4. **Create datasets** - Build test sets from interesting production cases\n5. **Automate evaluation** - Run evaluations in CI\u002FCD pipelines\n6. **Monitor costs** - Track token usage and latency trends\n\n## Common issues\n\n**Traces not appearing:**\n```python\nimport os\n# Ensure tracing is enabled\nos.environ[\"LANGSMITH_TRACING\"] = \"true\"\nos.environ[\"LANGSMITH_API_KEY\"] = \"your-key\"\n\n# Verify connection\nfrom langsmith import Client\nclient = Client()\nprint(client.list_projects())  # Should work\n```\n\n**High latency from tracing:**\n```python\n# Enable background batching (default)\nfrom langsmith import Client\nclient = Client(auto_batch_tracing=True)\n\n# Or use sampling\nos.environ[\"LANGSMITH_TRACING_SAMPLING_RATE\"] = \"0.1\"\n```\n\n**Large payloads:**\n```python\n# Hide sensitive\u002Flarge fields\n@traceable(\n    process_inputs=lambda x: {k: v for k, v in x.items() if k != \"large_field\"}\n)\ndef my_function(data):\n    pass\n```\n\n## References\n\n- **[Advanced Usage](references\u002Fadvanced-usage.md)** - Custom evaluators, distributed tracing, hub prompts\n- **[Troubleshooting](references\u002Ftroubleshooting.md)** - Common issues, debugging, performance\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdocs.smith.langchain.com\n- **Python SDK**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangsmith-sdk\n- **Web App**: https:\u002F\u002Fsmith.langchain.com\n- **Version**: 0.2.0+\n- **License**: MIT\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm hardware, framework and server versions, model format, and expected load.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Serve or log a single request or run end to end before scaling.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Measure latency, throughput and output correctness against a reference; check resource usage and costs.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| The server fails to start or OOMs | Check model size versus memory, quantization and parallelism settings. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not expose services or credentials publicly; confirm cloud costs before provisioning.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `phoenix-observability`: Open-source AI observability platform for LLM tracing, evaluation, and monitoring.\n- `llamaindex`: Data framework for building LLM applications with RAG.\n- `langchain`: Framework for building LLM-powered applications with agents, chains, and RAG.\n",{"name":5,"license":15,"metadata":24,"description":7},{"tags":25,"version":26,"category":27,"maintainer":28,"dependencies":29},"Observability, LangSmith, Tracing, Evaluation, Monitoring, Debugging, Testing, LLM Ops, Production","1.0.0","ml-inference-and-ops","Kalaris Labs","langsmith>=0.2.0","main","29fe36d26127205057d5e0ed8425f6b0e9a8c13a","skills\u002Flangsmith-observability",16,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills","https:\u002F\u002Fdocs.kalarislabs.com\u002Fresearch-agent-skills","https:\u002F\u002Fgithub.com\u002FKalarisLabs","kalarislabs.com","Applied AI lab building the infrastructure for the agentic era","2026-11-14 17:49:08",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add KalarisLabs\u002Fresearch-agent-skills --skill langsmith-observability",{"tool":46,"command":47},"bunx","bunx skills add KalarisLabs\u002Fresearch-agent-skills --skill langsmith-observability",{"tool":49,"command":50},"pnpm","pnpm dlx skills add KalarisLabs\u002Fresearch-agent-skills --skill langsmith-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flangsmith-observability\u002FSKILL.md",true,[54,60],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fadvanced-usage.md","REFERENCE","参考文档",12006,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flangsmith-observability\u002Freferences\u002Fadvanced-usage.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Ftroubleshooting.md",10983,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Flangsmith-observability\u002Freferences\u002Ftroubleshooting.md",[65,72,79,86,93,100],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M74Z8MGT305R11SNY5G28QH5","plos","Prepare manuscripts for PLOS journals (PLOS ONE, PLOS Biology, PLOS Computational Biology, PLOS Genetics, PLOS Medicine, PLOS Pathogens, PLOS Neglected Tropical Diseases, PLOS Global Public Health and others), covering structure, abstract and author summary, Vancouver-style references, the mandatory data availability policy, ethics and financial disclosure statements, figure requirements (PACE), the PLOS LaTeX template, reporting guidelines and PLOS ONE's publication criteria. Use when targeting any PLOS journal or checking compliance with PLOS policies.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplos\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M74Z8CCN9APXYHNQ95V1EBGT","pkpd-modeling","Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK\u002FPD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when analysing concentration-time data, deriving exposure metrics, fitting PK or PD models, or evaluating dosing regimens. Triggers include \"pharmacokinetics\", \"pharmacodynamics\", \"PK\u002FPD\", \"NCA\", \"non-compartmental\", \"AUC\", \"Cmax\", \"lambda z\", \"half-life\", \"clearance\", \"volume of distribution\", \"compartmental model\", \"population PK\", \"popPK\", \"NONMEM\", \"nlmixr2\", \"Pharmpy\", \"Monolix\", \"exposure-response\", \"Emax\", \"EC50\", \"indirect response\", \"effect compartment\", \"TMDD\", \"PBPK\", \"bioequivalence\", \"RSABE\", \"ABEL\", \"allometric scaling\", \"first-in-human\", \"MABEL\", \"drug-drug interaction\", \"DDI\", \"ICH M12\", \"concentration-QTc\", \"therapeutic drug monitoring\", \"MIPD\", and \"dosing regimen\".","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpkpd-modeling\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74Z86YHJJ1FM3X87BHN76KZ","pinecone","Guides use of Pinecone, a managed serverless vector database, through its Python client and the LangChain and LlamaIndex integrations. Covers creating indexes, upserting and querying vectors, metadata filtering, namespaces, hybrid dense and sparse search, index management, and deleting vectors. Use when building a production RAG system on a hosted vector store, adding semantic search or recommendations without running infrastructure, isolating per-user or per-tenant data with namespaces, combining dense and sparse vectors in one query, or filtering results by metadata. Do not use for self-hosted or local stores (Chroma, Weaviate) or offline similarity search (FAISS).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpinecone\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M74Z80T6E89SAJ8MYDD0767Q","pi-agent","Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers\u002Fmodels\u002Fsettings\u002Fenvironment variables, creating Pi skills\u002Fextensions\u002Fpackages\u002Fthemes\u002Fprompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation\u002Forchestration), pi-mcp-adapter (MCP servers), pi-interview (interactive forms), and pi-web-access (web search, fetching, video understanding).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpi-agent\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M74Z7WF1Y8Q3VFAQPPPRAFMV","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fphoenix-observability\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M74Z7HNEH1A2AVYR3G1X2QV6","peft-fine-tuning","Fine-tunes LLMs with Hugging Face PEFT, using LoRA, QLoRA, IA3, AdaLoRA, prefix tuning, and prompt tuning so that under 1% of parameters are trained. Covers rank, alpha, and target module selection, loading and merging adapters, multi-adapter serving, and integration with TRL SFTTrainer, Axolotl, and vLLM. Use when fine-tuning 7B-70B models on limited GPU memory, when running QLoRA on a single 24GB GPU, when choosing LoRA rank and alpha, when merging or swapping adapters on one base model, or when debugging CUDA OOM or an adapter that does not apply. Not for full fine-tuning of small models under 1B parameters or cases needing all weights updated.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpeft-fine-tuning\u002FSKILL.md",[],[]]