← all projects
Backend EngineeringBackendRAGObservability

Zendex — RAG Chat with Inference Logging SDK

Multi-turn streaming RAG chat over 468 curated ideas with multi-provider failover across Groq Llama 3.3 70B and Gemini 2.0 Flash. Built a custom inference logging SDK for latency, token usage, errors, and PII redaction per request, plus an observability dashboard with real-time metrics and Langfuse traces.

Next.jsFastAPISupabasePineconeLangfuseDocker

Shared on Twitter, where Zendex gained 38K+ impressions and was seen by Noah Zender, whose ideas power the RAG knowledge base. Twitter launch post

Problem

RAG demos usually stop at retrieval and chat. Zendex treats the system like production software: every inference needs traceability, failure handling, latency visibility, and enough privacy discipline to be inspected later.

Approach

System Diagram

1

Next.js chat UI

Streams assistant responses and keeps citations visible to the user.

2

FastAPI orchestration

Owns retrieval, provider routing, streaming, and SDK instrumentation.

3

Pinecone retrieval

Searches the curated idea corpus and returns chunks for grounded responses.

4

LLM failover

Routes generation across Groq and Gemini based on availability and task fit.

5

Observability layer

Stores inference logs, Langfuse traces, latency, usage, and error signals.

Key Decisions

Why separate orchestration from the UI

The FastAPI layer keeps retrieval, logging, and provider routing server-side, so the frontend only handles interaction and rendering.

Why build a custom SDK

Logging inside the inference boundary captures useful operational signals before errors or retries hide what actually happened.

Concepts Used

Retrieval-augmented generationStreaming responsesProvider failoverInference observabilityPII redaction

Outcomes

← back to featured projects