Integrations / LlamaIndex
To trace LlamaIndex with Uncoil, wrap each query or agent run in the Python SDK's trace_agent decorator and record retrieval as its own step. Model calls made through a wrapped provider client join the same trace.
Your code
LlamaIndex
Uncoil
One run.
Setup
import uncoil
@uncoil.trace_agent(name="docs-rag")
def answer(question: str):
with uncoil.span("retrieve", type="retrieval", input=question):
nodes = retriever.retrieve(question)
with uncoil.span("synthesize", type="llm"):
return query_engine.query(question)Full details in the documentation. All integrations are listed on the integrations page.
