We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95ca472 + 89bd095 commit 7d9d645Copy full SHA for 7d9d645
services/aspect_processor.py
@@ -37,6 +37,13 @@ async def process_single_aspect(
37
formated_initial_rag_prompt, segment_ids=[str(segment_id) for segment_id in segment_ids]
38
)
39
40
+ if len(rag_prompt) < 100:
41
+ # Returns if nothing is found: Sorry, I'm not able to provide an answer to that question.[no-context]
42
+ logger.error(f"RAG prompt is too short for aspect '{tentative_aspect_topic}'")
43
+ raise ValueError(
44
+ f"RAG prompt is too short for aspect '{tentative_aspect_topic}'. \nRAG prompt: {rag_prompt}"
45
+ )
46
+
47
# Prepare RAG messages
48
rag_messages = [
49
{"role": "system", "content": rag_system_prompt},
0 commit comments