Find answers from the community

Updated 3 months ago

Text2SQL + analize answer

I was trying to follow the text2sql example, and noticed that when you ask something, it tried to build a sql, and execute it. (nice!) however i came to read the prompt used, which is this one:
k
L
11 comments
The text suggest that the llm should parse the output and try to use that to build an answer.
But what i see is that it outputs the result of the sql execution, and does not try to analyse that further on.
Noticed too your repo @Logan M , (looks nice!) with the streamlitsql_sandbox. The third tab, you use langchain to somehow make the llm read the sql result and analyze to builds a final answer.
So, should the llamaindex prompt helm to build a final answer? or should i better start learning lanchain? 🙂
Yes, I used langchain to analyze the sql result! It's a little hacky but it seems to work haha

I'm not sure if there's a way to get a natural language response using the sql index from Llama Index without something extra like langchain 😅 this could definitely be improved in llama index itself though!
all right, will try to get into langchain then.
@Logan M Langchain seems to have quite some overlap, at first impression. They seems to have indexes as well. What takes llamaindex apart? support of more complex indexes, like composable, etc? maybe with simeplevectorindex’es, you can do the same with boths?
There is definitely some overlap

Llama index is more focused on data indexing, while langchain is more of a chat frontend.

The advantage with llama index is as you said, more complex index structures. Plus saving and loading them is a bit more flexible I think (especially going forward!)

Plus another cool concept with llama index is that you can use specific indexes as custom "tools", which is pretty powerful
All right, thanks for the tips!!
Add a reply
Sign up and join the conversation on Discord