How I Made iMMAi: A Legal AI Assistant
Introduction
iMMAi is a powerful local AI assistant specialized in Indian Company Laws and corporate regulations. This blog will guide you through the step-by-step process of creating iMMAi using Ollama and Docker.
Step 1: Install Ollama
Ollama is the tool that allows us to run large language models locally.
- Download and install Ollama from https://ollama.com/download.
- Verify the installation by running:
ollama --version
Step 2: Install Docker Desktop
Docker is needed to containerize and manage OpenWebUI.
- Download and install Docker Desktop from https://www.docker.com/get-started.
- Open Docker and make sure it is running.
Step 3: Download the Llama 3.2 Model
Now, we will pull the Llama 3.2 model, which serves as the base for iMMAi.
- Open a terminal and run:
ollama pull llama3.2
- Verify the model is downloaded:
ollama run llama3.2
Step 4: Create a Custom Modelfile for iMMAi
Now, we will customize Llama 3.2 to specialize in Indian legal and corporate regulations.
- Create a new file named Modelfile and add the following content:
FROM llama3.2 SYSTEM """Your name is iMMAi! You are a very clever Legal Assistant and Chartered Accountant specialized in Indian Company Laws and corporate regulations. You know everything about company registration and financial aspects. You are succinct and informative. Search only for official legal and corporate regulations in India. Do not include foreign laws or unrelated information. Provide a **brief summary** in 2-3 sentences by default.""" PARAMETER temperature 0.1
Step 5: Create the iMMAi Model
Now, we will create the iMMAi model using the Modelfile.
- Open a terminal and run:
ollama create iMMAi -f Modelfile
- Check if the model is created:
If you see iMMAi in the list, the model has been successfully created.ollama list
Step 6: Test iMMAi
Finally, let’s run and test our custom AI assistant.
- Run iMMAi in the terminal:
ollama run iMMAi
- Ask it a legal or corporate question, such as:
How do I register a private limited company in India?
- If the response is relevant and based on Indian corporate laws, your AI assistant is ready! 🚀
Conclusion
In this blog, we successfully:
✅ Installed Ollama and Docker
✅ Downloaded and ran Llama 3.2
✅ Created a custom legal AI assistant (iMMAi)
✅ Tested iMMAi for legal and corporate queries
You now have a fully functional local AI legal assistant that can help with Indian corporate regulations. 🎯
No comments:
Post a Comment