Open K-Schubert opened 2 weeks ago
Description
When no RAG data is indexed, retrieval fails with an "IndexError: list index out of range" in retrieve() method of /app/rag/app/rag_processor.py:
documents = [dict(row) for row in rows][0] will be an empty list.
Suggested fix
Either ensure data is always indexed for RAG, or check for empty list before slicing first element of list.
Description
When no RAG data is indexed, retrieval fails with an "IndexError: list index out of range" in retrieve() method of /app/rag/app/rag_processor.py:
documents = [dict(row) for row in rows][0] will be an empty list.
Suggested fix
Either ensure data is always indexed for RAG, or check for empty list before slicing first element of list.