mlim-usfca / PersonalKnowledge

https://personal-knowledge.vercel.app
0 stars 0 forks source link

[ISSUE] Table Relations among `link`, `categories` and `document_sections` #40

Closed inhwaS closed 6 months ago

inhwaS commented 6 months ago
Screenshot 2024-04-18 at 10 51 20 AM

Hello, I just tested with dev_2.0 and rag-chat branches, and I think we need to update the table relations.

When the link is saved,

  1. links table creates a row with link, content
  2. Cleaned/scrapped data is saved into link.content
  3. embed() will create document_sections table with split chunks
  4. embeddings are saved into document_sections.embedding

When the category is created,

  1. Saved into categories table with category_name, user_id
  2. Also saved into category_link_relation with link(website), category

As you can see from the picture, there is no relationship between link and documents right now. To fix this issue, in my opinion, we need to update link.purpose into link.category so we can have a relationship. However, if you have any other suggestions, please feel free to write them down here.