Find answers from the community

Home
Members
ddd_avila
d
ddd_avila
Offline, last seen 3 months ago
Joined September 25, 2024
Is there any example of the NeedleInAHaystack test with Llama-index?
1 comment
L
Can I use the Query Pipeline as a query tool?
3 comments
L
d
Is there a way to use LMFormatEnforcerPydanticProgram in a query engine? I'm using a quantized LLama2-based model through LLamaCPP, and from there, I'm trying to use the SubQuestionQueryEngine like this

Plain Text
query_engine_tools = [
    QueryEngineTool(
        query_engine=index.as_query_engine(similarity_top_k=10, node_postprocessors=[meta_processor, reranker_procesor]),
        metadata=ToolMetadata(
            name=f"us_evidence_rules",
            description=f"Useful for queries about evidence rules of the US federal government",
        ),
    )
]

response_synthesizer = get_response_synthesizer(response_mode="compact")
query_engine = SubQuestionQueryEngine.from_defaults(
    query_engine_tools=query_engine_tools,
    response_synthesizer=response_synthesizer,
)


Nevertheless, I keep getting the same error due to the output parsing:

Plain Text
ValidationError: 1 validation error for SubQuestion
__root__
  SubQuestion expected dict not str (type=type_error)
5 comments
L
d