Protocol Workflow Extraction Tool

Langchain tools that execute zero-shot extraction over a local database of full text papers previously imported into our database.

source

BaseProtocolExtractionTool

 BaseProtocolExtractionTool
                             (db:alhazen.utils.ceifns_db.Ceifns_Literature
                             Db, llm:Optional[langchain_core.language_mode
                             ls.chat_models.BaseChatModel]=None, slm:Optio
                             nal[langchain_core.language_models.chat_model
                             s.BaseChatModel]=None,
                             name:str='protocol_workflow_extraction',
                             description:str='Runs a specified protocol
                             extraction pipeline over a research paper
                             that has been loaded in the local literature
                             database.', args_schema:Optional[Type[pydanti
                             c.v1.main.BaseModel]]=None,
                             return_direct:bool=True, verbose:bool=False, 
                             callbacks:Union[List[langchain_core.callbacks
                             .base.BaseCallbackHandler],langchain_core.cal
                             lbacks.base.BaseCallbackManager,NoneType]=Non
                             e, callback_manager:Optional[langchain_core.c
                             allbacks.base.BaseCallbackManager]=None,
                             tags:Optional[List[str]]=None,
                             metadata:Optional[Dict[str,Any]]=None, handle
                             _tool_error:Union[bool,str,Callable[[langchai
                             n_core.tools.ToolException],str],NoneType]=Fa
                             lse, handle_validation_error:Union[bool,str,C
                             allable[[pydantic.v1.error_wrappers.Validatio
                             nError],str],NoneType]=False)

Runs a specified protocol extraction pipeline over a research paper that has been loaded in the local literature database.


source

ProtocolExtractionToolSchema

 ProtocolExtractionToolSchema (paper_id:str)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.


source

ProcotolDiagramExtractionTool

 ProcotolDiagramExtractionTool
                                (db:alhazen.utils.ceifns_db.Ceifns_Literat
                                ureDb, llm:Optional[langchain_core.languag
                                e_models.chat_models.BaseChatModel]=None, 
                                slm:Optional[langchain_core.language_model
                                s.chat_models.BaseChatModel]=None,
                                name:str='protocol_diagram_extraction',
                                description:str='Extracts a mermaid
                                diagram of the protocol from a paper.', ar
                                gs_schema:Optional[Type[pydantic.v1.main.B
                                aseModel]]=None, return_direct:bool=True,
                                verbose:bool=False, callbacks:Union[List[l
                                angchain_core.callbacks.base.BaseCallbackH
                                andler],langchain_core.callbacks.base.Base
                                CallbackManager,NoneType]=None, callback_m
                                anager:Optional[langchain_core.callbacks.b
                                ase.BaseCallbackManager]=None,
                                tags:Optional[List[str]]=None,
                                metadata:Optional[Dict[str,Any]]=None, han
                                dle_tool_error:Union[bool,str,Callable[[la
                                ngchain_core.tools.ToolException],str],Non
                                eType]=False, handle_validation_error:Unio
                                n[bool,str,Callable[[pydantic.v1.error_wra
                                ppers.ValidationError],str],NoneType]=Fals
                                e)

Extracts a mermaid diagram of the protocol from a paper.


source

ProcotolEntitiesExtractionTool

 ProcotolEntitiesExtractionTool
                                 (db:alhazen.utils.ceifns_db.Ceifns_Litera
                                 tureDb, llm:Optional[langchain_core.langu
                                 age_models.chat_models.BaseChatModel]=Non
                                 e, slm:Optional[langchain_core.language_m
                                 odels.chat_models.BaseChatModel]=None,
                                 name:str='protocol_entities_extraction',
                                 description:str='Extracts all entities
                                 used in a protocol.', args_schema:Optiona
                                 l[Type[pydantic.v1.main.BaseModel]]=None,
                                 return_direct:bool=True,
                                 verbose:bool=False, callbacks:Union[List[
                                 langchain_core.callbacks.base.BaseCallbac
                                 kHandler],langchain_core.callbacks.base.B
                                 aseCallbackManager,NoneType]=None, callba
                                 ck_manager:Optional[langchain_core.callba
                                 cks.base.BaseCallbackManager]=None,
                                 tags:Optional[List[str]]=None,
                                 metadata:Optional[Dict[str,Any]]=None, ha
                                 ndle_tool_error:Union[bool,str,Callable[[
                                 langchain_core.tools.ToolException],str],
                                 NoneType]=False, handle_validation_error:
                                 Union[bool,str,Callable[[pydantic.v1.erro
                                 r_wrappers.ValidationError],str],NoneType
                                 ]=False)

Extracts all entities used in a protocol.


source

ProcotolProcessesExtractionTool

 ProcotolProcessesExtractionTool
                                  (db:alhazen.utils.ceifns_db.Ceifns_Liter
                                  atureDb, llm:Optional[langchain_core.lan
                                  guage_models.chat_models.BaseChatModel]=
                                  None, slm:Optional[langchain_core.langua
                                  ge_models.chat_models.BaseChatModel]=Non
                                  e, name:str='protocol_processes_extracti
                                  on', description:str='Extracts all
                                  processes used in a protocol.', args_sch
                                  ema:Optional[Type[pydantic.v1.main.BaseM
                                  odel]]=None, return_direct:bool=True,
                                  verbose:bool=False, callbacks:Union[List
                                  [langchain_core.callbacks.base.BaseCallb
                                  ackHandler],langchain_core.callbacks.bas
                                  e.BaseCallbackManager,NoneType]=None, ca
                                  llback_manager:Optional[langchain_core.c
                                  allbacks.base.BaseCallbackManager]=None,
                                  tags:Optional[List[str]]=None,
                                  metadata:Optional[Dict[str,Any]]=None, h
                                  andle_tool_error:Union[bool,str,Callable
                                  [[langchain_core.tools.ToolException],st
                                  r],NoneType]=False, handle_validation_er
                                  ror:Union[bool,str,Callable[[pydantic.v1
                                  .error_wrappers.ValidationError],str],No
                                  neType]=False)

Extracts all processes used in a protocol.