Find answers from the community

Updated 2 months ago

Hi Everyone, Just a doubt, but does the

Hi Everyone, Just a doubt, but does the llama index only give answers based on data present in a vector database or a structured database? What If I want to run some general query eg "How many planets solar system have ", It gives me error :

"Transformed query given SQL response: None
I'm sorry, but there is no information available about Sony in the query results."

I want to run generalized queries too. I'm using SQLAutoVectorQueryEngine.
a
c
11 comments
You may be able to make this work by creating a RouterQueryEngine that uses two query engines:

  1. SQLAutoVectorQueryEngine
  2. a CustomQueryEngine (that has no retrieval component and just prompts the generator LLM)
another issue is that when running a query across the db, eg "Phoe number of Fay Pat"

it is fetching the results and generating the right SQL queries :

but not showing results and showing sorry, I cannot give phone number
"SELECT phone_number
FROM employees
WHERE first_name = 'Fay' AND last_name = 'Pat'
SQLResult: phone_number = '555-1234'
Answer: Fay Pat's phone number is 555-1234."

I'm sorry, but there is no phone number available for Fay Pat in the database.
@nerdai : Thank you for the guidance, on how to distinguish between 2 query engines, and how will be decided, which engine to use?
Oh interesting, perhaps there is a bug. Can you submit a bug issue to our main repo, and provide code to replicate it?
for the routing logic, you have to define a selector. For example, you can configure an LLM selector to route between the 2 query engines
I definitely want to but I'm not sure how to submit a bug issue. I can provide the code and a detailed description of the issue.
just log in to your github and click "New Issue" πŸ™‚
@nerdai : Raise the issue, Also a request,

can you please share the demo code for :

"
You may be able to make this work by creating a RouterQueryEngine that uses two query engines:

SQLAutoVectorQueryEngine
a CustomQueryEngine (that has no retrieval component and just prompts the generator LLM)

for the routing logic, you have to define a selector. For example, you can configure an LLM selector to route between the 2 query engines"


I have created SQLAutoVectorQueryEngine
Add a reply
Sign up and join the conversation on Discord