Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
srbalakr committed Jul 11, 2023
1 parent 8a34a97 commit 973400b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 40 deletions.
43 changes: 4 additions & 39 deletions notebooks/chat-read-retrieve-read.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -74,47 +74,12 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Searching: \"copay\" \"Northwind Health Plus\" \"Northwind Standard\" benefits details -source name\n",
"-------------------\n",
"\n",
"-------------------\n",
"\n",
"{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\nAnswer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\nEach source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, e.g. [info1.txt]. Don't combine sources, list each source separately, e.g. [info1.txt][info2.pdf].\\n\"}\n",
"{'role': 'user', 'content': 'does my plan cover eye exam'}\n",
"{'role': 'assistant', 'content': 'Yes, Northwind Health Plus plan covers vision exams, glasses, and contact lenses. However, Northwind Standard only covers vision and hearing screenings and certain preventive services such as routine physical exams, immunizations, and screenings for certain diseases such as cancer and diabetes. [Benefit_Options-2.pdf][Northwind_Standard_Benefits_Details-44.pdf]'}\n",
"{'role': 'user', 'content': 'does my plan cover eye exam'}\n",
"{'role': 'assistant', 'content': 'Yes, Northwind Health Plus plan covers vision exams, glasses, and contact lenses. [Benefit_Options-2.pdf][Northwind_Health_Plus_Benefits_Details-25.pdf]'}\n",
"{'role': 'user', 'content': 'does my plan cover vision'}\n",
"{'role': 'assistant', 'content': 'Yes, both Northwind Health Plus and Northwind Standard plans offer coverage for vision services. Northwind Health Plus plan offers coverage for vision exams, glasses, and contact lenses, whereas Northwind Standard plan only offers coverage for vision exams and glasses. [Benefit_Options-2.pdf][Northwind_Standard_Benefits_Details-97.pdf]'}\n",
"{'role': 'user', 'content': 'does my plan cover cardio'}\n",
"{'role': 'assistant', 'content': 'Unfortunately, I cannot find information about whether Northwind Health Plus or Northwind Standard plans cover cardio specifically. However, both plans offer coverage for medical services like hospital stays and doctor visits. [Benefit_Options-2.pdf]'}\n",
"{'role': 'user', 'content': 'does my plan cover dental'}\n",
"{'role': 'assistant', 'content': 'Yes, Northwind Standard plan offers coverage for dental services. This coverage includes medically necessary services for the relief of pain resulting from dental injury, as well as services for the administration of anesthesia in a facility. However, this plan does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services. [Benefit_Options-2.pdf][Northwind_Standard_Benefits_Details-23.pdf]'}\n",
"{'role': 'user', 'content': 'how much is copay'}\n",
"{'role': 'assistant', 'content': 'The amount of copay for Northwind Standard plan varies depending on the type of service you receive, and copays may also vary from provider to provider and from state to state. Northwind Health Plus plan also has copays for certain services, and the amount of copayment varies based on the type of service received, whether the service is rendered by an in-network or out-of-network provider, and other factors. For in-network services, copays for Northwind Health Plus plan are generally lower than for out-of-network services. The copayment for primary care visits is typically around $20, while specialist visits have a copayment of around $50. [Northwind_Standard_Benefits_Details-9.pdf][Northwind_Standard_Benefits_Details-10.pdf][Northwind_Health_Plus_Benefits_Details-9.pdf]'}\n"
]
},
{
"data": {
"text/plain": [
"[None, None, None, None, None, None, None, None, None, None, None, None, None]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Execute this cell multiple times updating user_input to accumulate chat history\n",
"user_input = \"how much is copay\"\n",
"user_input = \"Does my plan cover annual eye exams?\"\n",
"\n",
"# Exclude category, to simulate scenarios where there's a set of docs you can't see\n",
"exclude_category = None\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
azure-identity==1.13.0
langchain==0.0.187
openai==0.26.4
openai==0.27.8
azure-search-documents==11.4.0b3

0 comments on commit 973400b

Please sign in to comment.