Graphlit can accelerate your Generative AI app development by providing an API-first platform that offers intelligent text extraction, vector-based search, and RAG conversations, along with audio and video transcription support.

Langtrace integrates directly with Graphlit, providing comprehensive tracing and monitoring capabilities for your RAG (Retrieval-Augmented Generation) applications. Track everything from data ingestion to conversation completion with detailed performance metrics.

Prerequisites

Before you begin, ensure you have the following:

  • An active account on the Graphlit Platform with access to the API Settings page.
  • An API key from Langtrace. Sign up for Langtrace if you haven’t done so already.

Setup

  1. Install the Graphlit client and Langtrace’s SDK and initialize the SDK in your code.
Python
# Install the SDK
pip install langtrace-python-sdk graphlit-client
  1. Setup environment variables:
Shell
export LANGTRACE_API_KEY=YOUR_LANGTRACE_API_KEY
export GRAPHLIT_ORGANIZATION_ID=YOUR_GRAPHLIT_ORGANIZATION_ID
export GRAPHLIT_ENVIRONMENT_ID=YOUR_GRAPHLIT_ENVIRONMENT_ID
export GRAPHLIT_JWT_SECRET=YOUR_GRAPHLIT_JWT_SECRET

Usage

Initialize Langtrace and Graphlit:

Ingest content and create a specification:

Create and interact with a conversation:

Run the complete RAG pipeline:

You can now view your traces on the Langtrace dashboard, including:

  • Data ingestion metrics
  • Specification creation details
  • Conversation flow and completion times
  • Error tracking and diagnostics

Additional Resources