Find answers from the community

s
F
Y
a
P
Updated last month

Logan M jerryjliu0 you guys did

you guys did fabulous on query engine , now you need to shift your focus on chatengine because implement it in production is very painful
L
a
i
16 comments
Can you list some issues?
constructive feedback is welcome πŸ™‚
For example in my case query engine is working perfectly fine but chat engine hallucinate for the same query
so a lot of this comes down to how chat works. There's only so many approaches to including chat history that make sense

data agents (default) -- this chat engine uses indexes as "tools", and when a user sends a message, the LLM has to decide whether to use a tool based on their names/descriptions or just answer the user without it

context -- every user message is used to retrieve nodes from an index, and insert those nodes as part of the system prompt. Then the LLM reads that + the chat history to answer a query

condense question -- every user message is transformed into a new query based on the chat history, and then that query is sent to the query engine and an answer is returned

For agents and context, setting a system prompt can help quite a bit. Something like system_prompt="Answer without any prior knowledge, use a tool/function when unsure how to answer a question." .

Also, setting good descriptions/tool names helps for agents
If you have ideas for approaches, would love to see a PR πŸ™‚
Is your data structured or unstructured? I want to built chat engine with structured databse, but not sure how will I get index store
@Logan M @jerryjliu0 , I can see a lot of info on chat engine on unstructured data (PDF). But I want to built a chat engine with structured data (SQL/pandas) . I can use query engines on sql and pandas, but a chat engines is needed for a conversation on tabular data. I cant find any example , got stucl. Can you guys assist here. TIA πŸ™‚
@Logan M , can you help me out how to fix the parsing error for my pandasquery engine - Sharing the screenshot:
Attachment
image.png
You can see that the LLM didn't even try to write any pandas code πŸ˜… so there's nothing to run
What LLM are you using?
It did write pandas code. You can check in the screenshot. I'm usinf Mistral 7B
Issue is output parsing. Is there any resource to handle this?
It wrote python code in multiple chunks.

There's no way to parse that reliably. Just needs prompt engineering to get the llm to properly output the python
Open source models are very bad at this, I wouldn't put too much effort into fixing this in my opinion πŸ˜…
Yes, Fair enough. What can I do? Any idea :D? How to fix "unexpected indent"
Add a reply
Sign up and join the conversation on Discord