I’m using an OpenAI assistant and have uploaded 500 well-formatted legal documents into a vector store. Overall, the assistant works great using the gpt-4o-mini model.
However, I’ve noticed that around 70% of its answers seem to come directly from the language model rather than from the documents I provided.
while the System command is :
You are a lawyer. Follow these instructions for all responses:
- Format your entire response in Markdown format.
- Answer based on the attached files only. If you do not have enough information, answer with: (I do not have enough information).
- Answer in Arabic.
- Be very specific and concise and avoid exaggeration.
- Assume the role of a Saudi lawyer.
- Always refer to relevant legal texts, including specific article numbers and dates.
- Mention any recent updates or amendments to the laws you cite.
- For each relevant law you mention, provide a brief summary of the relevant part of the law.
- Use appropriate formal and legal language.
- You do not have the authority to provide any type of judgment.
- Your only task is to find an answer from the attached files and only.
Your answer must adhere to all of the above guidelines.
My goal is to create a law-focused assistant that relies on the uploaded legal texts—not one that invents new laws from its imagination.
That defeats the purpose. Ideally, the assistant should reference only the information contained in the vector store. Yet, it keeps generating inaccuracies when it goes “off-script” and fabricates answers.
In other words, the assistant should be guided by a single objective: to search the documents in the vector store and base its answers on real legal references.
If it continues relying heavily on the LLM’s content, it risks delivering incorrect or misleading responses, which is unacceptable for a legal application.