KB Search from table
# 🤝help
l
generate a query from the input "{{workflow.helpQuery}}" to be executed on table emailsTable I have a table which has email and city. Altough it is giving me the results, it is not accurate https://cdn.discordapp.com/attachments/1255570452563103815/1255570452735201341/image.png?ex=667d9c9b&is=667c4b1b&hm=39c76b38b352d61977fc598c78ebfe61af7f13d11832c017d340ccf01689fb85&
@fresh-fireman-491 have you tried this?
f
The AI Task doesn't have access to your table. Its just an AI hallucinating.
n
@decay how can you tell from that image?
@limited-pencil-78283 I had a lot of frustration fun getting a simple kb to work correctly. Here's what I eventually did. I added the table to the KB but I also added in a "citations" file in json like this: {"name":"Some dude", "Background":"Some dudes background", "email": "some email", "citation":"website url or such"}
f
Its in general that the AI Task doesn't have access to the table, nor does it have access to a KB.

https://www.youtube.com/watch?v=vAaCudOUwuc&t=2550s

l
@fresh-fireman-491 I am not asking the AI task to acces the table. I am asking AI task to create a query that will be given as input to the Query Knowledge Base for it to go an fetch the data
f
Why not use the Find Records card?
l
this the task given to AI "generate a query from the input "{{workflow.helpQuery}}" to be executed on table emailsTable "
f
Use the AI Task to make the prompt for it
l
Yes, I have
AI Task is fed to Query Knowledge Bases
[Capture] Field validation successful! Extracted: "list Email where City is Delhi". Input: list Email where City is Delhi SELECT Email FROM emailsTable WHERE City = \'Delhi\' Answer generated, needs to be sent manually --> {{turn.KnowledgeAgent.answer}} { answer: '- info@sbansi.com - maneesh.d@raati.com - supreet@srcasting.com - sales@japment.com - alok@surdia.com - nehruplace@ind.com - ketan.talwar@teia.in - delsales@paagon.com - sales@ash.com - info@sars.in - darpan.kapoor@ks.com - delrp@ss.in - info@hea.com - info@saraa.in - support@ezdve.in'
the problem is the result is inaccurate
or at times incomplete, like in this case there 18 records and it has shown only 15
f
But why are you using the "Query Knowledge Base" card, and not the "Find Records" Card
l
I will try this
Its just the tip of the iceberg, I want to expand this to a larger search
also, if I use 'Find Records' it retuns empty
I said : list all email where city is delhi Virtual assistant said : info@som.com maneesh.d@pr.com supreet@srsdi.com sales@jayqui.com alok@surbia.com nehruplace@oaia.com delsales@paragents.com sales@asha.com info@sara.in darpan.kapoor@kns.com delrp@sun.in info@herbdia.com info@saraia.in Virtual assistant said : Ask your query I said : list email and city where city is delhi Virtual assistant said : nehruplace@oaa.com, Delhi delsales@paragnts.com, Delhi sales@ashn.com, Delhi info@sarns.in, Delhi darpan.kapoor@kans.com, Delhi delrp@surs.in, Delhi info@heria.com, Delhi info@saria.in, Delhi When I added city to the query the number of results reduced
n
It says in the log that it found the kb answer, and you can see the kb table has the answer Mumbai down. i think it just chunked in the wrong spot.
@limited-pencil-78283 one other thing that ive found helps, once you write up your prompt wash it through a gpt, asking it to improve your prompt and put the result in json.
use that for your kb query
and youd do better, again to translate your table to json and put it in a doc. i think those chunk better.
OR I just discovered this use a third party KB - Vectara. I tried it out with the massive army Welding manual. ChatGPT choked on that doc, couldnt answer a thing. Vectera it was like holy crap thats brilliant. PS In my project which was very similar to what you are trying to do here, with the same sort of issue, I also wound up breaking my table into 3 tables and using each for the kb. I broke them up like this: name, email then name, background then name, phone. For some reason I found BP to go full on acid trip with tables. Even when I tried to use the get record card instead of the KB it robo-tripped balls.
l
Thank you @numerous-secretary-37683 for your inputs, I am will be trying them today
n
good luck!
2 Views