[Feature Request] Hugging Face Integration

Sorry it apparently ended up long, hopefully somebody reads it lol. If I see a max word count on the next one of these monthly things can I get a free cookie for being the instigator? :rofl: :joy:

Why Huggingface?

  • Huggingface provides a 1 stop shop for everything from libraries to models, datasets, transformers and more (15 integrated libraries). All the aforementioned things are needed when finetuning a pre-trained model or going for gold and training your own from scratch. While OpenAI, Azure, Google and other AI services work well enough in general, they all use models trained on the full might of the internet. As such, they have knowledge of a vast amounts of topics and sometimes this other knowledge can influence other seemingly unrelated topics that we're trying to focus on resulting in less accurate responses, opinionated statements, and worst of all hallucinations. Some of these have ways to mitigate their risk, but most of these solutions involve more calls to the model. That's not ideal when you're paying per request/call and when planning for the long-term it can become obvious the time and money spent setting up a specialized model/dataset can reduce the total spent on running costs especially as user engagement increases.

Our Usecase:

  • we have a few topic-specific chatbots(or task/target-specific ie one for endusers, one for clients, one for legal, one for custom tasks... ect), mostly controlled through prompt engineering which works well enough for non-production, but for legal/compliance reasons we need to start planning on shifting towards training/finetuning models with custom datasets.

Why AI?

  • We're in the insurance industry, where just about everything is still done by hand (ok, fingers cause we type now but close enough) from policies to underwriting and claims, you name it. Because of this, there are many places where a persons feelings, upbringing, surrounds or their general health among other things can result in the misclassification/representation of a client leading to higher premiums and even difficulty in just getting insurance let alone it's price. In the worst cases a persons PII can end up affecting prices and even eligibility with other carriers if they choose to try and find better prices and switch. Very frustratingly carriers don't share the algorithms they do use in places like when determining eligibility and prices, however with an AI on your side that can analyze patterns on the minute scale and can make inferences backed with empirical and digital evidence giving it the ability to guess what affects your insurance costs and make suggestions with predictions and simulations. The best defense, will be the worlds best statistician not an offense :sunglasses:. Our goal is to protect end users and provide a safe, open and legally compliant alternative to interacting with an insurance agent/agency/carrier starting with chat (voice/text/digital communication) and eventually leading to things like passively altering the UI for personalized efficiency, generating automated tasks/commands for each individual to help monitor and maintain their accounts/policies. there's tons to be done in this industry, imo it seems like insurance companies make things complicated and hide other things creating this massive void of common tools that anybody could say is common knowledge to use (like wikipedia, spark notes, kelly blue book..... spark notes. :rofl:)

Why Retool with Huggingface?

  • currently, the python fiends (no offense to anybody) dominate and control the AI space. Everything is done with scripts and cli. The ability to build out an admin panel or frontend for setting parameters, viewing analytics, monitoring models and training/finetuning would let us help open up AI to the less tech savvy making it easier to bring in the views and ideas of others from unrelated industries which can help further the technology. This is one of the times where a team of the top coders could easily overlook something an English or History major/buff are more qualified to find, design, build or just to improve an algorithm than the coders that made it are. There's probably 1 coder out there that is also an expert in linguistics or something, so to improve math for words at some point we'll need help with the words. With everybody pushing forward to new and shiny models/AIs we're actually leaving behind those that we'll need at some point, if not already. Retool provides the perfect opportunity to create the proverbial coattails or sled we can use to drag everybody along with us so the gap between where their understanding ends and where we are today doesn't continue to grow. Otherwise we risk ending up having to teach 10-15 years of AI innovations to anyone that wants or needs to learn before they can provide meaningful insight and ideas, which without new creative minds would stymie the speed of growth creating the need for a modern day Einstein to go further instead of using the power of crowd sourcing.

Past AI Experiences:

  • I come from a background of learning to code for the video game industry (RTIS, Real Time Interactive Simulation... even the name sounds like a game genre) so any AI I've worked on has been based around that. Pathing, rule-based, FSM/FSA and decision trees are about as far as I've coded. I'm a really big fan of data structures (AVL Trees = win) however and looking over how some models are implemented it's incredibly interesting to see they aren't really based on overly complex math (like what you'd expect MATLAB to be used for) but instead the LLMs I looked at used the equivalent of a super fancy heat map.... it's a way to numerically represent how related any given word/letter grouping in a sentence is to the ones surrounding it. how often 2 words appear 'near' each other and how close they are each time, and maybe also how many related words they have in common and how related those are to each other, can help determine if 2 words are related and how strong the relationship is. it's over simplified so feel free to reply with corrections or other explanations :beers:

What's Next?
oddly, cryptocurrency :man_shrugging:. Real world asset NFTs for insurance related assets.... and yes, NFTs not for ridiculous "art" are possible :joy:

1 Like

Interesting article, thanks for sharing.

I've worked with a bunch of insurance companies (I'm in consultancy) and the amount of secrecy behind the algorithms always amazes me! Many of them have been using "AI" to differing degrees - some a lot more successfully and with more sophistication than others - and it's interesting to see how the democratisation of this tooling will change that industry.

1 Like

Thanks so much for posting this @bobthebear !! We'll share this internally as well :pray:

The why Hugging face section certainly makes sense; I'll have to check it out myself

Super interested in the idea of NFTs for insurance related assets - totally agree there could be lots of non-art business use cases for them :crossed_fingers:

Also, haha not even sure if there's a max word count but I think it warrants a free cookie! :joy:

2 Likes