Stop guessing why your pipeline dropped candidates. Trace every item through retrieval, ranking, and filtering in a single dashboard.
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 X-Ray provides deep visibility into your ML stack without compromising on speed or DX.
Track every candidate through your pipeline. See exactly where items are dropped and why. Never guess again.
Async batched ingestion with less than 1ms overhead. Your pipeline performance stays untouched.
Simple Python decorators integrate naturally with your existing code. No config files, no DSLs.
Native support for the most common ML pipeline architectures.
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."
ML Engineer
Series B Startup
@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 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."
Staff Engineer
E-commerce Platform
@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) 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."
AI Engineer
AI Startup
@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 Join hundreds of engineers building more reliable ML systems with X-Ray. Free to start, pay only as you scale.