Large Language Models, Artificial Intelligence and the Future of Law

Session 5: How can AI be used in the legal field?

LLMs are particularly suited to the Law

SSRN-id4335905.pdf

ChatGPT gets C+ in LAw School Examinations

SSRN-id4389233.pdf

CHATGPT PASSES THE American BAR EXAMINATION

All India Bar Examination

Source: https://notes.agami.in/p/navigating-the-landscape-of-large

Can LLMs replace lawyers?


Can Chatbots help in giving legal advice?

Consider this example taken from a consumer forum in India:

“I have booked a ticket with Air [XXX] from Bombay to Delhi, Flight was canceled due to a technical issue and I was informed that a full refund will be granted hence I took another flight. however, they deducted more than 95% of the ticket charges in the name of cancelation charges. customer care is pathetic, airline's service is even worse. they did not give refreshments even after 6 hour delay plus accommodation was declined and now even the refund is declined.... I would like to sue the flight and get compensation. Tell me how.” 

This is how an Indian Lawyer is likely to respond:

Now lets compare that with existing Chatbots (Put your scores here)

To pursue legal action against an airline for issues like cancellation charges, lack of refreshments during delays, and declined accommodation, follow these steps:

Legal steps involve complex procedures that can vary based on specific circumstances and the jurisdiction under which the complaint is filed. Thus, professional legal advice is highly recommended to navigate through these processes efficiently.

I'm sorry to hear about your experience. Here are some steps you can take to pursue legal action against the airline:

This situation is extremely frustrating, and it's understandable you're exploring legal options. Here's a breakdown of how you might pursue this, but keep in mind I'm not a lawyer and this isn't a substitute for legal advice:

Things to Consider Before Suing

Steps on Filing a Claim

Compensation You Could Seek

Important Notes

Let me know if you'd like help finding information about consumer helplines, grievance officers for your specific airline, or resources on consumer courts in your area.

I understand your frustration with the airline's handling of the cancellation and refund. Here are some steps you can take to seek compensation and resolution:

1. Gather evidence: Collect all relevant documents, such as your booking confirmation, cancellation notice, correspondence with the airline, and any receipts for additional expenses incurred due to the cancellation (e.g., alternative flight tickets, meals, accommodations).

2. Review the airline's policies: Check the airline's terms and conditions, specifically their cancellation and refund policies. Determine if they have violated their own policies or any applicable laws or regulations.

3. Contact the airline in writing: Send a formal complaint letter or email to the airline's customer service department, outlining the details of your case, the inconvenience caused, and the compensation you are seeking. Be specific and provide all relevant information and supporting documents.

4. Escalate the complaint: If you do not receive a satisfactory response from the airline's customer service, escalate the issue to higher authorities within the company, such as a supervisor or the airline's legal department.

5. File a complaint with the regulatory body: If the airline fails to address your concerns, file a complaint with the Directorate General of Civil Aviation (DGCA), the Indian aviation regulatory body. They can investigate the matter and take appropriate action against the airline if necessary.

6. Seek legal advice: If the above steps do not yield a satisfactory resolution, consider seeking legal advice from a consumer rights lawyer or a lawyer specializing in aviation law. They can assess your case and advise you on the best course of action, including the possibility of filing a lawsuit against the airline.

7. Consider alternative dispute resolution: Some airlines may offer mediation or arbitration services to resolve disputes. Check if this is an option and if it could lead to a faster resolution.

Remember to keep a record of all correspondence and interactions with the airline and any other relevant parties. Be persistent and follow up regularly on your complaint. While the process may take some time, it's essential to assert your rights as a consumer and seek fair compensation for the inconvenience and financial losses you have suffered due to the airline's mishandling of the situation.

Not Accurate: Does not give accurate legal advice. Often misses key legal interventions such as consumer hotline and legal notice. 

Not Specific: Does not give specific advice about my situation and my documents. 

Not Helpful: Gives chunky paragraphs without gathering more information or giving tailored advice. 

You can pre-train your own foundational model based on a legal corpus. For example: Harvey, a model pre-trained by OpenAI on legal texts. Harvey achieved: "a 35% increase in conversation summarization quality, a 33% increase in intent recognition accuracy, and an increase in satisfaction scores from 3.6 to 4.5 (out of 5) when comparing the fine-tuned model to GPT-4."

However, this is prohibitively expensive. 

You can thus try to do three things in order of resource requirements:

Prompt Engineering

1. Be Specific and Clear: Avoid vague or ambiguous language. The more precise your instructions, the more accurate the LLM's response will be.

2. Provide Examples: Examples help the model understand the pattern or style you want. For instance:

"Write a haiku about a cat." vs. "Write a haiku about a cat, like this example: Silently she waits, / Eyes gleaming in the darkness, / A paw softly strikes."

Examples can be one-shot, few-shot or many-shot. 

3. Define the Desired Output Format: Specify whether you want a paragraph, a list, a table, code, etc. If there is a template, give it a template.

4. Offer Context: Background information sets the stage for the LLM.  Consider adding details about tone, purpose, and audience.

5. Negative Instructions: Tell the model what you DO NOT want. 

6.  Ask the Chatbot to Play a role: Give the model a persona or role. Example: "Act as a creative writing expert and critique this poem..."

7. Chain-of-Thought Prompting: Break complex tasks into smaller steps, making the reasoning process transparent for the model. For example, instead of a summary prompt, ask the model to identify key points, then summarize those points.

8. Ask the model to explain parts of the answer:  Ask the model to explain its reasoning and break down the steps by which it reached the answer.

9. Separate parts of the prompt: Separate different components of the prompt using """ or ---.

10. Ask the chatbot to do it again: Some chatbots give you different versions of the answer. You can just tell the chatbot that you are wrong so do it again. 

Retrieval Augmented Generation

Source: https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-customize-rag.html

Consumer Guide India

Uses a Consumer Law FAQ prepared by RAG as a knowledge base.


Moreover, Chatbots continue to have the following limitations

Fine Tuning