Inspiration
Emma Heiken (candidate, SF Democratic County Central Committee), as part of the opening talks at AccelerateSF, drew from her work and experience in the public sector and highlighted how difficult it is for people in need to discover Public and NonProfit resources, that are relevant to them. This struck a nerve with us and we decided to do sth about it. The good thing about this problem, is that there is a treasure trove of data available - various departments have their own bespoke websites and individual eligibility criterias, application mechanisms, etc - so we set out to leverage the power of LLMs (and RAG) to collate this information and present it to our users via a seamless chat interface - allowing them to discover the information that is relevant to their specific case. The user is at the core of AskSF - our goal is to tailor our responses to what would be the most helpful to that user and help them seek the best possible help that the city of San Francisco has to offer.
What it does
A co-pilot or chatbot will knowledge of the public services and non-profit landscape in the city. We leverage the power of LLMs (and RAG) to collate this information and present it to our users via a seamless chat interface - allowing them to discover the information that is relevant to their specific case.
How we built it
- scrape relevant websites (department of health, food, child programs, mental health services, etc) and index into vector database (chroma) (we use OpenAI embeddings). This knowledge base is then paired with engineered prompts (we designed our chatbot to be empathetic and take into consideration the unique circumstances of the user - for eg. they could be in imminent danger, or might also require job assistance, even though all they are asking for is housing). Due to the lack of UI expertise in our team, we leveraged streamlit to build out the chat interface.
Challenges we ran into
- the information is spread across multiple websites, with no standard api or interface - so extraction of the plans, programs offered by the various departments was a big challenge
- as part of the demo, we were able to limit ourselves to a small subset of relevant data sources. however, in the real world, indexing of the relevant websites and keeping these up to date (via both automated crawling as well as expert supervision) would be a challenge to tackle
Accomplishments that we're proud of
The product :)
What we learned
Plenty of learnings around data wrangling and the tools in general (langchain, chromadb, etc)
What's next for AskSF
- we would like to build this into a mobile app (as that would be the easiest delivery channel available to most of our users)
- transform the backend into one that would scale to millions of requests (currently it runs on our laptops)
- partner with public officials like Emma Heiken to expand the knowledge base (relevant websites, programs, etc)
- extend AskSF's capabilities to fill out relevant forms and take action to help user wherever possible
Built With
- chromadb
- fastapi
- langchain
- python
- rag
- streamlit

Log in or sign up for Devpost to join the conversation.