Find answers from the community

Home
Members
Romanito
R
Romanito
Offline, last seen 6 months ago
Joined September 25, 2024
R
Romanito
·

Database

Hi, I am an absolute newbie to using custom data over chatgpt. The company I work for runs a network of bookstores. It offers about 100 thousand different books for sale. Customers have their own accounts that they use to buy books, so we have a record of who bought what. And now we thought we'd make a chatbot on the site that would recommend books to buy based on his history.
The data is stored in a postgres database - we have a table called "book" which contains information about the book such as title, author, genre etc. Then we have another table "order" which stores the purchases. The bindings are resolved via the foreign keys, so only the book ID is stored in "order.book" and only the customer ID is stored in "order.customer". My question is - how can we most efficiently teach llama-index to our data? Is it better to learn llama-index via these foreign keys, or is it better to copy all the data? Is LLM even suitable for these strong entity relationships and can it handle them properly? Then what is the best data structure? Generate it in some json file? Or in the form of a text file where everything would be described in the style of "The book with id 1 is called AAA and it was written by BBBB"? Or use a direct connector to the database?
3 comments
L
R
Hello, I would like to use AI at our helpdesk. A customer submits a ticket and the AI would propose a response to their request. My idea is to expand GPT with data from our resolved tickets (there are more than 10,000 of them).

  1. Is this even feasible?
  2. If yes, is Llamaindex suitable for this? If not, what should I look at?
  3. If yes, what data should I store? A ticket has a title, content written by the customer, and then there are comments from both support staff and the customer (when something needs to be resolved further). It makes sense to me to store all these things. Does it make sense to note whether the comment is from the customer or from support staff?
  4. In what format should I store the data? I have access to the helpdesk database, so it's no problem to read and export it in anything. It should probably be clear to which ticket each comment belongs. So it makes sense to me to store it in some structured format. Is that correct? Is a json structure more suitable than exporting it to txt?
Thanks for suggestions 🙂
2 comments
R
T