Find answers from the community

Updated 10 months ago

@Jedi did you manage to resolve this

@Jedi did you manage to resolve this issue ? I too face similar issues
L
s
16 comments
just do pip install -U sqlite-utils
@Logan M - The issue still persists. It is in the latest version of sqlite-utils-3.36
hmm yea, found the bug, pushing a fix soon
should be fixed if you just do pip install -U llama-index-core
@Logan M i had a quick check , and also updated the both sqlite-utils and llama-index-core but the issue still remains. I am using mistral-7b instruct model but i think it should not matter , on the choice of llm
SW versions
llama-index-core 0.10.14
sqlite-fts4 1.0.3
sqlite-utils 3.36
i will give it a try with mistral instruct . Now i am curious why it didnt work for me . I will just add the hugging face llm function to the colab notebook and check
I think for soem reason it doesnt work for mistral instruct . I also tried a simple print statement just to see perhaps if there was something wrong . Added loading of model from hugging face
notebook link : https://colab.research.google.com/drive/18o5tvNZWufcseIHvXJEQv1P4i1K74s2p?usp=sharing
Very spooky, I checked the source code and the fix I made didn't get comitted. No idea how my notebook worked though
ok, patched it, NOW it works (although the model does not write a correct query lol)
ok you mean something like this right ?
Plain Text
OperationalError: near "sql": syntax error

The above exception was the direct cause of the following exception:

ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/llama_index/core/query_engine/jsonalyze_query_engine.py in default_jsonalyzer(list_of_dict, query_bundle, llm, table_name, prompt, sql_parser)
    108     except sqlite_utils.utils.sqlite3.OperationalError as exc:
    109         print_text(f"Error executing query: {sql_query}")
--> 110         raise ValueError("Invalid query") from exc
    111 
    112     return sql_query, table_schema, results
yup exactly πŸ‘€
So now everything is working, just the LLM is not cooperating πŸ˜… Pretty common when trying to parse output from open-source models
oh shoot. The json parser would have been great to query different part of the jsons .... too bad this tool is not working with other open source models. but in general a good concept.
Maybe with a different model or some prompt engineering it might perform better πŸ€”
actuallly not sure , it is said the mistral 7b instruct model is the best is what i have understood
Add a reply
Sign up and join the conversation on Discord