Skip to content

Exploring Structured Planning Agent-Need Help #14412

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

You must be logged in to vote

Yes, it is possible to convert your existing query engine into the required tool to initiate a structured planner using LlamaIndex. Here is how you can achieve this:

  1. Convert Your Query Engine to a Tool:
    Use the QueryEngineTool.from_defaults method to create a tool from your existing RAGStringQueryEngine.

    from llama_index.core.tools import QueryEngineTool
    
    # Assuming your RAGStringQueryEngine is already initialized and indexed
    query_engine = RAGStringQueryEngine(
        retriever=recursive_retriever,
        response_synthesizer=response_synthesizer,
        pandas_prompt=pandas_prompt,
        pandas_output_parser=pandas_output_parser,
        llm=llm,
        qa_prompt=qa_prompt,
        synthesize_response=True,…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mraguth
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants