CdC-SI / eak-copilot

The official repository of the EAK-Copilot project as part of the Innovation Fellowship 2024.
https://cdc-si.github.io/eak-copilot/
GNU General Public License v3.0
3 stars 0 forks source link

bad RAG chat answer when no docs retrieved #245

Open K-Schubert opened 1 week ago

K-Schubert commented 1 week ago

Description

When semantic_similarity_match() doesn't return any context docs (eg. the db is empty), then RAG doesn't work (/rag/process) and a json string is displayed as chat answer in frontend.

Image

Suggested fix

Instead, RAG should answer that no context docs have been found. Maybe also add a warning if db is empty.