i am looking to do dynamic q&a with a table. i.e the answers lie in the table but the question strings can be posed differently by a hypothetical user. wondering if vectara supports this. i tried to convert a csv into pdf, but didnt work well. (as was expected i guess)
Hi there @skckvectara and welcome to the community!
The way to deal with this is you’d want each question/answer pair to be a separate “document” in Vectara terms. So you can have e.g. the title of the document be “What’s the largest planet in the solar system” with then an answer in the text of “Jupiter is the largest planet. It’s a gas giant that …”
You can do this by programmatically parsing the CSV document and going row-by-row
Hi Shane,
Thanks for the response.
So correct me if I am wrong - I need to have a title column that contains a question, and another column that contains the answer ? Or do I need them to go row by row, i.e. question row then an answer row below it ?
There are a couple different ways to deal with this depending on how your data is formatted. The way we would typically format a Q&A scenario is that the question goes in the title and then answer goes in the text. The API provides for a separate title
and text
field that you can use for this in this Q&A use case. This then would allow you to match question-to-question in addition to question-to-answer, for example.
If you have a sample of what your data looks like though, and what you’re hoping to achieve with your end users, it’d be great if you’d post a sample!