Methods Metadata Extraction Tool

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

source

BaseMetadataExtractionTool

 BaseMetadataExtractionTool
                             (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='metadata_extraction',
                             description:str='Runs a specified metadata
                             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,
                             examples:dict={})

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


source

MetadataExtractionToolSchema

 MetadataExtractionToolSchema (paper_id:str, extraction_type:str,
                               run_label:Optional[str]=None)

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

MetadataExtraction_EverythingEverywhere_Tool

 MetadataExtraction_EverythingEverywhere_Tool
                                               (db:alhazen.utils.ceifns_db
                                               .Ceifns_LiteratureDb, llm:O
                                               ptional[langchain_core.lang
                                               uage_models.chat_models.Bas
                                               eChatModel]=None, slm:Optio
                                               nal[langchain_core.language
                                               _models.chat_models.BaseCha
                                               tModel]=None, name:str='met
                                               adata_extraction',
                                               description:str='Runs a
                                               specified metadata
                                               extraction pipeline over a
                                               research paper that has
                                               been loaded in the local
                                               literature database.', args
                                               _schema:Optional[Type[pydan
                                               tic.v1.main.BaseModel]]=Non
                                               e, return_direct:bool=True,
                                               verbose:bool=False, callbac
                                               ks:Union[List[langchain_cor
                                               e.callbacks.base.BaseCallba
                                               ckHandler],langchain_core.c
                                               allbacks.base.BaseCallbackM
                                               anager,NoneType]=None, call
                                               back_manager:Optional[langc
                                               hain_core.callbacks.base.Ba
                                               seCallbackManager]=None, ta
                                               gs:Optional[List[str]]=None
                                               , metadata:Optional[Dict[st
                                               r,Any]]=None, handle_tool_e
                                               rror:Union[bool,str,Callabl
                                               e[[langchain_core.tools.Too
                                               lException],str],NoneType]=
                                               False, handle_validation_er
                                               ror:Union[bool,str,Callable
                                               [[pydantic.v1.error_wrapper
                                               s.ValidationError],str],Non
                                               eType]=False,
                                               examples:dict={})

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


source

MetadataExtraction_MethodsSectionOnly_Tool

 MetadataExtraction_MethodsSectionOnly_Tool
                                             (db:alhazen.utils.ceifns_db.C
                                             eifns_LiteratureDb, llm:Optio
                                             nal[langchain_core.language_m
                                             odels.chat_models.BaseChatMod
                                             el]=None, slm:Optional[langch
                                             ain_core.language_models.chat
                                             _models.BaseChatModel]=None, 
                                             name:str='metadata_extraction
                                             ', description:str='Runs a
                                             specified metadata extraction
                                             pipeline over a research
                                             paper that has been loaded in
                                             the local literature
                                             database.', args_schema:Optio
                                             nal[Type[pydantic.v1.main.Bas
                                             eModel]]=None,
                                             return_direct:bool=True,
                                             verbose:bool=False, callbacks
                                             :Union[List[langchain_core.ca
                                             llbacks.base.BaseCallbackHand
                                             ler],langchain_core.callbacks
                                             .base.BaseCallbackManager,Non
                                             eType]=None, callback_manager
                                             :Optional[langchain_core.call
                                             backs.base.BaseCallbackManage
                                             r]=None, tags:Optional[List[s
                                             tr]]=None, metadata:Optional[
                                             Dict[str,Any]]=None, handle_t
                                             ool_error:Union[bool,str,Call
                                             able[[langchain_core.tools.To
                                             olException],str],NoneType]=F
                                             alse, handle_validation_error
                                             :Union[bool,str,Callable[[pyd
                                             antic.v1.error_wrappers.Valid
                                             ationError],str],NoneType]=Fa
                                             lse, examples:dict={})

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


source

MetadataExtraction_RAGOnSections_Tool

 MetadataExtraction_RAGOnSections_Tool
                                        (db:alhazen.utils.ceifns_db.Ceifns
                                        _LiteratureDb, llm:Optional[langch
                                        ain_core.language_models.chat_mode
                                        ls.BaseChatModel]=None, slm:Option
                                        al[langchain_core.language_models.
                                        chat_models.BaseChatModel]=None,
                                        name:str='metadata_extraction',
                                        description:str='Runs a specified
                                        metadata extraction pipeline over
                                        a research paper that has been
                                        loaded in the local literature
                                        database.', args_schema:Optional[T
                                        ype[pydantic.v1.main.BaseModel]]=N
                                        one, return_direct:bool=True,
                                        verbose:bool=False, callbacks:Unio
                                        n[List[langchain_core.callbacks.ba
                                        se.BaseCallbackHandler],langchain_
                                        core.callbacks.base.BaseCallbackMa
                                        nager,NoneType]=None, callback_man
                                        ager:Optional[langchain_core.callb
                                        acks.base.BaseCallbackManager]=Non
                                        e, tags:Optional[List[str]]=None, 
                                        metadata:Optional[Dict[str,Any]]=N
                                        one, handle_tool_error:Union[bool,
                                        str,Callable[[langchain_core.tools
                                        .ToolException],str],NoneType]=Fal
                                        se, handle_validation_error:Union[
                                        bool,str,Callable[[pydantic.v1.err
                                        or_wrappers.ValidationError],str],
                                        NoneType]=False, examples:dict={})

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


source

SimpleExtractionWithRAGTool

 SimpleExtractionWithRAGTool
                              (db:alhazen.utils.ceifns_db.Ceifns_Literatur
                              eDb, llm:Optional[langchain_core.language_mo
                              dels.chat_models.BaseChatModel]=None, slm:Op
                              tional[langchain_core.language_models.chat_m
                              odels.BaseChatModel]=None,
                              name:str='simple_extraction',
                              description:str='Performs simple information
                              extraction from a specified research paper
                              from the database.', args_schema:Optional[Ty
                              pe[pydantic.v1.main.BaseModel]]=None,
                              return_direct:bool=False,
                              verbose:bool=False, callbacks:Union[List[lan
                              gchain_core.callbacks.base.BaseCallbackHandl
                              er],langchain_core.callbacks.base.BaseCallba
                              ckManager,NoneType]=None, callback_manager:O
                              ptional[langchain_core.callbacks.base.BaseCa
                              llbackManager]=None,
                              tags:Optional[List[str]]=None,
                              metadata:Optional[Dict[str,Any]]=None, handl
                              e_tool_error:Union[bool,str,Callable[[langch
                              ain_core.tools.ToolException],str],NoneType]
                              =False, handle_validation_error:Union[bool,s
                              tr,Callable[[pydantic.v1.error_wrappers.Vali
                              dationError],str],NoneType]=False)

Performs simple information extraction from a specified research paper from the database.


source

SimpleExtractionWithRAGToolSchema

 SimpleExtractionWithRAGToolSchema (paper_id:str, variable_name:str,
                                    question: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.