You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a query returns zero rows, the prompt to NLResponder is formatted incorrectly. As a result, the LLM lacks information about the empty result and tends to hallucinate a response.
Request starts...
MESSAGE: find all people from NY
=======================================
=======================================
LLM event starts...
LLM EVENT PROMPT TYPE: IQLPromptTemplate
[{'role': 'system', 'content': 'You have access to API that lets you query a database:\n\nfilter_by_city(city: str)\nPlease suggest which one(s) to call and how theyshould be joined with logic operators (AND, OR, NOT).\nRemember! Don\'t give any comments, just the functioncalls.\nThe output will look like this:\nfilter1("arg1") AND
(NOT filter2(120) OR filter3(True))\nDO NOT INCLUDE arguments names in your response. Only the values.\nYou MUST use only these methods:\n\nfilter_by_city(city: str)\nIt
is VERY IMPORTANT not to use methods other than those listed above.If you DON\'T KNOW HOW TO ANSWER DON\'T SAY "", SAY: `UNSUPPORTED QUERY` INSTEAD! This is CRUCIAL,
otherwise the system will crash. '}, {'role': 'user', 'content': 'find all people from NY'}]RESPONSE: filter_by_city("NY")==============================================================================LLM event starts...LLM EVENT PROMPT TYPE: NLResponderPromptTemplate[{'role': 'system', 'content': "You are a helpful assistant that helps answer the user's questions based on the table provided. You MUST use the table to answer the
question. You are very intelligent and obedient.\nThe table ALWAYS contains full answer to a question.\nAnswer the question in a way that is easy to understand and
informative.\nDON'T MENTION using a table in your answer."}, {'role': 'user', 'content': 'The table below represents the answer to a question: find all people from
NY.\n\nAnswer the question: find all people from NY.'}]RESPONSE: The people from NY are:1. Sarah, Age 282. John, Age 45==============================================================================REQUEST OUTPUT:Number of rows: 0SELECT clients.id, clients.name, clients.city, clients.date_joined, clients.total_ordersFROM clientsWHERE clients.city = 'NY'
The text was updated successfully, but these errors were encountered:
What happened?
When a query returns zero rows, the prompt to NLResponder is formatted incorrectly. As a result, the LLM lacks information about the empty result and tends to hallucinate a response.
How can we reproduce it?
Relevant log output
The text was updated successfully, but these errors were encountered: