Code Repo
https://github.com/nicolaivicol/chat-own-docs-ft-rag
Inspiration
We were inspired by the idea of bridging the gap between citizens and public services. It's often a complicated process for individuals to find the specific information they are seeking. Our aspiration was to simplify this process and make public services more approachable and user-friendly through technology.
What it does
Our solution, a chatbot module for the EVO government application, assists citizens in acquiring up-to-date information on public services swiftly and efficiently. By understanding user intents dynamically, it guides users through a range of queries, helping them ask questions, seek clarifications, and make requests, all while ensuring logical and accurate responses based on the official database of servicii.gov.md.
How we built it
- Our chat bot is an LLM-based application with domain-specific knowledge.
- We mainly use the OpenAI API for our solution.
- The LLM engine is the gpt-3.5-turbo-0613 model by OpenAI.
- We have fine-tuned this LLM model with a sample of question-answer pairs, manually curated + synthetic + template queries based on the entire corpus.
- RAG (Retrieval Augmented Generation) - user messages are used to retrieve relevant documents for the conversation from the vector DB.
- Documents were chunked and the embeddings generated via OpenAI were stored in the vector DB (Chroma) for fast retrieval.
- Besides text, we provide additional interaction buttons to select documents of interest faster.
- We use prompt-engineering via: setting of system role.
Solution in a GIF
UI
To ensure a seamless and versatile user experience, we built the interface as a Progressive Web Application (PWA), using React.js and TypeScript. This approach allows the chatbot to run smoothly whether accessed via web, mobile, or even as a Chrome extension, providing users with multiple avenues to interact with the public services.
Challenges we ran into
Some of the challenges we faced included understanding the diverse range of user queries and designing a system robust enough to handle them accurately. Ensuring the chatbot could understand and respond to natural language inquiries with the correct information from the database was a significant hurdle.
Accomplishments that we're proud of
We are incredibly proud of the chatbot we crafted that fetches the latest information from servicii.gov.md to provide users with the most current answers to their questions. Not only is it powered by the freshest data, but it also works fast, giving users quick responses to aid them efficiently. Additionally, we designed an interface that is straightforward and easy to navigate, ensuring a user-friendly experience that makes accessing public services simpler and more intuitive than ever before.
What we learned
Through this project, we deepened our technical proficiency, mastering new techniques in designing conversational flows. We navigated the challenges of fitting our solution within the constraints of a 4k model behind GPT, demanding creative optimizations and streamlining to ensure efficiency without compromising quality. These experiences underscored the importance of balancing model complexity with practical constraints, leading us to explore innovative solutions and refined methodologies in chatbot development.
What's next for GovernMental Hacks
Looking forward, we have outlined several future enhancements that would amplify the efficiency and usability of our chatbot. Some of these advancements include:
Built With
- chatgpt
- chroma
- llm
- openai
- python
- rag
- react
- typescript
Log in or sign up for Devpost to join the conversation.