Find answers from the community

Updated last year

Anyone had experience using

Anyone had experience using VectorIndexAutoRetriever and getting it to work? I have the syntax correct, I think, but when I try to run the query_engine I get an opaque error I'm not sure how to debug.
for item in collection_names: retriever = VectorIndexAutoRetriever( index=vector_store_indicies[item], vector_store_info=index_infos['vector_index'][item], prompt_template_str = retriever_prompt_strings[item], similarity_top_k=num_k, max_top_k=5 ) response_synthesizer = TreeSummarize(summary_template=qa_prompt_templates[item]) query_engine = RetrieverQueryEngine( retriever=retriever, response_synthesizer=response_synthesizer, node_postprocessors = [metadata_replace] )
That code appears to be valid, but when the interpreter gets to the following, it chokes:
`
response = query_engine.query(
f"{query_str}",
)
-> in pydantic.main.BaseModel.parse_obj:522
TypeError: 'NoneType' object is not iterable
β”‚ ❱ 63 β”‚ β”‚ β”‚ response = query_engine.query( β”‚
β”‚ 64 β”‚ β”‚ β”‚ β”‚ f"{query_str}", β”‚
β”‚ 65 β”‚ β”‚ β”‚ β”‚ )
t
W
2 comments
β”‚ C:\anaconda3\envs\kedro_workbench_venv\lib\site-packages\llama_index\query_engine\retriever_quer β”‚
β”‚ y_engine.py:172 in _query β”‚
β”‚ β”‚
β”‚ C:\anaconda3\envs\kedro_workbench_venv\lib\site-packages\llama_index\query_engine\retriever_quer β”‚
β”‚ y_engine.py:120 in retrieve β”‚
β”‚ β”‚
β”‚ C:\anaconda3\envs\kedro_workbench_venv\lib\site-packages\llama_index\indices\base_retriever.py:2 β”‚
β”‚ 2 in retrieve β”‚
β”‚ β”‚
β”‚ C:\anaconda3\envs\kedro_workbench_venv\lib\site-packages\llama_index\indices\vector_store\retrie β”‚
β”‚ vers\auto_retriever\auto_retriever.py:99 in _retrieve β”‚
β”‚ β”‚
β”‚ C:\anaconda3\envs\kedro_workbench_venv\lib\site-packages\llama_index\indices\vector_store\retrie β”‚
β”‚ vers\auto_retriever\output_parser.py:13 in parse β”‚
β”‚ β”‚
β”‚ in pydantic.main.BaseModel.parse_obj:525 β”‚
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValidationError: 1 validation error for VectorStoreQuerySpec
root
VectorStoreQuerySpec expected dict not NoneType (type=type_error)
Could be Pydantic issue, Try downgrading pydantic with pip install pydantic==1.10.12 version once.

See if it works
Add a reply
Sign up and join the conversation on Discord