Skip to content

Is that possible to add SubQuestionQueryEngine to Pandas Query Pipeline? #15671

Answered by dosubot bot
mraguth asked this question in Q&A
Discussion options

You must be logged in to vote

To get the vector_query_engine in the example, you can create it from a VectorStoreIndex using the following code snippet:

# build index and query engine
vector_query_engine = VectorStoreIndex.from_documents(
    documents=documents,
    use_async=True,
).as_query_engine()

This vector_query_engine can then be used to add sub_question_query_engine to a Pandas query pipeline as shown in the example:

from llama_index.core.query_pipeline import QueryPipeline as QP, InputComponent, Link
from llama_index.query_engine.sub_question_query_engine import SubQuestionQueryEngine
from llama_index.query_engine.query_engine_tool import QueryEngineTool
from llama_index.query_engine.base_question_generator 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dosubot
Comment options

Answer selected by mraguth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant