Find answers from the community

m
matto
Offline, last seen 6 months ago
Joined September 25, 2024
hey guys, I was wondering if anyone has recommendations to use LLamaIndex optimally to perform the following task:

  • Make a general query to a forum like reddit
    • ex: “Whats the best way to lose weight?”
  • For post 1:
    • Collect all answers to query (along with “upvote” statistics)
    • Combine similar answers and add up upvotes
      • ex API response: { text: ‘Go on a diet’, upvotes: 10 }, { text: ‘Reduce caloric intake’, upvotes: 2 }, { text: ‘Exercise more’, upvotes: 4 }
      • The similar results get combined and the algorithm keeps an updated count of the upvotes
        • ex: FINAL_RESULTS = { ‘Eat a healthy diet’: 12 }, { ‘Exercise’: 4 }
  • For post 2…n:
    • Repeat, adding to the total FINAL_RESULTS set

The challenge I've had is to return accurate counts for FINAL_RESULTS and to have the program successfully merge like answers ("Go on a diet" and "Reduce caloric intake" should be merged into something like "Eat a healthy diet" above.)
27 comments
L
m
b