Touchup NoOp (#1856)

This commit is contained in:
Yuhong Sun 2024-07-18 08:44:27 -07:00 committed by GitHub
parent e4984153c0
commit f00b3d76b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
"""add search doc relevance details
Revision ID: 05c07bf07c00
Revises: 3a7802814195
Revises: b896bbd0d5a7
Create Date: 2024-07-10 17:48:15.886653
"""

View File

@ -11,8 +11,8 @@ from alembic import op
# revision identifiers, used by Alembic.
revision = "b896bbd0d5a7"
down_revision = "44f856ae2a4a"
branch_labels = None
depends_on = None
branch_labels: None = None
depends_on: None = None
def upgrade() -> None:

View File

@ -189,7 +189,7 @@ def stream_answer_objects(
chunks_below=query_req.chunks_below,
full_doc=query_req.full_doc,
bypass_acl=bypass_acl,
evaluate_response=query_req.evaluate_response,
llm_doc_eval=query_req.llm_doc_eval,
)
answer_config = AnswerStyleConfig(

View File

@ -37,7 +37,7 @@ class DirectQARequest(ChunkContext):
# This is to toggle agentic evaluation:
# 1. Evaluates whether each response is relevant or not
# 2. Provides a summary of the document's relevance in the resulsts
evaluate_response: bool = False
llm_doc_eval: bool = False
# If True, skips generative an AI response to the search query
skip_gen_ai_answer_generation: bool = False

View File

@ -39,7 +39,7 @@ SEARCH_RESPONSE_SUMMARY_ID = "search_response_summary"
SEARCH_DOC_CONTENT_ID = "search_doc_content"
SECTION_RELEVANCE_LIST_ID = "section_relevance_list"
FINAL_CONTEXT_DOCUMENTS = "final_context_documents"
SEARCH_EVALUATION_ID = "evaluate_response"
SEARCH_EVALUATION_ID = "llm_doc_eval"
class SearchResponseSummary(BaseModel):
@ -85,7 +85,7 @@ class SearchTool(Tool):
chunks_below: int = 0,
full_doc: bool = False,
bypass_acl: bool = False,
evaluate_response: bool = False,
llm_doc_eval: bool = False,
) -> None:
self.user = user
self.persona = persona
@ -102,7 +102,7 @@ class SearchTool(Tool):
self.full_doc = full_doc
self.bypass_acl = bypass_acl
self.db_session = db_session
self.evaluate_response = evaluate_response
self.llm_doc_eval = llm_doc_eval
@property
def name(self) -> str:
@ -295,7 +295,7 @@ class SearchTool(Tool):
yield ToolResponse(id=FINAL_CONTEXT_DOCUMENTS, response=llm_docs)
if self.evaluate_response and not DISABLE_AGENTIC_SEARCH:
if self.llm_doc_eval and not DISABLE_AGENTIC_SEARCH:
yield ToolResponse(
id=SEARCH_EVALUATION_ID, response=search_pipeline.relevance_summaries
)

View File

@ -61,7 +61,7 @@ export const searchRequestStreamed = async ({
filters: filters,
enable_auto_detect_filters: false,
},
evaluate_response: true,
llm_doc_eval: true,
skip_gen_ai_answer_generation: true,
}),
headers: {