mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-07 19:38:19 +02:00
Touchup NoOp (#1856)
This commit is contained in:
parent
e4984153c0
commit
f00b3d76b3
@ -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
|
||||
|
||||
"""
|
||||
|
@ -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:
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user