mikeizbicki / cmc-csci181-languages

3 stars 5 forks source link

FTS Integration with RAG Issue #52

Open maxplush opened 5 days ago

maxplush commented 5 days ago

Prof Izbiki we discussed before in OH how I should return the best results by using the SQLite FTS feature. I implemented this in my code but now I am having some issues searching. I reasserted online that FTS uses tokenization to break down text into searchable terms. Also that FTS struggles with multiword questions. As now the search performs poorly for a question like "What happened to Alan's elbow". But if I just searched "elbow" I will get a relevant response.

Ask a question about the memoir (or type 'exit' to quit): where was alan born

Response:
 I couldn't find relevant information in the memoir.

Ask a question about the memoir (or type 'exit' to quit): born

Response:
 According to the memoir, Alan Plush, the author, was born on February 22, 1960.
mikeizbicki commented 4 days ago

How we solved this in our RAG system is that we:

  1. first used an LLM to extract keywords from the question;

  2. we used those keywords to perform the search.

It seems like you're missing step 1.