Skip to content

Commit

Permalink
nit: fix grammar in insurance cookbook (#89)
Browse files Browse the repository at this point in the history
cr
  • Loading branch information
jerryjliu committed Mar 18, 2024
1 parent 591b6fc commit a2edc41
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions examples/demo_insurance.ipynb
Expand Up @@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# LlamaParse - Fast checking insurance contract for coverage\n",
"# LlamaParse - Fast checking Insurance Contract for Coverage\n",
"\n",
"In this note book we will look at how llama parse can be used to extract structured coverage information from insurance policy."
"In this notebook we will look at how LlamaParse can be used to extract structured coverage information from an insurance policy."
]
},
{
Expand Down Expand Up @@ -39,7 +39,7 @@
"source": [
"## Download an insurance policy fron IRDAI\n",
"\n",
"IRDAI maintain a great ressource: https://policyholder.gov.in/web/guest/non-life-insurance-products where all insurance policy wording available in India are provided for the public! Let's downlaod a complex policy, a health insurance."
"The Insurance Regulatory and Development Authority of India (IRDAI) maintains a great resource: https://policyholder.gov.in/web/guest/non-life-insurance-products where all insurance policies available in India are publicly available for download! Let's download a complex health insurance policy as an example."
]
},
{
Expand Down Expand Up @@ -73,7 +73,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Initializing llama index and LlamaParse"
"## Initializing LlamaIndex and LlamaParse"
]
},
{
Expand Down Expand Up @@ -114,7 +114,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Vanilla approach - just parsing the policy with Llama Parse into markdown"
"## Vanilla Approach - Parse the Policy with LlamaParse into Markdown"
]
},
{
Expand Down Expand Up @@ -170,8 +170,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Markdown Node element parser\n",
"Our markdown node element parser work well for markdown output of LlamaParse"
"### Markdown Element Node Parser\n",
"Our markdown element node parser works well for parsing the markdown output of LlamaParse into a set of table and text nodes."
]
},
{
Expand Down Expand Up @@ -234,7 +234,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Querying the model for cover"
"### Querying the model for coverage"
]
},
{
Expand Down Expand Up @@ -262,7 +262,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As the information is split accross the document we have issue retrieving it, now let's try some parsing instruction to improve our result."
"The information is split across the document which leads to retrieval issues. Let's try some parsing instructions to improve our result."
]
},
{
Expand Down Expand Up @@ -446,9 +446,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## With and without instruction difference\n",
"## Comparing Instruction-Augmented Parsing vs. Vanilla Parsing\n",
"\n",
"On the document parsed with instruction to add context on coverage, we are able to answer correclty a wide range of query that are not possible on the document parsed using the vanilla method."
"When we parse the document with natural language instructions to add context on insurance coverage, we are able to correctly answer a wide range of queries in our RAG pipeline. In contrast, a RAG pipeline built with the vanilla method is not able to answer these queries."
]
},
{
Expand Down Expand Up @@ -483,7 +483,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Looking at the policy it say in list I expenses not coverd: Baby food"
"Looking at the policy it says in list I that one expense not covered is Baby food"
]
},
{
Expand Down

1 comment on commit a2edc41

@wb200
Copy link

@wb200 wb200 commented on a2edc41 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, "parsing_instruction" is a prompt to an LLM to help parse the source file. In the insurance example the prompt generates summaries of the various insurance clauses. Wouldn't this create the problem that you cannot be sure that the LLM summarizes the clauses correctly (hallucinations) and the RAG output is therefore not accurate because it does not directly retrieve from the source?

Wouldn't it be a better approach to get a raw RAG response and then use post-processing to refine/synthesize a better response? At least you have the raw original source as a reference for authenticity. Pretty important for contracts, legal stuff, etc.

Please sign in to comment.