Problem Statement
Two non-technical investors thought of an idea to create an AI-based lawyer that can process textual queries and answer them accordingly with citations to the PPC (Pakistan Penal Code) and Constitution. This is especially useful for people living in remote areas and even urban women looking to get a consultation privately. Luckily, you run a software development business and will be providing them services.
Query Input
The user will submit a text string as a query to this unit.
Query Handling
The unit will determine which words are crucial to the meaning of the text and replace them with generic equivalents that are preceded by an escape character.
The sentence will be output by the unit as a string.
If there is a mistake during this procedure, the generic inquiry couldn't be created correctly from the sentence. Send back a message saying, "Sorry, I didn't understand it" in this situation.
The system will provide an example question after the text with the API response if a question is not understood by our API.
Following a user's input, the chatbot should be able to choose or generate a response depending on that information and the conversation's context. The provided responses must make sense in the context inferred from the entry.
The system will reply to the user with the solution as a second text message after sending the user's text to the API.
User Interface
A chat window on the GUI will show queries submitted to the system and API responses.
There will be a textbox on the GUI that can be filled in using keyboard inputs.
The "Send" button on the GUI will, when clicked, send text from the textbox to the API.
All of the queries and responses from the current session are displayed in the chat window, with a scroll bar available if necessary.
Error Handling
The chat window will show an error message if there is a network issue.
To prevent that small mistakes can affect the chatbot's comprehension, the application should activate the "auto-correct" feature when a user inputs a spelling mistake or makes a sentence-level error.
Integration
The chatbot should be coupled with a knowledge-based database and configured to swiftly retrieve information.
The chatbot should be integrated with a database of PPC (Pakistan Penal Code) and Constitution , to answer queries accordingly
Technology
Python will be utilised as the programming language.
All data needed to provide answers will be kept in a MySQL database.
Updation
Periodically, updates to the database will take place, and those updates will prevent access to the API.
Language
Although the chatbot has to understand English in order to function, it should be thought about expanding the languages that are now supported in the future.
Administration
The administrator should be able to to add, update and delete questions, answers and keywords.
Security
The database ought to be secured against intrusions and illegal access.
For security, HTTPS will be used to establish the connection between the Web API and the apps.
Effectiveness
If exceptions do occur, they should be effectively reported to the user.
Scalability
The system must be scalable depending on how many people are utilising it.
Availability
Our programme is fully independent of any network provider and can operate even when there is no internet connection. It can be used every day of the year, 24/7.
The chatbot ought to be designed to function in the majority of server configurations. In light of this, a chatbot should be able to function in either server environment.
The chatbot must be able to understand natural language within a certain domain and be able to determine the user input topic independently of the construction of the sentence.
Performance
The chatbot should write answers more quickly than it would take a human to do so.
Over the question testing set, the server will typically respond in less than or equal to 2 seconds.
Data management
In order to efficiently address customer issues and obtain insights from pertinent data, the chatbot can acquire, interpret, and process massive amounts of data.
User Interface
User interfaces and experiences (UI / UX) must be carefully created.
Expandability
By examining interactions, chatbot software should constantly increase its own knowledge base.
The construction of an AI-based layer can take 2–8 weeks and cost between $20,000 and $80,000.
Hira Amir
Developer and Designer
Drop a note!