Agentic Rag Factory Safety Assistant With Langgraph Langchain Mongodb
agentsartificial-intelligencellmsmongodb-genai-showcasenotebooksgenerative-airag
alph-notebooks/mongodb-genai-showcase / agentic_rag_factory_safety_assistant_with_langgraph_langchain_mongodb.ipynb
Export
Agentic RAG: Factory Safety Assistant
[ ]
[2]
[3]
Enter your OpenAI API key: ··········
[5]
[15]
Repo card metadata block was not found. Setting CardData to empty. WARNING:huggingface_hub.repocard:Repo card metadata block was not found. Setting CardData to empty.
[16]
<class 'pandas.core.frame.DataFrame'> RangeIndex: 100 entries, 0 to 99 Data columns (total 9 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 incidentId 100 non-null object 1 dateTime 100 non-null datetime64[ns] 2 location 100 non-null object 3 type 100 non-null object 4 description 100 non-null object 5 severityLevel 100 non-null object 6 relatedProcedures 100 non-null object 7 immediateActions 100 non-null object 8 rootCauses 100 non-null object dtypes: datetime64[ns](1), object(8) memory usage: 7.2+ KB
[13]
[17]
<class 'pandas.core.frame.DataFrame'> RangeIndex: 50 entries, 0 to 49 Data columns (total 6 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 procedureId 50 non-null object 1 title 50 non-null object 2 description 50 non-null object 3 category 50 non-null object 4 steps 50 non-null object 5 lastUpdated 50 non-null object dtypes: object(6) memory usage: 2.5+ KB
[18]
[19]
[20]
[21]
[22]
Type: Equipment Failure Description: Equipment Failure occurred at Factory B. Immediateactions: Contained spill and alerted hazardous material team Rootcauses: [{'category': 'procedural error', 'description': 'Inadequate safety checks', 'preventionRecommendations': 'Review and update safety procedures'}]
[23]
Title: Confined Space Communication Protocol Description: Guidelines for confined space communication protocol Category: confined space Steps: [{'description': 'Use appropriate PPE', 'stepNumber': 1}, {'description': 'Assess the confined space for hazards', 'stepNumber': 2}, {'description': 'Obtain necessary permits', 'stepNumber': 3}, {'description': 'Monitor the atmosphere', 'stepNumber': 4}]
[24]
[25]
Generating embeddings and duplicating rows: 100%|██████████| 100/100 [00:22<00:00, 4.52it/s]
[26]
Generating embeddings and duplicating rows: 100%|██████████| 50/50 [00:09<00:00, 5.48it/s]
[27]
[28]
[29]
Enter your MongoDB URI: ··········
[30]
Connection to MongoDB successful
[31]
[32]
[33]
Error creating new vector search index 'vector_index_with_filter': Duplicate Index, full error: {'ok': 0.0, 'errmsg': 'Duplicate Index', 'code': 68, 'codeName': 'IndexAlreadyExists', '$clusterTime': {'clusterTime': Timestamp(1724932771, 48), 'signature': {'hash': b'\xf1\xee\x04\xa0w:\xb7{)\xf6\xbc\xc2\x103i\xebcv\xaet', 'keyId': 7353740577831124994}}, 'operationTime': Timestamp(1724932771, 48)}
Error creating new vector search index 'vector_index_with_filter': Duplicate Index, full error: {'ok': 0.0, 'errmsg': 'Duplicate Index', 'code': 68, 'codeName': 'IndexAlreadyExists', '$clusterTime': {'clusterTime': Timestamp(1724932771, 48), 'signature': {'hash': b'\xf1\xee\x04\xa0w:\xb7{)\xf6\xbc\xc2\x103i\xebcv\xaet', 'keyId': 7353740577831124994}}, 'operationTime': Timestamp(1724932771, 48)}
[34]
DeleteResult({'n': 100, 'electionId': ObjectId('7fffffff0000000000000032'), 'opTime': {'ts': Timestamp(1724932786, 150), 't': 50}, 'ok': 1.0, '$clusterTime': {'clusterTime': Timestamp(1724932786, 150), 'signature': {'hash': b'\xa1^\xb7L\xba\xe1vp\xedVF~\xb5\xbb\xde\xb6\xa2\xe3\xe6-', 'keyId': 7353740577831124994}}, 'operationTime': Timestamp(1724932786, 150)}, acknowledged=True) [35]
[36]
[37]
Inserted batch 1: 50 documents Safety procedures data ingestion completed. Total documents inserted: 50 Inserted batch 1: 100 documents Accident reports data ingestion completed. Total documents inserted: 100 Insertion Summary: Safety Procedures inserted: 50 Accident Reports inserted: 100
[38]
[39]
[40]
Query: Get me a saftey procedure related to helmet incidents
Continue to answer the query by using the Search Results:
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Similarity Score | Combined Information |
+====================+=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+
| 0.822171 | Title: Scaffold Safety Procedure Description: Guidelines for scaffold safety procedure Category: working at heights Steps: [{'description': 'Ensure fall protection gear is worn', 'stepNumber': 1}, {'description': 'Maintain three points of contact', 'stepNumber': 2}, {'description': 'Identify potential hazards', 'stepNumber': 3}, {'description': 'Check equipment and anchor points', 'stepNumber': 4}] |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 0.821077 | Title: Scaffold Safety Procedure Description: Guidelines for scaffold safety procedure Category: working at heights Steps: [{'description': 'Check equipment and anchor points', 'stepNumber': 1}, {'description': 'Identify potential hazards', 'stepNumber': 2}, {'description': 'Ensure fall protection gear is worn', 'stepNumber': 3}, {'description': 'Follow emergency rescue plan', 'stepNumber': 4}, {'description': 'Maintain three points of contact', 'stepNumber': 5}] |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 0.815926 | Title: Scaffold Safety Procedure Description: Guidelines for scaffold safety procedure Category: working at heights Steps: [{'description': 'Ensure fall protection gear is worn', 'stepNumber': 1}, {'description': 'Check equipment and anchor points', 'stepNumber': 2}, {'description': 'Identify potential hazards', 'stepNumber': 3}] |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 0.804019 | Title: Ladder Safety Procedure Description: Guidelines for ladder safety procedure Category: working at heights Steps: [{'description': 'Ensure fall protection gear is worn', 'stepNumber': 1}, {'description': 'Follow emergency rescue plan', 'stepNumber': 2}, {'description': 'Maintain three points of contact', 'stepNumber': 3}, {'description': 'Check equipment and anchor points', 'stepNumber': 4}] |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 0.803579 | Title: Ladder Safety Procedure Description: Guidelines for ladder safety procedure Category: working at heights Steps: [{'description': 'Identify potential hazards', 'stepNumber': 1}, {'description': 'Follow emergency rescue plan', 'stepNumber': 2}, {'description': 'Maintain three points of contact', 'stepNumber': 3}, {'description': 'Check equipment and anchor points', 'stepNumber': 4}, {'description': 'Ensure fall protection gear is worn', 'stepNumber': 5}] |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[36]
[37]
Enter your Anthropic API key: ··········
[38]
Enter your Groq API key: ··········
[64]
[65]
Error creating search index: Duplicate Index, full error: {'ok': 0.0, 'errmsg': 'Duplicate Index', 'code': 68, 'codeName': 'IndexAlreadyExists', '$clusterTime': {'clusterTime': Timestamp(1724864038, 1), 'signature': {'hash': b'\x08\x19U\xbb\xe3Y\txs\xad?y\xd1"\x0b]\xa5\xb5*\x13', 'keyId': 7353740577831124994}}, 'operationTime': Timestamp(1724864038, 1)}
Search indexes for collection 'safety_procedures':
Index: vector_index_with_filter
Index: text_search_index
[66]
Error creating search index: Duplicate Index, full error: {'ok': 0.0, 'errmsg': 'Duplicate Index', 'code': 68, 'codeName': 'IndexAlreadyExists', '$clusterTime': {'clusterTime': Timestamp(1724864038, 1), 'signature': {'hash': b'\x08\x19U\xbb\xe3Y\txs\xad?y\xd1"\x0b]\xa5\xb5*\x13', 'keyId': 7353740577831124994}}, 'operationTime': Timestamp(1724864038, 1)}
Search indexes for collection 'accident_report':
Index: vector_index_with_filter
Index: text_search_index
[67]
[68]
[69]
| Rank | Procedure ID | Title | Category | Vector Score | Full-text Score | Total Score | |-------:|:---------------|:--------------------------------|:-------------------|---------------:|------------------:|--------------:| | 1 | HEIGHTS-020 | Scaffold Safety Procedure | working at heights | 0.01587 | 0.01538 | 0.03126 | | 2 | HEIGHTS-050 | Scaffold Safety Procedure | working at heights | 0.01639 | 0 | 0.01639 | | 3 | CONF-007 | Confined Space Rescue Procedure | confined space | 0 | 0.01639 | 0.01639 | | 4 | HEIGHTS-044 | Ladder Safety Procedure | working at heights | 0 | 0.01613 | 0.01613 | | 5 | HEIGHTS-002 | Scaffold Safety Procedure | working at heights | 0.01613 | 0 | 0.01613 |
[70]
[71]
[Document(metadata={'_id': '66cf513f36201a6c2ff0dcf6', 'procedureId': 'HEIGHTS-050', 'title': 'Scaffold Safety Procedure', 'category': 'working at heights', 'steps': [{'stepNumber': 1, 'description': 'Check equipment and anchor points'}, {'stepNumber': 2, 'description': 'Identify potential hazards'}, {'stepNumber': 3, 'description': 'Ensure fall protection gear is worn'}, {'stepNumber': 4, 'description': 'Follow emergency rescue plan'}, {'stepNumber': 5, 'description': 'Maintain three points of contact'}], 'lastUpdated': '2023-10-07T08:53:38.622518', 'combined_info': "Title: Scaffold Safety Procedure Description: Guidelines for scaffold safety procedure Category: working at heights Steps: [{'stepNumber': 1, 'description': 'Check equipment and anchor points'}, {'stepNumber': 2, 'description': 'Identify potential hazards'}, {'stepNumber': 3, 'description': 'Ensure fall protection gear is worn'}, {'stepNumber': 4, 'description': 'Follow emergency rescue plan'}, {'stepNumber': 5, 'description': 'Maintain three points of contact'}]", 'embedding': [0.010677263140678406, 0.0832085832953453, 0.1603911966085434, -0.0017732668202370405, -0.06754106283187866, 0.04863458871841431, -0.03703460097312927, -0.03906836360692978, 0.017952365800738335, 0.030104735866189003, -0.01694803684949875, -0.1532604694366455, 0.0070365737192332745, 0.022145435214042664, 0.004249563440680504, 0.001840745098888874, 0.0354025661945343, -0.006691336166113615, 0.003923156764358282, 0.045671820640563965, 0.03753676265478134, 0.04695234075188637, 0.03590473160147667, 0.09741982817649841, -0.09691766649484634, -0.013935052789747715, 0.13548386096954346, 0.017111239954829216, -0.036758407950401306, 0.019283099099993706, 0.07150816172361374, -0.05729692056775093, -0.0936535969376564, 0.11228388547897339, 0.11569859832525253, -0.02455582283437252, -0.048333290964365005, 0.029979195445775986, -0.06744063645601273, -0.04336186498403549, 0.13407780230045319, -0.016922928392887115, -0.020839808508753777, -0.01899435557425022, 0.0590042769908905, -0.06387526541948318, 0.04268394410610199, 0.007758434861898422, -0.0170610249042511, 0.07371768355369568, 0.0692986398935318, -0.04624931141734123, 0.05654367431998253, 0.08652286976575851, -0.07190989702939987, 0.006380622275173664, 0.015491761267185211, -0.04850905016064644, -0.012629426084458828, 0.06965015828609467, 0.02509564906358719, -0.08622156828641891, -0.11188215017318726, 0.049965325742959976, 0.010576830245554447, -0.051346275955438614, -0.03783806040883064, 0.009302589111030102, 0.06728998571634293, -0.03334369510412216, 0.08818001300096512, -0.002096534939482808, 0.11660249531269073, -0.07457136362791061, -0.09616442024707794, -0.12242759764194489, -0.07939213514328003, 0.08958607167005539, -0.02581123262643814, -0.04275926947593689, 0.004560277331620455, -0.05019129812717438, -0.05584064498543739, 0.009993065148591995, -0.09194623678922653, -0.019082235172390938, -0.05508739873766899, -0.05343025550246239, -0.13046222925186157, -0.02230863831937313, -0.08948563784360886, 0.013922498561441898, -0.06387526541948318, 0.01534111239016056, 0.07401898503303528, 0.009516009129583836, 0.0570458360016346, 0.06121379882097244, -0.04956359416246414, -0.0063931760378181934, 0.14271502196788788, -0.034624211490154266, -0.07296443730592728, -0.08361031860113144, -0.00300827668979764, -0.0340467244386673, 0.004258979111909866, 0.10856787115335464, -0.029878761619329453, -0.01751297153532505, -0.09144407510757446, 0.0056179603561758995, -0.08883282542228699, 0.14894185960292816, 0.09767091274261475, 0.025497380644083023, 0.09043974429368973, -0.044190436601638794, 0.04100169613957405, 0.015705181285738945, -0.06804323196411133, -0.009302589111030102, 0.013596092350780964, -0.06819388270378113, -0.008888304233551025, -0.019885696470737457, 0.06297137588262558, -0.007118175737559795, 0.016044141724705696, -0.07909084111452103, -0.04617398604750633, -0.0824553370475769, 0.0359298400580883, -0.1511513888835907, 0.034774862229824066, 0.007080513052642345, -0.07698175311088562, 0.019772710278630257, -0.06362418830394745, 0.10118605941534042, 0.0229237899184227, 0.0571964867413044, -0.013960161246359348, 0.04770558699965477, -0.06844495981931686, -0.04883545637130737, -0.005373155698180199, 0.12192543596029282, -0.012598040513694286, 0.06703890115022659, -0.05684497207403183, 0.0047328961081802845, 0.020990457385778427, 0.07180946320295334, 0.028347160667181015, -0.16390635073184967, -0.09812285751104355, -0.00011239844025112689, 0.0794423520565033, 0.04363805800676346, -0.03311771899461746, -0.048031993210315704, 0.01595626398921013, 0.02714196778833866, 0.006239388603717089, -0.037059709429740906, -0.057849299162626266, -0.06096271798014641, -0.011568604968488216, 0.0169856995344162, 0.011907565407454967, -0.07241205871105194, 0.0462995283305645, -0.03422247990965843, 0.018328988924622536, -0.020626388490200043, -0.061816394329071045, 0.0947081446647644, -0.006653673946857452, 0.07718261331319809, 0.013169252313673496, 0.00925237312912941, -0.06628565490245819, 0.014186134561896324, -0.03193763270974159, 0.029075298458337784, 0.02009911648929119, 0.012233971618115902, -0.013257130980491638, 0.07000166922807693, -0.02957746386528015, -0.04062507301568985, 0.021982232108712196, -0.05684497207403183, -0.02513331174850464, -0.0285229180008173, -0.04356273263692856, -0.012422283180058002, 0.06924842298030853, 0.02837226912379265, -0.03635667636990547, -0.16571414470672607, 0.07798607647418976, 0.013759295456111431, -0.033594775944948196, 0.07085534930229187, -0.1664171665906906, 0.047228530049324036, 0.037561871111392975, -0.1944379210472107, 0.06407613307237625, 0.035126376897096634, 0.08576962351799011, 0.1183098554611206, -0.0824553370475769, 0.03941987827420235, -0.032188717275857925, -0.0012483485043048859, -0.0035685033071786165, 0.012579210102558136, -0.03414715453982353, 0.03346923366189003, 0.06503024697303772, 0.03444845601916313, -0.0032703434117138386, 0.06136444956064224, 0.10058346390724182, -0.022107772529125214, 0.10555488616228104, -0.015906047075986862, -0.08888304233551025, -0.04436619579792023, 0.046123769134283066, 0.05338003858923912, -0.00616720225661993, 0.03598005324602127, 0.046475283801555634, -0.017086131498217583, -0.04499389976263046, -0.035503000020980835, 0.06030990555882454, 0.015529423952102661, -0.041328102350234985, 0.02912551537156105, 0.07808651030063629, -0.04311078414320946, 0.02970300428569317, 0.009641549549996853, -0.015981370583176613, 0.1025921180844307, 0.05935579165816307, -0.059757523238658905, 0.09390468150377274, -0.10947176814079285, -0.049438051879405975, 0.015027259476482868], 'score': 0.004708940163254738}, page_content='Guidelines for scaffold safety procedure'), Document(metadata={'_id': '66cf513f36201a6c2ff0dcf1', 'procedureId': 'CHEM-045', 'title': 'Chemical Storage Safety', 'category': 'chemical handling', 'steps': [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Label and store chemicals safely'}], 'lastUpdated': '2024-04-11T08:53:38.622442', 'combined_info': "Title: Chemical Storage Safety Description: Guidelines for chemical storage safety Category: chemical handling Steps: [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Label and store chemicals safely'}]", 'embedding': [0.0024450658820569515, 0.06505412608385086, 0.014996403828263283, -0.012117684818804264, -0.005917366594076157, -0.004868602845817804, -0.022254712879657745, -0.02918086014688015, -0.12262850999832153, 0.00693845096975565, 0.020151032134890556, -0.09462866187095642, -0.022402338683605194, -0.050193049013614655, 0.006000406574457884, 4.0654984331922606e-05, -0.019129948690533638, 0.0520629845559597, 0.06485728919506073, 0.025022711604833603, -0.06116662546992302, 0.06731773912906647, 0.05398213118314743, 0.07957074791193008, -0.08286774158477783, -0.05083276331424713, 0.1479218602180481, -0.07725793123245239, 0.002251305850222707, 0.034569233655929565, 0.14024528861045837, -0.055458396673202515, -0.007873419672250748, 0.02494889684021473, 0.09433340281248093, 0.0018161148764193058, -0.0354795977473259, -0.09005223214626312, -0.014233666472136974, -0.062347639352083206, 0.003260087687522173, 0.037546370178461075, 0.02812287025153637, 0.07588008046150208, 0.10796426236629486, -0.010087818838655949, 0.014713452197611332, 0.04059731960296631, 0.0612158365547657, -0.019474411383271217, 0.0432053878903389, -0.016952456906437874, 0.0376201830804348, -0.0407695509493351, 0.003447696566581726, -0.0769626721739769, 0.0237432811409235, -0.009300476871430874, 0.025391777977347374, 0.0026741945184767246, 0.06013324111700058, -0.09630176424980164, -0.08016125112771988, 0.056344158947467804, 0.005526771303266287, -0.03587326779961586, -0.03855514898896217, 0.06357786059379578, -0.022562267258763313, -0.024026231840252876, 0.0809485912322998, 0.02268528938293457, 0.06584146618843079, -0.008383961394429207, -0.07012264430522919, -0.055458396673202515, -0.11160571873188019, 0.0635286495089531, 0.003955163061618805, -0.08882201462984085, -0.05998561531305313, 0.030534105375409126, -0.06702248007059097, 0.003816763171926141, -0.09846695512533188, 0.010659871622920036, -0.006969206500798464, -0.06835111975669861, -0.07071314752101898, -0.09950033575296402, -0.12518736720085144, -0.03781701624393463, -0.0932508111000061, 0.07770080864429474, -0.012093080207705498, -0.03993299975991249, 0.11032629013061523, 0.007430539466440678, -0.08055492490530014, 0.02072923630475998, -0.017518358305096626, -0.03021424636244774, 0.009614183567464352, 0.05255507305264473, 0.022943636402487755, -0.0509311817586422, -0.07765159755945206, 0.04866757243871689, -0.04241804778575897, -0.03464304655790329, -0.026449767872691154, -0.03513513505458832, -0.031001588329672813, 0.1590430736541748, -0.0008642307948321104, 0.008371659554541111, 0.04303315654397011, 0.0008696130244061351, -0.03944091126322746, 0.10392913967370987, -0.10747217386960983, -0.009694147855043411, 0.02177492529153824, -0.1261715441942215, -0.013384813442826271, 0.0015746839344501495, 0.016878642141819, -0.08340903371572495, -0.011754768900573254, -0.045641228556632996, 0.009214361198246479, -0.06131425499916077, 0.049823980778455734, -0.10235445201396942, 0.05152168869972229, -0.003659909823909402, 0.00027506990591064095, -0.054769475013017654, -0.02918086014688015, 0.0838027074933052, 0.04342683032155037, -0.019117645919322968, 0.11564084887504578, 0.10363388061523438, -0.12085698544979095, -0.11445983499288559, -0.06928609311580658, 0.1453630030155182, 0.0246044360101223, 0.010155480355024338, -0.053342416882514954, 0.052997954189777374, 0.058804601430892944, -0.007971837185323238, 0.09708910435438156, -0.12174274772405624, 0.020163334906101227, 0.05314557999372482, 0.1129835695028305, -0.07012264430522919, -0.012056173756718636, 0.014787266030907631, -0.052505865693092346, -0.09147929400205612, 0.032797712832689285, -0.01915455237030983, -0.019978802651166916, -0.07277992367744446, -0.010130876675248146, 0.006360246799886227, -0.039465513080358505, -0.008697668090462685, 0.05762358754873276, -0.07346884161233902, -0.012068475596606731, -0.007590468507260084, -0.034200165420770645, 0.06869558244943619, -0.011453364975750446, 0.08700128644704819, 0.044411007314920425, -0.029968202114105225, -0.1293209195137024, 0.058607764542102814, 0.03725111484527588, -0.010936671867966652, -0.03813687339425087, -0.07804527133703232, -0.051423270255327225, -0.009380441159009933, -0.07115602493286133, 0.010721382685005665, -0.029672948643565178, 0.031370654702186584, -0.04101559519767761, -0.04030206426978111, -0.03193655610084534, -0.03695586323738098, 0.033658869564533234, -0.06347944587469101, -0.03766939043998718, -0.04906124621629715, -0.05314557999372482, -0.052653491497039795, -0.14398515224456787, 0.011674804612994194, -0.11534559726715088, -0.03146907314658165, 0.0034415454138070345, -0.10530698299407959, -0.0005105420132167637, 0.03210878744721413, 0.008273241110146046, 0.1659323126077652, -0.10520856827497482, 0.04802785813808441, -0.09221742302179337, -0.030558709055185318, -0.03917026147246361, 0.02093837410211563, -0.023829396814107895, -0.0017269238596782088, 0.1006813496351242, -0.05358846113085747, -0.0921190083026886, 0.007535108365118504, 0.0231773778796196, -0.06810507923364639, 0.11652660369873047, -0.004883980378508568, -0.01666950434446335, 0.012720493599772453, 0.022020969539880753, -0.09777802973985672, -0.027827616780996323, -0.001899154856801033, 0.07086077332496643, -0.0277538038790226, -0.04116322100162506, -0.026474373415112495, 0.061806343495845795, 0.0706639364361763, -0.12912407517433167, -0.039490118622779846, 0.12912407517433167, -0.007633526343852282, 0.012357577681541443, -0.12636838853359222, 0.047560375183820724, 0.09477628767490387, -0.043156180530786514, -0.04271329939365387, 0.14368990063667297, -0.16199560463428497, 0.0027433945797383785, -0.04640396684408188], 'score': 0.004708940163254738}, page_content='Guidelines for chemical storage safety'), Document(metadata={'_id': '66cf513f36201a6c2ff0dcf0', 'procedureId': 'HEIGHTS-044', 'title': 'Ladder Safety Procedure', 'category': 'working at heights', 'steps': [{'stepNumber': 1, 'description': 'Follow emergency rescue plan'}, {'stepNumber': 2, 'description': 'Maintain three points of contact'}, {'stepNumber': 3, 'description': 'Check equipment and anchor points'}], 'lastUpdated': '2024-08-21T08:53:38.622433', 'combined_info': "Title: Ladder Safety Procedure Description: Guidelines for ladder safety procedure Category: working at heights Steps: [{'stepNumber': 1, 'description': 'Follow emergency rescue plan'}, {'stepNumber': 2, 'description': 'Maintain three points of contact'}, {'stepNumber': 3, 'description': 'Check equipment and anchor points'}]", 'embedding': [-0.013004318810999393, 0.030557233840227127, 0.0884319618344307, -0.03755507245659828, -0.018323972821235657, 0.029131747782230377, -0.014630668796598911, 0.03872137889266014, -0.009868250228464603, 0.049140386283397675, -0.07194815576076508, -0.1140388697385788, -0.012894167564809322, -0.035481639206409454, -0.026954641565680504, -0.028146866708993912, 0.02788768708705902, -0.030868249014019966, -0.016393087804317474, 0.026293734088540077, 0.014034556224942207, 0.014825052581727505, 0.10558962821960449, 0.07459178566932678, -0.06785313040018082, -0.029287254437804222, 0.13425485789775848, -0.011144707910716534, -0.036025915294885635, 0.0035993517376482487, 0.14607343077659607, -0.08013822138309479, -0.12191791832447052, 0.13580992817878723, 0.11134340614080429, -0.04139092564582825, -0.020319653674960136, 0.03361554816365242, -0.054842330515384674, -0.047144703567028046, 0.12471705675125122, -0.04206479340791702, -0.05243196338415146, -0.06339524686336517, 0.06977105140686035, -0.0075032394379377365, 0.022989198565483093, 0.034911446273326874, 0.00405291561037302, -0.0005183584871701896, 0.07754643261432648, -0.054272133857011795, 0.05193952098488808, 0.10144275426864624, -0.06147731840610504, -0.07536932826042175, -0.00035596650559455156, -0.06479480862617493, 0.03620734065771103, 0.05670841783285141, 0.03784016892313957, -0.09449675679206848, -0.1398531198501587, 0.04019870236515999, -0.022885527461767197, -0.029753778129816055, -0.04442332312464714, -0.0028509716503322124, 0.03607775270938873, -0.03892872482538223, 0.10325701534748077, -0.001866090577095747, 0.11144707351922989, -0.08806911110877991, -0.04908854886889458, -0.09522245824337006, -0.06759394705295563, 0.05206911265850067, -0.05349459499120712, -0.030946001410484314, -0.02768034301698208, -0.0170539952814579, -0.018103670328855515, -0.012485960498452187, -0.06909719109535217, -0.04579697176814079, -0.03882504999637604, -0.05815982446074486, -0.08464794605970383, -0.06686824560165405, -0.07801295071840286, 0.018038876354694366, -0.01621166244149208, 0.023157665506005287, 0.04190928488969803, 0.015058314427733421, 0.08371489495038986, 0.05155075341463089, -0.06235852837562561, -0.011436284519731998, 0.1226436197757721, -0.03594816103577614, -0.016393087804317474, -0.08402591198682785, -0.032604750245809555, -0.049140386283397675, 0.014475161209702492, 0.08158962428569794, 0.029987039044499397, 0.024323971942067146, -0.1053822860121727, 0.021758098155260086, -0.07070410251617432, 0.1536414623260498, 0.1026349812746048, -0.02274297922849655, 0.10419005900621414, -0.047688983380794525, 0.011643627658486366, -0.002470302162691951, -0.046833690255880356, -0.03449675813317299, 0.04190928488969803, -0.15467818081378937, -0.03480777144432068, -0.011377968825399876, 0.03817710280418396, -0.047999996691942215, 0.03636284917593002, -0.06997839361429214, -0.02104535512626171, 0.00838444847613573, 0.039732180535793304, -0.1253390908241272, -0.026902806013822556, 0.020578831434249878, -0.0199179258197546, 0.037477318197488785, -0.028380127623677254, 0.09853994846343994, 0.06334340572357178, 0.03102375566959381, -0.042583148926496506, 0.06101079657673836, -0.04009503126144409, -0.047974079847335815, -0.059663064777851105, 0.11528293043375015, 0.010282936505973339, 0.015187904238700867, -0.07251835614442825, 0.020125268027186394, -0.04670410230755806, 0.05530885234475136, 0.009051835164427757, -0.12098487466573715, -0.058574508875608444, -0.009622029960155487, 0.04154643416404724, 0.009842331521213055, 0.0026079912204295397, -0.07749459892511368, 0.023416845127940178, 0.01425485871732235, 0.03447084128856659, -0.04387904703617096, -0.014695463702082634, -0.030660904943943024, -0.012349891476333141, 0.028328292071819305, -0.005617710296064615, -0.08412958681583405, 0.0512397363781929, -0.06298055499792099, 0.039110150188207626, -0.08200431615114212, -0.025749458000063896, 0.15198270976543427, -0.029520517215132713, 0.043153345584869385, 0.02703239582479, -0.01819438301026821, -0.0741771012544632, 0.024686822667717934, -0.05432397127151489, 0.03879913315176964, 0.05504967272281647, 0.03449675813317299, 0.002368250396102667, 0.00939524732530117, 0.0017316413577646017, 0.028561552986502647, 0.0342116616666317, -0.04253131523728371, -0.03278617560863495, -0.0313866063952446, -0.06329157203435898, 0.003758099162951112, 0.07816845923662186, 0.014591791667044163, -0.051965437829494476, -0.10864794254302979, 0.10139092057943344, 0.02019006386399269, -0.06308422982692719, 0.07205183058977127, -0.1736501008272171, 0.03809934854507446, 0.007328293286263943, -0.20050106942653656, 0.0270583126693964, 0.018686823546886444, 0.07179265469312668, 0.08853562921285629, -0.0712224543094635, -0.0019616628997027874, -0.035507556051015854, -0.05525701493024826, 0.013697623275220394, 0.053442761301994324, -0.04649675637483597, -0.014773217029869556, 0.023546434938907623, 0.08713605999946594, -0.01266738586127758, 0.047144703567028046, 0.10367169976234436, -0.07904966920614243, 0.11238012462854385, 0.03563714772462845, -0.12399135529994965, -0.016146866604685783, 0.04390496388077736, 0.05209502950310707, 0.059663064777851105, 0.013568033464252949, 0.01882937178015709, -0.05810798704624176, 0.03962850570678711, -0.026591790840029716, 0.08013822138309479, 0.027550753206014633, -0.08972785621881485, 0.039447080343961716, 0.10019870102405548, -0.06012958660721779, 0.045589629560709, 0.0022629587911069393, -0.0077170622535049915, 0.12720517814159393, 0.044578831642866135, -0.04932181164622307, 0.0912310928106308, -0.16193519532680511, -0.023300213739275932, 0.06987472623586655], 'score': 0.004708940163254738}, page_content='Guidelines for ladder safety procedure'), Document(metadata={'_id': '66cf513f36201a6c2ff0dceb', 'procedureId': 'CHEM-039', 'title': 'Chemical Handling Procedure', 'category': 'chemical handling', 'steps': [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Wear appropriate chemical-resistant PPE'}, {'stepNumber': 4, 'description': 'Label and store chemicals safely'}], 'lastUpdated': '2024-03-25T08:53:38.622386', 'combined_info': "Title: Chemical Handling Procedure Description: Guidelines for chemical handling procedure Category: chemical handling Steps: [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Wear appropriate chemical-resistant PPE'}, {'stepNumber': 4, 'description': 'Label and store chemicals safely'}]", 'embedding': [-0.009836207143962383, 0.05434979870915413, 0.06914732605218887, 0.022956913337111473, -0.038123227655887604, -0.001478024059906602, 0.0067533887922763824, 0.0053675612434744835, -0.04651310294866562, 0.02629903331398964, 0.03839981555938721, -0.11736606061458588, -0.02371753379702568, -0.0239019263535738, -0.007358428090810776, -0.046351756900548935, 0.010683261789381504, 0.10814642161130905, 0.025953296571969986, 0.06651972979307175, -0.026598671451210976, 0.11146549135446548, 0.015085642226040363, 0.096437469124794, -0.07112955302000046, -0.036578934639692307, 0.09104397892951965, -0.021401097998023033, -0.029825547710061073, 0.001577423419803381, 0.14926603436470032, -0.0649062916636467, -0.03563392162322998, 0.004601178225129843, 0.08154774457216263, -0.04628261178731918, -0.045706383883953094, -0.009277266450226307, -0.039805810898542404, -0.012976648285984993, 0.0009450134821236134, -0.023855827748775482, 0.013725744560360909, 0.011415070854127407, 0.001669619814492762, 0.021147556602954865, -0.035726118832826614, 0.045061007142066956, 0.0892922505736351, -0.041234854608774185, 0.07679963111877441, 0.020548280328512192, 0.03471195697784424, 0.01923448219895363, 0.019280578941106796, -0.06006597727537155, 0.03427402675151825, -0.028926631435751915, 0.005338749848306179, -0.017079390585422516, 0.02280709333717823, -0.08145555108785629, -0.06914732605218887, 0.026252934709191322, -0.04365501180291176, -0.05693129822611809, -0.04517625272274017, 0.048218734562397, 0.03775443881750107, -0.0651828795671463, 0.0895688384771347, 0.0018237608019262552, 0.025745855644345284, -0.03395133838057518, -0.06605874747037888, -0.05716178938746452, -0.13405361771583557, 0.002515234053134918, 0.0010825878707692027, -0.06329285353422165, -0.0479421466588974, -0.006136825308203697, -0.03895299509167671, -0.0006507771904580295, -0.09477793425321579, -7.360408926615492e-05, 0.009386749938130379, -0.06135672703385353, -0.09772822260856628, -0.11644409596920013, -0.12400420755147934, -0.024501202628016472, -0.07011538743972778, 0.07463301718235016, 0.008268867619335651, -0.032038260251283646, 0.050247058272361755, 0.036048807203769684, -0.05084633454680443, 0.02669086866080761, 0.06435311585664749, -0.048034343868494034, -0.009674863889813423, 0.0580376572906971, 0.03558782488107681, -0.037224311381578445, -0.08680294454097748, 0.10427416861057281, 0.005779563914984465, 0.0017776625463739038, -0.036578934639692307, -0.02844260074198246, -0.03369779884815216, 0.1696414351463318, 0.04761945828795433, 0.023279599845409393, 0.09173545241355896, -0.017252258956432343, -0.044415634125471115, 0.05052364617586136, -0.12400420755147934, 0.011345923878252506, 0.014059956185519695, -0.15922324359416962, -0.0822853222489357, -0.01711396314203739, 0.004655919969081879, -0.12372761964797974, -0.014601610600948334, -0.0817321389913559, 0.017920682206749916, -0.07062246650457382, 0.00897186528891325, -0.1276920586824417, 0.028327355161309242, 0.04950948432087898, 0.02526182308793068, 0.020571330562233925, 0.009133209474384785, 0.03568002209067345, 0.08293069154024124, -0.026414278894662857, 0.07062246650457382, 0.0956077054142952, -0.09450134634971619, -0.08657245337963104, -0.12050074338912964, 0.10206145793199539, 0.019476497545838356, 0.039552271366119385, -0.10805422067642212, 0.10482734441757202, 0.022899290546774864, -0.007923130877315998, 0.09284181147813797, -0.13967759907245636, 0.017010241746902466, 0.0688246414065361, 0.10335220396518707, -0.0988345816731453, 0.03556477651000023, -0.03213045746088028, -0.032683636993169785, -0.06260138005018234, 0.07753720134496689, -0.02526182308793068, 0.02247288078069687, -0.018450811505317688, -0.007807885762304068, 0.031853869557380676, -0.0712217465043068, 0.007877033203840256, 0.035864412784576416, -0.04729676991701126, -0.03888384625315666, -0.027059653773903847, 0.01139778457581997, 0.08279240131378174, -0.0445769764482975, 0.09809701144695282, 0.08518950641155243, 0.05485687777400017, -0.07795208692550659, -0.020502181723713875, -0.012123831547796726, 0.019522596150636673, 0.03533428534865379, -0.04734287038445473, -0.05006266385316849, -0.004915222525596619, -0.0021003501024097204, 0.032937176525592804, -0.014682282693684101, 0.007225895766168833, -0.13589754700660706, 0.009968739934265614, 0.04923289641737938, -0.01736750453710556, 0.009761298075318336, -0.04420819133520126, -0.05052364617586136, -0.07343446463346481, -0.052044887095689774, 0.007145223673433065, -0.07974991947412491, -0.024385957047343254, -0.12723107635974884, -0.04307878389954567, 0.029687251895666122, -0.14797528088092804, -0.009726723656058311, 0.015719491988420486, 0.047388967126607895, 0.15913105010986328, -0.14474840462207794, 0.01588083617389202, -0.06601265072822571, 0.019453447312116623, -0.02486998774111271, 0.015039543621242046, -0.03899909183382988, -0.010625638999044895, 0.11035913228988647, 0.00031188325374387205, -0.0855121910572052, 0.03201521188020706, 0.014025382697582245, -0.041234854608774185, 0.06444530934095383, -0.06914732605218887, -0.0511690229177475, 0.01788610778748989, 0.03183082118630409, -0.02132042497396469, -0.026898309588432312, 0.007369952742010355, 0.0514456108212471, -0.03946007415652275, -0.017782388255000114, -0.06131063029170036, 0.06647363305091858, 0.0827002003788948, -0.10547272115945816, -0.03803103044629097, 0.13986198604106903, -0.034504517912864685, 0.03886079788208008, -0.10086289793252945, 0.092242531478405, 0.07564717531204224, -0.029894694685935974, -0.060665253549814224, 0.12640132009983063, -0.19730037450790405, -0.015984557569026947, -0.01949954591691494], 'score': 0.004708940163254738}, page_content='Guidelines for chemical handling procedure'), Document(metadata={'_id': '66cf513f36201a6c2ff0dce8', 'procedureId': 'CHEM-036', 'title': 'Chemical Handling Procedure', 'category': 'chemical handling', 'steps': [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Wear appropriate chemical-resistant PPE'}, {'stepNumber': 4, 'description': 'Label and store chemicals safely'}], 'lastUpdated': '2024-08-19T08:53:38.622356', 'combined_info': "Title: Chemical Handling Procedure Description: Guidelines for chemical handling procedure Category: chemical handling Steps: [{'stepNumber': 1, 'description': 'Dispose of chemicals per regulations'}, {'stepNumber': 2, 'description': 'Review Safety Data Sheets (SDS)'}, {'stepNumber': 3, 'description': 'Wear appropriate chemical-resistant PPE'}, {'stepNumber': 4, 'description': 'Label and store chemicals safely'}]", 'embedding': [-0.009836207143962383, 0.05434979870915413, 0.06914732605218887, 0.022956913337111473, -0.038123227655887604, -0.001478024059906602, 0.0067533887922763824, 0.0053675612434744835, -0.04651310294866562, 0.02629903331398964, 0.03839981555938721, -0.11736606061458588, -0.02371753379702568, -0.0239019263535738, -0.007358428090810776, -0.046351756900548935, 0.010683261789381504, 0.10814642161130905, 0.025953296571969986, 0.06651972979307175, -0.026598671451210976, 0.11146549135446548, 0.015085642226040363, 0.096437469124794, -0.07112955302000046, -0.036578934639692307, 0.09104397892951965, -0.021401097998023033, -0.029825547710061073, 0.001577423419803381, 0.14926603436470032, -0.0649062916636467, -0.03563392162322998, 0.004601178225129843, 0.08154774457216263, -0.04628261178731918, -0.045706383883953094, -0.009277266450226307, -0.039805810898542404, -0.012976648285984993, 0.0009450134821236134, -0.023855827748775482, 0.013725744560360909, 0.011415070854127407, 0.001669619814492762, 0.021147556602954865, -0.035726118832826614, 0.045061007142066956, 0.0892922505736351, -0.041234854608774185, 0.07679963111877441, 0.020548280328512192, 0.03471195697784424, 0.01923448219895363, 0.019280578941106796, -0.06006597727537155, 0.03427402675151825, -0.028926631435751915, 0.005338749848306179, -0.017079390585422516, 0.02280709333717823, -0.08145555108785629, -0.06914732605218887, 0.026252934709191322, -0.04365501180291176, -0.05693129822611809, -0.04517625272274017, 0.048218734562397, 0.03775443881750107, -0.0651828795671463, 0.0895688384771347, 0.0018237608019262552, 0.025745855644345284, -0.03395133838057518, -0.06605874747037888, -0.05716178938746452, -0.13405361771583557, 0.002515234053134918, 0.0010825878707692027, -0.06329285353422165, -0.0479421466588974, -0.006136825308203697, -0.03895299509167671, -0.0006507771904580295, -0.09477793425321579, -7.360408926615492e-05, 0.009386749938130379, -0.06135672703385353, -0.09772822260856628, -0.11644409596920013, -0.12400420755147934, -0.024501202628016472, -0.07011538743972778, 0.07463301718235016, 0.008268867619335651, -0.032038260251283646, 0.050247058272361755, 0.036048807203769684, -0.05084633454680443, 0.02669086866080761, 0.06435311585664749, -0.048034343868494034, -0.009674863889813423, 0.0580376572906971, 0.03558782488107681, -0.037224311381578445, -0.08680294454097748, 0.10427416861057281, 0.005779563914984465, 0.0017776625463739038, -0.036578934639692307, -0.02844260074198246, -0.03369779884815216, 0.1696414351463318, 0.04761945828795433, 0.023279599845409393, 0.09173545241355896, -0.017252258956432343, -0.044415634125471115, 0.05052364617586136, -0.12400420755147934, 0.011345923878252506, 0.014059956185519695, -0.15922324359416962, -0.0822853222489357, -0.01711396314203739, 0.004655919969081879, -0.12372761964797974, -0.014601610600948334, -0.0817321389913559, 0.017920682206749916, -0.07062246650457382, 0.00897186528891325, -0.1276920586824417, 0.028327355161309242, 0.04950948432087898, 0.02526182308793068, 0.020571330562233925, 0.009133209474384785, 0.03568002209067345, 0.08293069154024124, -0.026414278894662857, 0.07062246650457382, 0.0956077054142952, -0.09450134634971619, -0.08657245337963104, -0.12050074338912964, 0.10206145793199539, 0.019476497545838356, 0.039552271366119385, -0.10805422067642212, 0.10482734441757202, 0.022899290546774864, -0.007923130877315998, 0.09284181147813797, -0.13967759907245636, 0.017010241746902466, 0.0688246414065361, 0.10335220396518707, -0.0988345816731453, 0.03556477651000023, -0.03213045746088028, -0.032683636993169785, -0.06260138005018234, 0.07753720134496689, -0.02526182308793068, 0.02247288078069687, -0.018450811505317688, -0.007807885762304068, 0.031853869557380676, -0.0712217465043068, 0.007877033203840256, 0.035864412784576416, -0.04729676991701126, -0.03888384625315666, -0.027059653773903847, 0.01139778457581997, 0.08279240131378174, -0.0445769764482975, 0.09809701144695282, 0.08518950641155243, 0.05485687777400017, -0.07795208692550659, -0.020502181723713875, -0.012123831547796726, 0.019522596150636673, 0.03533428534865379, -0.04734287038445473, -0.05006266385316849, -0.004915222525596619, -0.0021003501024097204, 0.032937176525592804, -0.014682282693684101, 0.007225895766168833, -0.13589754700660706, 0.009968739934265614, 0.04923289641737938, -0.01736750453710556, 0.009761298075318336, -0.04420819133520126, -0.05052364617586136, -0.07343446463346481, -0.052044887095689774, 0.007145223673433065, -0.07974991947412491, -0.024385957047343254, -0.12723107635974884, -0.04307878389954567, 0.029687251895666122, -0.14797528088092804, -0.009726723656058311, 0.015719491988420486, 0.047388967126607895, 0.15913105010986328, -0.14474840462207794, 0.01588083617389202, -0.06601265072822571, 0.019453447312116623, -0.02486998774111271, 0.015039543621242046, -0.03899909183382988, -0.010625638999044895, 0.11035913228988647, 0.00031188325374387205, -0.0855121910572052, 0.03201521188020706, 0.014025382697582245, -0.041234854608774185, 0.06444530934095383, -0.06914732605218887, -0.0511690229177475, 0.01788610778748989, 0.03183082118630409, -0.02132042497396469, -0.026898309588432312, 0.007369952742010355, 0.0514456108212471, -0.03946007415652275, -0.017782388255000114, -0.06131063029170036, 0.06647363305091858, 0.0827002003788948, -0.10547272115945816, -0.03803103044629097, 0.13986198604106903, -0.034504517912864685, 0.03886079788208008, -0.10086289793252945, 0.092242531478405, 0.07564717531204224, -0.029894694685935974, -0.060665253549814224, 0.12640132009983063, -0.19730037450790405, -0.015984557569026947, -0.01949954591691494], 'score': 0.004708940163254738}, page_content='Guidelines for chemical handling procedure')]
MongoDB Checkpointer
[72]
Tool Definitions
[73]
[74]
[75]
[76]
[77]
LLM Defintion
[78]
Agent Definition
[79]
[80]
State Definition
[81]
Node Definition
[82]
[83]
Agentic Workflow Definition
[84]
[85]
[86]
[87]
[88]
[ ]