Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions backend/rag_solution/services/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,18 @@ async def _search_with_pipeline(self, search_input: SearchInput) -> SearchOutput
# Convert cot_output from ChainOfThoughtOutput to dict if present
cot_output_dict = result_context.cot_output.model_dump() if result_context.cot_output else None

# Debug: Log document_metadata before creating SearchOutput
logger.info(
"📊 SEARCH_SERVICE: result_context.document_metadata has %d items", len(result_context.document_metadata)
)
if result_context.document_metadata:
logger.info(
"📊 SEARCH_SERVICE: First doc_metadata = %s",
result_context.document_metadata[0].document_name
if hasattr(result_context.document_metadata[0], "document_name")
else "NO DOCUMENT_NAME",
)

search_output = SearchOutput(
answer=cleaned_answer,
documents=result_context.document_metadata,
Expand Down
Loading