| title | app_file | sdk | sdk_version |
|---|---|---|---|
dolly-expert-builder |
app.py |
gradio |
3.34.0 |
A lightweight Dolly-v2 powered assistant that can answer domain-specific questions and keep a conversation. It's expert systems in the era of LLMs.
Submission to the "So you think you can hack": open-source LLMs (e.g., OpenAssistant, MPT, Dolly, etc.) DevPost Hackathon.

Expert Systems used to be big in artificial intelligence. They mimic the decision-making capabilities of a human expert in a particular field and can provide substantial value in many use cases. The main drawback of old school expert systems was that they had to be programmed using Boolean statements or a similar logic, taking considerable time and resources. In many occasions, this approach defeated the purpose of having a readily available expert for the task at hand.
Closed-source LLM applications like ChatGPT3.5 and ChatGPT-4 are gigantic models that are very good a large number of tasks. They do have limitations such as hallucinations when they don't know how to respond or when the answer is online and they don't have access to the internet or files. Some times, these hallucinations will be told in very convincing ways and whenever one tries to implement them they will turn out to be flat-out false or incorrect. These models have enormous context windows so people can help them do whatever task they struggle with by providing lots of information and implementing prompt engineering techniques. This makes more than one think that only the big companies with closed source code can develop and deploy LLM applications.
Dolly Expert Lite leverages dolly-v2-3b, the lightweight version of dolly-v2-12b, an open-source large language model (LLM) to answer domain-specific questions using retrieval in custom-made vector databases. In this example deployment, dolly-expert-builder retrieves information from the Ontario (Canada) building code to answer specific questions about construction, plumbing, electrical wiring and ventilation as per the official government code. dolly-expert-builder can provide coherent and factually correct information with sources and can serve as guidance suitable for tradespeople (plumbers, electricians, mechanics, home builders) as well as engineers and architects to aid in regulatory compliance while performing work.
By following this method, individuals and organizations can use their local data to make expert assistants able to answer domain-specific questions. Possible use cases include:
Since the tools are so new, some divergences from the standard use cases cause errors. For example:
persists_directory in the ChromaDB initialization and it would not load later in a separate instance because the .persists() method was not called. This had to be redone and committed again for the database to be finally available.Being able to make a functional lightweight prototype of an LLM application using an open-source model like Dolly and deploying it as a HuggingFace Space. Being able to show that LLM applications are for everyone and that the open-source ecosystem is just as capable as the closed-source pioneers.
In terms of general software development knowledge, I learned to troubleshoot packages conflicting with each other, learned that Python has to be restarted depending on what dependencies are installed or that sometimes it's better to compartmentalize tasks instead of trying to do everything at once. I also learned the basics of Gradio to be able to make the app. And most importantly, I learned to better navigate GitHub issues and StackOverflow posts to find workarounds for the problems I encountered.
In terms of LLM-related knowledge, I learned about the importance of prompt engineering and how it can dramatically improve your inference results, I learned to navigate the natural language processing (NLP) terminology a lot more, and I learned about types of question chain memory. I also learned that open-source models give the possibility to develop and deploy LLM applications to whoever is interested and puts in the time to research the documentation and troubleshoot or workaround current issues.