Skip to content

Latest commit

 

History

History
136 lines (101 loc) · 4.49 KB

introduction.mdx

File metadata and controls

136 lines (101 loc) · 4.49 KB
title description
Introduction
Welcome to the Langtrace AI documentation

Langtrace is an open-source observability tool that collects and analyze traces in order to help you improve your LLM apps. Langtrace has two components:

  • SDK: The SDK is a lightweight library that can be installed and imported into your project in order to collect traces. The traces are open telemetry based and can be exported to Langtrace or any other observability stack.
    GitHub: Python SDK Typescript SDK trace-attributes
  • Langtrace Dashboard: The dashboard is a web-based interface where you can view and analyze your traces.
    GitHub: Langtrace
**[OpenTelemetry](https://opentelemetry.io/)**: The traces generated by Langtrace are based on the OpenTelemetry standard. This means that you can use Langtrace with your existing observability stack, or export the traces to Langtrace.

Hero Light Hero Dark

Langtrace optimizes for the following 3 pillars of observability for your LLM apps:

  • Usage - Tokens and Cost
  • Accuracy
  • Performance - Latency and Success Rate

Need help with the SDK? Contact us

Setting up

The first step to using Langtrace is to import into your Typescript or Python project.

Step 1: Signup to Langtrace and generate an API key from the Langtrace dashboard.

  • Signup to Langtrace here

  • Go to the Langtrace dashboard

  • Create a new project, be sure to provide a name and description project

  • Click on the Project name

  • Click on the Generate API Key button api

  • Copy the generated API key. You will need this key to initialize the SDK in your project.

Step 2: Install the SDK on your project:

  • Python: Install the Langtrace SDK using pip
pip install langtrace-python-sdk
  • Typescript: Install the Langtrace SDK using npm
npm i @langtrase/typescript-sdk

Step 3: Initialize the SDK in your project:

// Must precede any llm module imports
import * as Langtrace from "@langtrase/typescript-sdk";

Langtrace.init({ api_key: "<LANGTRACE_API_KEY>" });
from langtrace_python_sdk import langtrace

langtrace.init(api_key = '<LANGTRACE_API_KEY>')

Step 3: Run your application to view your traces on the Langtrace dashboard.

You can now view your traces on the Langtrace dashboard.

traces

Start using Langtrace

Dive into the SDK features. Here are the supported languages

Integrate with your Python project Integrate with your Typescript project

We are working hard to add support for more languages.

FAQs

  • What is Langtrace? Langtrace is an open-source observability tool that helps you collect and analyze traces to improve your LLM apps.
  • How do I get started with Langtrace? To get started with Langtrace, you need to signup and generate an API key. Then, install and import the SDK into your project to start shipping traces to Langtrace.
  • What are the benefits of using Langtrace? Langtrace helps you with the following:
    • Monitor your LLM usage - token and costs, latency and success rate.
    • Evaluate the responses of the LLM to measure the accuracy of your LLM apps.
    • Create and manage datasets and prompt sets for your LLM apps.
  • What languages does Langtrace support? Langtrace currently supports Python and Typescript. We are adding support for more languages.
  • Pricing Langtrace is completely Free to use at the moment. We are mainly looking for feedback. However, please note that this is subject to change in the future.