Hey all, does anyone know how to keep the retriever spans available when using a SubQuestionQueryEngine in LlamaIndex?
Hi Delon. Let me look into that for you.
Hi Roger, yes I am
as well as the Reranker spans
are you not seeing thees spans in Phoenix when you tried it?
with certain query engines (llamaindex abstraction) but not others, even though I am assigning the same callbacks
the SubQuestionQueryEngine, for example, doesn't show them
whereas a RetrieverQueryEngine does
you can try the debug callback manager from LlamaIndex
from llama_index.callbacks import CallbackManager, LlamaDebugHandler
from llama_index import ServiceContext
llama_debug = LlamaDebugHandler(print_trace_on_end=True)
callback_manager = CallbackManager([llama_debug])
service_context = ServiceContext.from_defaults(
callback_manager=callback_manager
)it鈥檚 supposed to print out the events like this
**********
Trace: query
|_query -> 13.064431 seconds
|_llm -> 2.499768 seconds
|_sub_question -> 2.05934 seconds
|_query -> 2.059142 seconds
|_retrieve -> 0.278184 seconds
|_embedding -> 0.274593 seconds
|_synthesize -> 1.780895 seconds
|_llm -> 1.740488 seconds
|_sub_question -> 5.364061 seconds
|_query -> 5.363695 seconds
|_retrieve -> 0.230257 seconds
|_embedding -> 0.226763 seconds
|_synthesize -> 5.133343 seconds
|_llm -> 5.091069 seconds
|_sub_question -> 2.148964 seconds
|_query -> 2.14889 seconds
|_retrieve -> 0.323438 seconds
|_embedding -> 0.319841 seconds
|_synthesize -> 1.825401 seconds
|_llm -> 1.783064 seconds
|_synthesize -> 5.198214 seconds
|_llm -> 5.175849 seconds
**********if it鈥檚 not printing out the event that you鈥檙e looking for, we probably don鈥檛 receive it in Phoenix
okay got it, the print statement you showed is from running a SubQuestionQueryEngine on your end? The implementation i'm dealing with is also part of a chat engine
yes, it鈥檚 from that notebook i linked to above. when i ran that notebook, the retrieve spans do show up in Phoenix
ah interesting okay
