Now in Public Beta

The observability layer
for ML pipelines

Stop guessing why your pipeline dropped candidates. Trace every item through retrieval, ranking, and filtering in a single dashboard.

quickstart.py
import xray

@xray.pipeline("rag-pipeline")
def answer(question: str):
    docs = retrieve(question)      # 100 docs
    reranked = rerank(docs)        # 100 docs, scored
    filtered = filter(reranked)    # 5 docs
    return generate(question, filtered)

@xray.step("FILTER")
def filter(docs):
    for doc in docs:
        if doc.score < 0.3:
            xray.drop(doc, "low_relevance")
            continue
        yield doc

Built for performance

X-Ray provides deep visibility into your ML stack without compromising on speed or DX.

Visibility

Track every candidate through your pipeline. See exactly where items are dropped and why. Never guess again.

Performance

Async batched ingestion with less than 1ms overhead. Your pipeline performance stays untouched.

Code-First

Simple Python decorators integrate naturally with your existing code. No config files, no DSLs.

Instrument any pattern

Native support for the most common ML pipeline architectures.

RAG Pipelines

Debug retrieval and context selection

Track document retrieval, reranking, and filtering. See exactly which documents made it to your LLM context and which were dropped.

"ZenRay helped us identify why our RAG pipeline was missing relevant documents. Found the issue in 10 minutes."

M

ML Engineer

Series B Startup

rag.py
@xray.pipeline("rag")
def answer(question: str):
    docs = retrieve(question)      # 100 docs
    reranked = rerank(docs)        # 100 docs, scored
    filtered = filter(reranked)    # 5 docs
    return generate(question, filtered)

@xray.step("FILTER")
def filter(docs):
    for doc in docs:
        if doc.score < 0.3:
            xray.drop(doc, "low_relevance")
            continue
        yield doc
Search & Ranking

Debug multi-stage ranking pipelines

Understand your e-commerce search, recommendation systems, and any pipeline that retrieves, scores, and filters candidates.

"We reduced debugging time from hours to minutes. The candidate trace feature is invaluable."

S

Staff Engineer

E-commerce Platform

search.py
@xray.pipeline("product-search")
def search(query: str, user_id: str):
    xray.tag("user_id", user_id)
    
    candidates = retrieve(query)
    scored = rank(candidates)
    filtered = apply_filters(scored)
    return personalize(filtered, user_id)[:10]

@xray.step("RANK")
def rank(items):
    for item in items:
        score = model.predict(item)
        xray.score(item, score)
        item.score = score
    return sorted(items, reverse=True)
AI Agents

Debug tool selection and decision paths

Track which tools were considered, why certain actions were chosen, and how your agent arrived at its final decision.

"Finally we can understand why our agent chose one tool over another. Game changer for debugging."

A

AI Engineer

AI Startup

agents.py
@xray.pipeline("agent")
def run_agent(task: str):
    xray.tag("task_type", classify(task))
    
    tools = select_tools(task)
    for tool in tools:
        result = execute(tool, task)
        if is_complete(result):
            return result
    return fallback(task)

@xray.step("SELECT")
def select_tools(task):
    for tool in ALL_TOOLS:
        if not tool.matches(task):
            xray.drop(tool, "not_applicable")
            continue
        yield tool

Ready to see
under the hood?

Join hundreds of engineers building more reliable ML systems with X-Ray. Free to start, pay only as you scale.