2023-06-03 23:25:28 +00:00
{
"cells": [
{
"cell_type": "markdown",
"id": "3df0dcf8",
"metadata": {},
"source": [
2023-06-20 05:04:35 +00:00
"# PubMed\n",
2023-06-03 23:25:28 +00:00
"\n",
"\n",
2023-08-08 18:26:03 +00:00
">[PubMed®](https://pubmed.ncbi.nlm.nih.gov/) by `The National Center for Biotechnology Information, National Library of Medicine` comprises more than 35 million citations for biomedical literature from `MEDLINE`, life science journals, and online books. Citations may include links to full text content from `PubMed Central` and publisher web sites.\n",
"\n",
"This notebook goes over how to use `PubMed` as a retriever"
2023-06-03 23:25:28 +00:00
]
},
{
"cell_type": "code",
2023-08-08 18:26:03 +00:00
"execution_count": 12,
2023-06-03 23:25:28 +00:00
"id": "aecaff63",
"metadata": {},
"outputs": [],
"source": [
"from langchain.retrievers import PubMedRetriever"
]
},
{
"cell_type": "code",
2023-08-08 18:26:03 +00:00
"execution_count": 34,
2023-06-03 23:25:28 +00:00
"id": "f2f7e8d3",
"metadata": {},
"outputs": [],
"source": [
"retriever = PubMedRetriever()"
]
},
{
"cell_type": "code",
2023-08-08 18:26:03 +00:00
"execution_count": 35,
2023-06-03 23:25:28 +00:00
"id": "ed115aa1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-08-08 18:26:03 +00:00
"[Document(page_content='', metadata={'uid': '37549050', 'Title': 'ChatGPT: \"To Be or Not to Be\" in Bikini Bottom.', 'Published': '--', 'Copyright Information': ''}),\n",
" Document(page_content=\"BACKGROUND: ChatGPT is a large language model that has performed well on professional examinations in the fields of medicine, law, and business. However, it is unclear how ChatGPT would perform on an examination assessing professionalism and situational judgement for doctors.\\nOBJECTIVE: We evaluated the performance of ChatGPT on the Situational Judgement Test (SJT): a national examination taken by all final-year medical students in the United Kingdom. This examination is designed to assess attributes such as communication, teamwork, patient safety, prioritization skills, professionalism, and ethics.\\nMETHODS: All questions from the UK Foundation Programme Office's (UKFPO's) 2023 SJT practice examination were inputted into ChatGPT. For each question, ChatGPT's answers and rationales were recorded and assessed on the basis of the official UK Foundation Programme Office scoring template. Questions were categorized into domains of Good Medical Practice on the basis of the domains referenced in the rationales provided in the scoring sheet. Questions without clear domain links were screened by reviewers and assigned one or multiple domains. ChatGPT's overall performance, as well as its performance across the domains of Good Medical Practice, was evaluated.\\nRESULTS: Overall, ChatGPT performed well, scoring 76% on the SJT but scoring full marks on only a few questions (9%), which may reflect possible flaws in ChatGPT's situational judgement or inconsistencies in the reasoning across questions (or both) in the examination itself. ChatGPT demonstrated consistent performance across the 4 outlined domains in Good Medical Practice for doctors.\\nCONCLUSIONS: Further research is needed to understand the potential applications of large language models, such as ChatGPT, in medical education for standardizing questions and providing consistent rationales for examinations assessing professionalism and ethics.\", metadata={'uid': '37548997', 'Title': 'Performance of ChatGPT on the Situational Judgement Test-A Professional Dilemmas-Based Examination for Doctors in the United Kingdom.', 'Published': '2023-08-07', 'Copyright Information': '©Robin J Borchert, Charlotte R Hickman, Jack Pepys, Timothy J Sadler. Originally published in JMIR Medical Education (https://mededu.jmir.org), 07.08.2023.'}),\n",
" Document(page_content='', metadata={'uid': '37548971', 'Title': \"Large Language Models Answer Medical Questions Accurately, but Can't Match Clinicians' Knowledge.\", 'Published': '2023-08-07', 'Copyright Information': ''})]"
2023-06-03 23:25:28 +00:00
]
},
2023-08-08 18:26:03 +00:00
"execution_count": 35,
2023-06-03 23:25:28 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"retriever.get_relevant_documents(\"chatgpt\")"
]
2023-08-08 18:26:03 +00:00
},
{
"cell_type": "code",
"execution_count": null,
"id": "a9ff7a25-bb4b-4cd5-896d-72f70f4af49b",
"metadata": {},
"outputs": [],
"source": []
2023-06-03 23:25:28 +00:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2023-08-08 18:26:03 +00:00
"version": "3.10.12"
2023-06-03 23:25:28 +00:00
}
},
"nbformat": 4,
"nbformat_minor": 5
}