diff --git a/evaluations/evaluator.py b/evaluations/evaluator.py index e07ab76..94a2405 100644 --- a/evaluations/evaluator.py +++ b/evaluations/evaluator.py @@ -35,5 +35,5 @@ def langsmith_app(inputs): langsmith_app, # Your AI system data=dataset_name, # The data to predict and grade over evaluators=[evaluator], # The evaluators to score the results - experiment_prefix="metadata-chatbot-0.0.49", # A prefix for your experiment names to easily identify them + experiment_prefix="metadata-chatbot-0.0.51", # A prefix for your experiment names to easily identify them ) \ No newline at end of file diff --git a/src/metadata_chatbot/agents/async_workflow.py b/src/metadata_chatbot/agents/async_workflow.py index 003a957..fefdd03 100644 --- a/src/metadata_chatbot/agents/async_workflow.py +++ b/src/metadata_chatbot/agents/async_workflow.py @@ -4,7 +4,7 @@ from langchain_core.documents import Document from langgraph.graph import END, StateGraph, START from metadata_chatbot.agents.docdb_retriever import DocDBRetriever -from metadata_chatbot.agents.agentic_graph import datasource_router, query_retriever, query_grader, filter_generation_chain, doc_grader, rag_chain, db_rag_chain +from metadata_chatbot.agents.agentic_graph import datasource_router, query_retriever, filter_generation_chain, doc_grader, rag_chain, db_rag_chain logging.basicConfig(filename='async_workflow.log', level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', filemode="w") @@ -80,17 +80,17 @@ async def filter_generator_async(state): query = state["query"] - result = await query_grader.ainvoke({"query": query}) - query_grade = result.binary_score - logging.info(f"Database needs to be further filtered: {query_grade}") + # result = await query_grader.ainvoke({"query": query}) + # query_grade = result.binary_score + # logging.info(f"Database needs to be further filtered: {query_grade}") - if query_grade == "yes": - result = await filter_generation_chain.ainvoke({"query": query}) - filter = result.filter_query - logging.info(f"Database will be filtered using: {filter}") - return {"filter": filter, "query": query} - else: - return {"filter": None, "query": query} + result = await filter_generation_chain.ainvoke({"query": query}) + filter = result.filter_query + + logging.info(f"Database will be filtered using: {filter}") + return {"filter": filter, "query": query} + # else: + # return {"filter": None, "query": query} async def retrieve_async(state): """